From c121879cbd48f3cd45650f79333a01bf0caf7bdd Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 20 Jul 2022 18:25:47 -0400 Subject: [PATCH] *Update dist --- dist/index.d.ts.map | 2 +- dist/index.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map index 6b091cc..1490ef5 100644 --- a/dist/index.d.ts.map +++ b/dist/index.d.ts.map @@ -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"} \ No newline at end of file +{"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"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 666a2d3..d22c57d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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) { } }