Compare commits
4 Commits
bc34a95ebb
...
0c51da781e
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | 0c51da781e | |
Derrick Hammer | 5366f85c35 | |
Derrick Hammer | be2531ec99 | |
Derrick Hammer | 5de486e680 |
|
@ -50,7 +50,7 @@ export default class RpcQueryBase {
|
||||||
await this._run();
|
await this._run();
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
this._promiseResolve?.({ error: e.message });
|
this._promiseResolve?.({ error: e?.message || e?.error });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setupRelayTimeout(reject) {
|
setupRelayTimeout(reject) {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"wisdom.d.ts","sourceRoot":"","sources":["../../src/query/wisdom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAEhB,oBAAoB,EAEpB,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAW9B,OAAO,YAAY,MAAM,WAAW,CAAC;AAUrC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAAY;IACtD,UAAkB,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACnD,UAAkB,MAAM,EAAE,gBAAgB,CAAC;IAC3C,IAAI,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,CAEjC;cAEe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAMrC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,OAAO,GAAE,OAAe,GAAG,IAAI;cAcrD,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC;cA8B1B,aAAa;IAyE7B,SAAS,CAAC,SAAS,IAAI,MAAM,EAAE;CAmBhC"}
|
{"version":3,"file":"wisdom.d.ts","sourceRoot":"","sources":["../../src/query/wisdom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAEhB,oBAAoB,EAEpB,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAW9B,OAAO,YAAY,MAAM,WAAW,CAAC;AAUrC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAAY;IACtD,UAAkB,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACnD,UAAkB,MAAM,EAAE,gBAAgB,CAAC;IAC3C,IAAI,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,CAEjC;cAEe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAMrC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,OAAO,GAAE,OAAe,GAAG,IAAI;cAcrD,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC;cA8B1B,aAAa;IA4E7B,SAAS,CAAC,SAAS,IAAI,MAAM,EAAE;CAmBhC"}
|
|
@ -69,6 +69,9 @@ export default class WisdomRpcQuery extends RpcQueryBase {
|
||||||
let relays = [];
|
let relays = [];
|
||||||
for (const relay in this._response?.relays) {
|
for (const relay in this._response?.relays) {
|
||||||
const resp = this._response?.relays[relay];
|
const resp = this._response?.relays[relay];
|
||||||
|
if (resp?.error) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (validateTimestampedResponse(b4a.from(relay, "hex"), resp)) {
|
if (validateTimestampedResponse(b4a.from(relay, "hex"), resp)) {
|
||||||
relays.push(resp);
|
relays.push(resp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ export default abstract class RpcQueryBase {
|
||||||
await this._network.ready;
|
await this._network.ready;
|
||||||
await this._run();
|
await this._run();
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
this._promiseResolve?.({ error: e.message });
|
this._promiseResolve?.({ error: e?.message || e?.error });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,9 @@ export default class WisdomRpcQuery extends RpcQueryBase {
|
||||||
|
|
||||||
for (const relay in this._response?.relays) {
|
for (const relay in this._response?.relays) {
|
||||||
const resp = this._response?.relays[relay];
|
const resp = this._response?.relays[relay];
|
||||||
|
if (resp?.error) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
validateTimestampedResponse(
|
validateTimestampedResponse(
|
||||||
b4a.from(relay, "hex") as Buffer,
|
b4a.from(relay, "hex") as Buffer,
|
||||||
|
|
Loading…
Reference in New Issue