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.mjs CHANGED
@@ -7632,11 +7632,12 @@ var WebSocketChannel = class {
7632
7632
  this.websocket.addEventListener("error", this.errorListener);
7633
7633
  }
7634
7634
  _processRequestQueue() {
7635
- logger.info(`WebSocket: Processing ${this.requestQueue.length} queued requests.`);
7636
- while (this.requestQueue.length > 0) {
7637
- const { method, params, resolve, reject } = this.requestQueue.shift();
7635
+ const pending = this.requestQueue;
7636
+ this.requestQueue = [];
7637
+ logger.info(`WebSocket: Processing ${pending.length} queued requests.`);
7638
+ pending.forEach(({ method, params, resolve, reject }) => {
7638
7639
  this.sendReceive(method, params).then(resolve).catch(reject);
7639
- }
7640
+ });
7640
7641
  }
7641
7642
  async _restoreSubscriptions() {
7642
7643
  const oldSubscriptions = Array.from(this.activeSubscriptions.values());