starknet 10.6.0 → 10.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7815,11 +7815,12 @@ var WebSocketChannel = class {
7815
7815
  this.websocket.addEventListener("error", this.errorListener);
7816
7816
  }
7817
7817
  _processRequestQueue() {
7818
- logger.info(`WebSocket: Processing ${this.requestQueue.length} queued requests.`);
7819
- while (this.requestQueue.length > 0) {
7820
- const { method, params, resolve, reject } = this.requestQueue.shift();
7818
+ const pending = this.requestQueue;
7819
+ this.requestQueue = [];
7820
+ logger.info(`WebSocket: Processing ${pending.length} queued requests.`);
7821
+ pending.forEach(({ method, params, resolve, reject }) => {
7821
7822
  this.sendReceive(method, params).then(resolve).catch(reject);
7822
- }
7823
+ });
7823
7824
  }
7824
7825
  async _restoreSubscriptions() {
7825
7826
  const oldSubscriptions = Array.from(this.activeSubscriptions.values());