btc-wallet 0.3.21 → 0.3.22

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.
@@ -4,4 +4,4 @@ export declare function nearCallFunction<T>(contractId: string, methodName: stri
4
4
  network?: string;
5
5
  provider?: ProviderService;
6
6
  }): Promise<T>;
7
- export declare function pollTransactionStatuses(network: string, hashes: string[]): Promise<(providers.FinalExecutionOutcome | undefined)[]>;
7
+ export declare function pollTransactionStatuses(network: string, hashes: string[]): Promise<providers.FinalExecutionOutcome[]>;
package/esm/index.js CHANGED
@@ -2788,10 +2788,10 @@ function pollTransactionStatuses(network, hashes) {
2788
2788
  currentAttempt++;
2789
2789
  const promises = Array.from(pendingHashes).map((hash) => __async(this, null, function* () {
2790
2790
  try {
2791
- const result = yield provider.txStatus(hash, "unused", "FINAL");
2792
- if (result && result.status) {
2793
- console.log(`Transaction ${hash} result:`, result);
2794
- results.set(hash, result);
2791
+ const result2 = yield provider.txStatus(hash, "unused", "FINAL");
2792
+ if (result2 && result2.status) {
2793
+ console.log(`Transaction ${hash} result:`, result2);
2794
+ results.set(hash, result2);
2795
2795
  pendingHashes.delete(hash);
2796
2796
  }
2797
2797
  } catch (error) {
@@ -2811,7 +2811,8 @@ function pollTransactionStatuses(network, hashes) {
2811
2811
  yield delay(1e4);
2812
2812
  }
2813
2813
  }
2814
- return hashes.map((hash) => results.get(hash));
2814
+ const result = hashes.map((hash) => results.get(hash)).filter(Boolean);
2815
+ return result;
2815
2816
  });
2816
2817
  }
2817
2818
 
@@ -3927,7 +3928,7 @@ function setupBTCWallet({
3927
3928
 
3928
3929
  // src/index.ts
3929
3930
  var getVersion = () => {
3930
- return "0.3.21";
3931
+ return "0.3.22";
3931
3932
  };
3932
3933
  if (typeof window !== "undefined") {
3933
3934
  window.__BTC_WALLET_VERSION = getVersion();