btc-wallet 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +1 -15
- package/dist/index.js.map +2 -2
- package/esm/index.js +1 -15
- package/esm/index.js.map +2 -2
- package/package.json +1 -1
package/esm/index.js
CHANGED
@@ -3027,18 +3027,8 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
|
|
3027
3027
|
near_transactions: newTransactions.map((t) => t.txHex),
|
3028
3028
|
gas_token: currentConfig.token,
|
3029
3029
|
gas_limit: "3000",
|
3030
|
-
use_near_pay_gas: false,
|
3031
3030
|
nonce
|
3032
3031
|
};
|
3033
|
-
const nearAccount = yield provider.query({
|
3034
|
-
request_type: "view_account",
|
3035
|
-
account_id: accountId,
|
3036
|
-
finality: "final"
|
3037
|
-
});
|
3038
|
-
const availableBalance = parseFloat(nearAccount.amount) / __pow(10, 24);
|
3039
|
-
if (availableBalance > 0.2) {
|
3040
|
-
intention.use_near_pay_gas = true;
|
3041
|
-
}
|
3042
3032
|
const strIntention = JSON.stringify(intention);
|
3043
3033
|
const signature = yield btcContext.signMessage(strIntention);
|
3044
3034
|
const result = yield uploadBTCTx(currentConfig.base_url, {
|
@@ -3061,10 +3051,6 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
|
|
3061
3051
|
const checkAndSetupWalletButton = () => {
|
3062
3052
|
const accountId = state.getAccount();
|
3063
3053
|
const btcContext = window.btcContext;
|
3064
|
-
console.log("checkAndSetupWalletButton:", {
|
3065
|
-
nearAccountId: accountId,
|
3066
|
-
btcAccountId: btcContext.account
|
3067
|
-
});
|
3068
3054
|
if (accountId && btcContext.account) {
|
3069
3055
|
setupWalletButton(network, wallet2, btcContext);
|
3070
3056
|
} else {
|
@@ -3272,7 +3258,7 @@ function executeBurrowSupply(_0) {
|
|
3272
3258
|
|
3273
3259
|
// src/index.ts
|
3274
3260
|
var getVersion = () => {
|
3275
|
-
return "0.3.
|
3261
|
+
return "0.3.3";
|
3276
3262
|
};
|
3277
3263
|
if (typeof window !== "undefined") {
|
3278
3264
|
window.__PARTICLE_BTC_CONNECT_VERSION = getVersion();
|