btc-wallet 0.3.20 → 0.3.21

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,7 @@
1
1
  import type { ProviderService } from '@near-wallet-selector/core/src/lib/services';
2
+ import { providers } from 'near-api-js';
2
3
  export declare function nearCallFunction<T>(contractId: string, methodName: string, args: any, options: {
3
4
  network?: string;
4
5
  provider?: ProviderService;
5
6
  }): Promise<T>;
6
- export declare function pollTransactionStatuses(network: string, hashes: string[]): Promise<any[]>;
7
+ export declare function pollTransactionStatuses(network: string, hashes: string[]): Promise<(providers.FinalExecutionOutcome | undefined)[]>;
package/esm/index.js CHANGED
@@ -3343,6 +3343,7 @@ function executeBTCDepositAndAction(_0) {
3343
3343
  amount,
3344
3344
  feeRate,
3345
3345
  fixedAmount = true,
3346
+ pollResult = true,
3346
3347
  isDev = false
3347
3348
  }) {
3348
3349
  var _a;
@@ -3426,6 +3427,9 @@ function executeBTCDepositAndAction(_0) {
3426
3427
  postActions: postActionsStr,
3427
3428
  extraMsg: depositMsg.extra_msg
3428
3429
  });
3430
+ if (!pollResult) {
3431
+ return txHash;
3432
+ }
3429
3433
  const checkTransactionStatusRes = yield checkBridgeTransactionStatus(config.base_url, txHash);
3430
3434
  console.log("checkBridgeTransactionStatus resp:", checkTransactionStatusRes);
3431
3435
  const network = yield getNetwork();
@@ -3923,7 +3927,7 @@ function setupBTCWallet({
3923
3927
 
3924
3928
  // src/index.ts
3925
3929
  var getVersion = () => {
3926
- return "0.3.20";
3930
+ return "0.3.21";
3927
3931
  };
3928
3932
  if (typeof window !== "undefined") {
3929
3933
  window.__BTC_WALLET_VERSION = getVersion();