*Update dist

This commit is contained in:
Derrick Hammer 2022-07-20 18:25:47 -04:00
parent 833bb751bc
commit c121879cbd
2 changed files with 6 additions and 6 deletions

2
dist/index.d.ts.map vendored
View File

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAe1D,qBAAa,UAAU;IACrB,OAAO,CAAC,YAAY,CAA2B;IAE/C,IAAI,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC,CAE7B;IAEM,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI9B,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIjC,WAAW,IAAI,IAAI;IAInB,KAAK,CACV,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,MAAM,GAAG,GAAG,EAAO,EACzB,KAAK,GAAE,OAAe,GACrB,QAAQ;IASE,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CAS3C;AAED,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAe;gBAEnB,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU;IAMlD,IAAI,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,CAOzB;CACF"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAiB1D,qBAAa,UAAU;IACrB,OAAO,CAAC,YAAY,CAAmB;IAEvC,IAAI,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC,CAE7B;IAEM,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAM9B,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAMjC,WAAW,IAAI,IAAI;IAInB,KAAK,CACV,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,MAAM,GAAG,GAAG,EAAO,EACzB,KAAK,GAAE,OAAe,GACrB,QAAQ;IASE,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CAS3C;AAED,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAe;gBAEnB,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU;IAMlD,IAAI,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,CAOzB;CACF"}

10
dist/index.js vendored
View File

@ -16,13 +16,13 @@ export class RpcNetwork {
return callModule(RPC_MODULE, "ready");
}
addRelay(pubkey) {
this._actionQueue.push(callModule(RPC_MODULE, "addRelay", { pubkey }));
this._actionQueue.push(() => callModule(RPC_MODULE, "addRelay", { pubkey }));
}
removeRelay(pubkey) {
this._actionQueue.push(callModule(RPC_MODULE, "removeRelay", { pubkey }));
this._actionQueue.push(() => callModule(RPC_MODULE, "removeRelay", { pubkey }));
}
clearRelays() {
this._actionQueue.push(callModule(RPC_MODULE, "clearRelays"));
this._actionQueue.push(() => callModule(RPC_MODULE, "clearRelays"));
}
query(query, chain, data = {}, force = false) {
return new RpcQuery(this, {
@ -33,9 +33,9 @@ export class RpcNetwork {
});
}
async processQueue() {
for (const promise in this._actionQueue) {
for (const promise of this._actionQueue) {
try {
await promise;
await promise();
}
catch (e) { }
}