btc-wallet 0.3.8 → 0.3.10

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
@@ -3065,9 +3065,12 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
3065
3065
  accountId
3066
3066
  );
3067
3067
  const { transferGasTransaction, useNearPayGas } = yield getGasConfig();
3068
+ console.log("transferGasTransaction:", transferGasTransaction);
3069
+ console.log("useNearPayGas:", useNearPayGas);
3068
3070
  if (!useNearPayGas && transferGasTransaction) {
3069
3071
  params.transactions.unshift(transferGasTransaction);
3070
3072
  }
3073
+ console.log("raw transactions:", params.transactions);
3071
3074
  const newTransactions = params.transactions.map((transaction, index) => {
3072
3075
  let nearNonceNumber = accessKey.nonce + BigInt(1);
3073
3076
  if (nearNonceFromApi) {
@@ -3337,7 +3340,7 @@ function getBtcBalance() {
3337
3340
  const rawBalance = res == null ? void 0 : res.reduce((acc, cur) => acc + cur.value, 0);
3338
3341
  const balance = rawBalance / __pow(10, 8);
3339
3342
  const feeRate = yield getBtcGasPrice();
3340
- const maxGasFee = feeRate * 250 / __pow(10, 8);
3343
+ const maxGasFee = feeRate * 350 / __pow(10, 8);
3341
3344
  const availableBalance = Math.max(0, balance - maxGasFee);
3342
3345
  return {
3343
3346
  rawBalance,
@@ -3451,7 +3454,7 @@ function executeBTCDepositAndAction(_0) {
3451
3454
  btcPublicKey,
3452
3455
  txHash,
3453
3456
  postActions: JSON.stringify(depositMsg.post_actions),
3454
- extraMsg: depositMsg.extra_msg || ""
3457
+ extraMsg: depositMsg.extra_msg
3455
3458
  });
3456
3459
  const checkTransactionStatusRes = yield checkTransactionStatus(config.base_url, txHash);
3457
3460
  console.log("checkTransactionStatus resp:", checkTransactionStatusRes);
@@ -3465,7 +3468,7 @@ function executeBTCDepositAndAction(_0) {
3465
3468
 
3466
3469
  // src/index.ts
3467
3470
  var getVersion = () => {
3468
- return "0.3.8";
3471
+ return "0.3.10";
3469
3472
  };
3470
3473
  if (typeof window !== "undefined") {
3471
3474
  window.__PARTICLE_BTC_CONNECT_VERSION = getVersion();