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/dist/core/setupModal.d.ts +5 -0
- package/dist/index.js +19 -13
- package/dist/index.js.map +2 -2
- package/esm/index.js +19 -13
- package/esm/index.js.map +2 -2
- package/package.json +1 -1
@@ -15,4 +15,9 @@ export interface WalletSelectorModalOptions extends _ModalOptions {
|
|
15
15
|
mobileButtonSize?: string;
|
16
16
|
}
|
17
17
|
export type WalletSelectorModal = _WalletSelectorModal;
|
18
|
+
declare global {
|
19
|
+
interface Window {
|
20
|
+
enableCustomWalletSelectorModal: boolean;
|
21
|
+
}
|
22
|
+
}
|
18
23
|
export declare function setupWalletSelectorModal(selector: WalletSelector, options: WalletSelectorModalOptions): _WalletSelectorModal;
|
package/dist/index.js
CHANGED
@@ -3450,6 +3450,7 @@ function getAccountInfo(_0) {
|
|
3450
3450
|
console.log(`get_account error, please try again later`, error);
|
3451
3451
|
throw error;
|
3452
3452
|
});
|
3453
|
+
console.log("getAccountInfo resp:", accountInfo);
|
3453
3454
|
return accountInfo;
|
3454
3455
|
});
|
3455
3456
|
}
|
@@ -3772,7 +3773,7 @@ var import_coinselect = __toESM(require("coinselect"), 1);
|
|
3772
3773
|
var ecc = __toESM(require("@bitcoinerlab/secp256k1"), 1);
|
3773
3774
|
bitcoin.initEccLib(ecc);
|
3774
3775
|
var NEAR_STORAGE_DEPOSIT_AMOUNT = "1250000000000000000000";
|
3775
|
-
var NBTC_STORAGE_DEPOSIT_AMOUNT = "
|
3776
|
+
var NBTC_STORAGE_DEPOSIT_AMOUNT = "800";
|
3776
3777
|
var NEW_ACCOUNT_MIN_DEPOSIT_AMOUNT = "1000";
|
3777
3778
|
function getBtcProvider() {
|
3778
3779
|
if (typeof window === "undefined" || !window.btcContext) {
|
@@ -4914,13 +4915,15 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
|
|
4914
4915
|
const btcPublicKey = yield btcContext.getPublicKey();
|
4915
4916
|
if (btcPublicKey) {
|
4916
4917
|
yield getNearAccountByBtcPublicKey(btcPublicKey);
|
4917
|
-
|
4918
|
-
|
4919
|
-
|
4920
|
-
|
4921
|
-
|
4922
|
-
|
4923
|
-
|
4918
|
+
if (!window.enableCustomWalletSelectorModal) {
|
4919
|
+
removeWalletButton();
|
4920
|
+
setupWalletButton({
|
4921
|
+
env,
|
4922
|
+
nearWallet: wallet,
|
4923
|
+
btcWallet: btcContext,
|
4924
|
+
walletUrl: metadata.walletUrl
|
4925
|
+
});
|
4926
|
+
}
|
4924
4927
|
}
|
4925
4928
|
} else {
|
4926
4929
|
connectionUpdateTimeout = setTimeout(() => {
|
@@ -5013,7 +5016,9 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
|
|
5013
5016
|
}
|
5014
5017
|
state_default.clear();
|
5015
5018
|
window.localStorage.removeItem("near-wallet-selector:selectedWalletId");
|
5016
|
-
|
5019
|
+
if (!window.enableCustomWalletSelectorModal) {
|
5020
|
+
removeWalletButton();
|
5021
|
+
}
|
5017
5022
|
});
|
5018
5023
|
}
|
5019
5024
|
function isSignedIn() {
|
@@ -5182,14 +5187,15 @@ function setupWalletSelectorModal(selector, options) {
|
|
5182
5187
|
const group = getGroup(state);
|
5183
5188
|
subscription = selector.store.observable.subscribe((state2) => {
|
5184
5189
|
const walletId = state2.selectedWalletId;
|
5190
|
+
window.enableCustomWalletSelectorModal = true;
|
5185
5191
|
console.log("setupWalletSelectorModal walletId", walletId);
|
5186
|
-
|
5187
|
-
|
5188
|
-
if (showWalletUIForNearAccount && walletId !== "btc-wallet") {
|
5192
|
+
removeWalletButton();
|
5193
|
+
if (walletId === "btc-wallet" || showWalletUIForNearAccount) {
|
5189
5194
|
selector.wallet().then((wallet) => {
|
5190
5195
|
setupWalletButton({
|
5191
5196
|
env,
|
5192
5197
|
nearWallet: wallet,
|
5198
|
+
btcWallet: walletId === "btc-wallet" ? window.btcContext : void 0,
|
5193
5199
|
walletUrl,
|
5194
5200
|
draggable,
|
5195
5201
|
initialPosition,
|
@@ -5287,7 +5293,7 @@ function getGroup(state) {
|
|
5287
5293
|
|
5288
5294
|
// src/index.ts
|
5289
5295
|
var getVersion = () => {
|
5290
|
-
return "0.5.
|
5296
|
+
return "0.5.72-beta";
|
5291
5297
|
};
|
5292
5298
|
if (typeof window !== "undefined") {
|
5293
5299
|
window.__BTC_WALLET_VERSION = getVersion();
|