starknet 11.10.0 → 11.10.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
@@ -14052,8 +14052,17 @@ var BatchClient = class {
14052
14052
  this.batchPromises[key] = promise;
14053
14053
  });
14054
14054
  }
14055
- const results = await this.batchPromises[requestId];
14056
- delete this.batchPromises[requestId];
14055
+ let results;
14056
+ try {
14057
+ results = await this.batchPromises[requestId];
14058
+ } finally {
14059
+ delete this.batchPromises[requestId];
14060
+ }
14061
+ if (!Array.isArray(results)) {
14062
+ const reply = results;
14063
+ if (reply?.error) return reply;
14064
+ throw new Error(`Unexpected reply to a batch request. Method: ${String(method)}`);
14065
+ }
14057
14066
  const result = results.find((res) => res.id === requestId);
14058
14067
  if (!result)
14059
14068
  throw new Error(`Couldn't find the result for the request. Method: ${String(method)}`);