btc-wallet 0.5.70-beta → 0.5.71-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
@@ -4843,13 +4843,15 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
4843
4843
  const btcPublicKey = yield btcContext.getPublicKey();
4844
4844
  if (btcPublicKey) {
4845
4845
  yield getNearAccountByBtcPublicKey(btcPublicKey);
4846
- removeWalletButton();
4847
- setupWalletButton({
4848
- env,
4849
- nearWallet: wallet,
4850
- btcWallet: btcContext,
4851
- walletUrl: metadata.walletUrl
4852
- });
4846
+ if (!window.enableCustomWalletSelectorModal) {
4847
+ removeWalletButton();
4848
+ setupWalletButton({
4849
+ env,
4850
+ nearWallet: wallet,
4851
+ btcWallet: btcContext,
4852
+ walletUrl: metadata.walletUrl
4853
+ });
4854
+ }
4853
4855
  }
4854
4856
  } else {
4855
4857
  connectionUpdateTimeout = setTimeout(() => {
@@ -4942,7 +4944,9 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
4942
4944
  }
4943
4945
  state_default.clear();
4944
4946
  window.localStorage.removeItem("near-wallet-selector:selectedWalletId");
4945
- removeWalletButton();
4947
+ if (!window.enableCustomWalletSelectorModal) {
4948
+ removeWalletButton();
4949
+ }
4946
4950
  });
4947
4951
  }
4948
4952
  function isSignedIn() {
@@ -5113,14 +5117,15 @@ function setupWalletSelectorModal(selector, options) {
5113
5117
  const group = getGroup(state);
5114
5118
  subscription = selector.store.observable.subscribe((state2) => {
5115
5119
  const walletId = state2.selectedWalletId;
5120
+ window.enableCustomWalletSelectorModal = true;
5116
5121
  console.log("setupWalletSelectorModal walletId", walletId);
5117
- if (!walletId)
5118
- removeWalletButton();
5119
- if (showWalletUIForNearAccount && walletId !== "btc-wallet") {
5122
+ removeWalletButton();
5123
+ if (walletId === "btc-wallet" || showWalletUIForNearAccount) {
5120
5124
  selector.wallet().then((wallet) => {
5121
5125
  setupWalletButton({
5122
5126
  env,
5123
5127
  nearWallet: wallet,
5128
+ btcWallet: walletId === "btc-wallet" ? window.btcContext : void 0,
5124
5129
  walletUrl,
5125
5130
  draggable,
5126
5131
  initialPosition,
@@ -5218,7 +5223,7 @@ function getGroup(state) {
5218
5223
 
5219
5224
  // src/index.ts
5220
5225
  var getVersion = () => {
5221
- return "0.5.70-beta";
5226
+ return "0.5.71-beta";
5222
5227
  };
5223
5228
  if (typeof window !== "undefined") {
5224
5229
  window.__BTC_WALLET_VERSION = getVersion();