btc-wallet 0.3.8 → 0.3.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +6 -3
- package/dist/index.js.map +2 -2
- package/esm/index.js +6 -3
- package/esm/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -3105,9 +3105,12 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
|
|
3105
3105
|
accountId
|
3106
3106
|
);
|
3107
3107
|
const { transferGasTransaction, useNearPayGas } = yield getGasConfig();
|
3108
|
+
console.log("transferGasTransaction:", transferGasTransaction);
|
3109
|
+
console.log("useNearPayGas:", useNearPayGas);
|
3108
3110
|
if (!useNearPayGas && transferGasTransaction) {
|
3109
3111
|
params.transactions.unshift(transferGasTransaction);
|
3110
3112
|
}
|
3113
|
+
console.log("raw transactions:", params.transactions);
|
3111
3114
|
const newTransactions = params.transactions.map((transaction, index) => {
|
3112
3115
|
let nearNonceNumber = accessKey.nonce + BigInt(1);
|
3113
3116
|
if (nearNonceFromApi) {
|
@@ -3377,7 +3380,7 @@ function getBtcBalance() {
|
|
3377
3380
|
const rawBalance = res == null ? void 0 : res.reduce((acc, cur) => acc + cur.value, 0);
|
3378
3381
|
const balance = rawBalance / __pow(10, 8);
|
3379
3382
|
const feeRate = yield getBtcGasPrice();
|
3380
|
-
const maxGasFee = feeRate *
|
3383
|
+
const maxGasFee = feeRate * 350 / __pow(10, 8);
|
3381
3384
|
const availableBalance = Math.max(0, balance - maxGasFee);
|
3382
3385
|
return {
|
3383
3386
|
rawBalance,
|
@@ -3491,7 +3494,7 @@ function executeBTCDepositAndAction(_0) {
|
|
3491
3494
|
btcPublicKey,
|
3492
3495
|
txHash,
|
3493
3496
|
postActions: JSON.stringify(depositMsg.post_actions),
|
3494
|
-
extraMsg: depositMsg.extra_msg
|
3497
|
+
extraMsg: depositMsg.extra_msg
|
3495
3498
|
});
|
3496
3499
|
const checkTransactionStatusRes = yield checkTransactionStatus(config.base_url, txHash);
|
3497
3500
|
console.log("checkTransactionStatus resp:", checkTransactionStatusRes);
|
@@ -3505,7 +3508,7 @@ function executeBTCDepositAndAction(_0) {
|
|
3505
3508
|
|
3506
3509
|
// src/index.ts
|
3507
3510
|
var getVersion = () => {
|
3508
|
-
return "0.3.
|
3511
|
+
return "0.3.10";
|
3509
3512
|
};
|
3510
3513
|
if (typeof window !== "undefined") {
|
3511
3514
|
window.__PARTICLE_BTC_CONNECT_VERSION = getVersion();
|