btc-wallet 0.5.70-beta → 0.5.72-beta

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/esm/index.js CHANGED
@@ -3379,6 +3379,7 @@ function getAccountInfo(_0) {
3379
3379
  console.log(`get_account error, please try again later`, error);
3380
3380
  throw error;
3381
3381
  });
3382
+ console.log("getAccountInfo resp:", accountInfo);
3382
3383
  return accountInfo;
3383
3384
  });
3384
3385
  }
@@ -3701,7 +3702,7 @@ import coinselect from "coinselect";
3701
3702
  import * as ecc from "@bitcoinerlab/secp256k1";
3702
3703
  bitcoin.initEccLib(ecc);
3703
3704
  var NEAR_STORAGE_DEPOSIT_AMOUNT = "1250000000000000000000";
3704
- var NBTC_STORAGE_DEPOSIT_AMOUNT = "3000";
3705
+ var NBTC_STORAGE_DEPOSIT_AMOUNT = "800";
3705
3706
  var NEW_ACCOUNT_MIN_DEPOSIT_AMOUNT = "1000";
3706
3707
  function getBtcProvider() {
3707
3708
  if (typeof window === "undefined" || !window.btcContext) {
@@ -4843,13 +4844,15 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
4843
4844
  const btcPublicKey = yield btcContext.getPublicKey();
4844
4845
  if (btcPublicKey) {
4845
4846
  yield getNearAccountByBtcPublicKey(btcPublicKey);
4846
- removeWalletButton();
4847
- setupWalletButton({
4848
- env,
4849
- nearWallet: wallet,
4850
- btcWallet: btcContext,
4851
- walletUrl: metadata.walletUrl
4852
- });
4847
+ if (!window.enableCustomWalletSelectorModal) {
4848
+ removeWalletButton();
4849
+ setupWalletButton({
4850
+ env,
4851
+ nearWallet: wallet,
4852
+ btcWallet: btcContext,
4853
+ walletUrl: metadata.walletUrl
4854
+ });
4855
+ }
4853
4856
  }
4854
4857
  } else {
4855
4858
  connectionUpdateTimeout = setTimeout(() => {
@@ -4942,7 +4945,9 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
4942
4945
  }
4943
4946
  state_default.clear();
4944
4947
  window.localStorage.removeItem("near-wallet-selector:selectedWalletId");
4945
- removeWalletButton();
4948
+ if (!window.enableCustomWalletSelectorModal) {
4949
+ removeWalletButton();
4950
+ }
4946
4951
  });
4947
4952
  }
4948
4953
  function isSignedIn() {
@@ -5113,14 +5118,15 @@ function setupWalletSelectorModal(selector, options) {
5113
5118
  const group = getGroup(state);
5114
5119
  subscription = selector.store.observable.subscribe((state2) => {
5115
5120
  const walletId = state2.selectedWalletId;
5121
+ window.enableCustomWalletSelectorModal = true;
5116
5122
  console.log("setupWalletSelectorModal walletId", walletId);
5117
- if (!walletId)
5118
- removeWalletButton();
5119
- if (showWalletUIForNearAccount && walletId !== "btc-wallet") {
5123
+ removeWalletButton();
5124
+ if (walletId === "btc-wallet" || showWalletUIForNearAccount) {
5120
5125
  selector.wallet().then((wallet) => {
5121
5126
  setupWalletButton({
5122
5127
  env,
5123
5128
  nearWallet: wallet,
5129
+ btcWallet: walletId === "btc-wallet" ? window.btcContext : void 0,
5124
5130
  walletUrl,
5125
5131
  draggable,
5126
5132
  initialPosition,
@@ -5218,7 +5224,7 @@ function getGroup(state) {
5218
5224
 
5219
5225
  // src/index.ts
5220
5226
  var getVersion = () => {
5221
- return "0.5.70-beta";
5227
+ return "0.5.72-beta";
5222
5228
  };
5223
5229
  if (typeof window !== "undefined") {
5224
5230
  window.__BTC_WALLET_VERSION = getVersion();