btc-wallet 0.5.29-beta → 0.5.31-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/index.js CHANGED
@@ -3838,13 +3838,12 @@ function calculateWithdraw(_0) {
3838
3838
  }
3839
3839
 
3840
3840
  // src/core/btcUtils.ts
3841
- var import_bitcoinjs_lib = __toESM(require("bitcoinjs-lib"), 1);
3841
+ var bitcoin = __toESM(require("bitcoinjs-lib"), 1);
3842
3842
  var import_coinselect2 = __toESM(require("coinselect"), 1);
3843
3843
  var ecc = __toESM(require("@bitcoinerlab/secp256k1"), 1);
3844
- import_bitcoinjs_lib.default.initEccLib(ecc);
3844
+ bitcoin.initEccLib(ecc);
3845
3845
  var NEAR_STORAGE_DEPOSIT_AMOUNT = "1250000000000000000000";
3846
3846
  var NBTC_STORAGE_DEPOSIT_AMOUNT = "3000";
3847
- var GAS_LIMIT = "50000000000000";
3848
3847
  var NEW_ACCOUNT_MIN_DEPOSIT_AMOUNT = "1000";
3849
3848
  function getBtcProvider() {
3850
3849
  if (typeof window === "undefined" || !window.btcContext) {
@@ -4068,12 +4067,12 @@ function executeBTCDepositAndAction(_0) {
4068
4067
  const debtAction = yield checkGasTokenDebt(csna, env, false);
4069
4068
  if (debtAction) {
4070
4069
  newActions.push(__spreadProps(__spreadValues({}, debtAction), {
4071
- gas: GAS_LIMIT
4070
+ gas: "30000000000000"
4072
4071
  }));
4073
4072
  }
4074
4073
  if (action) {
4075
4074
  newActions.push(__spreadProps(__spreadValues({}, action), {
4076
- gas: GAS_LIMIT
4075
+ gas: "100000000000000"
4077
4076
  }));
4078
4077
  }
4079
4078
  const storageDepositMsg = {};
@@ -4203,8 +4202,8 @@ function getWithdrawTransaction(_0) {
4203
4202
  `(${inputs.map((item) => item.value).join(" + ")}) - (${outputs.map((item) => item.value).join(" + ")}) = ${gasFee}`
4204
4203
  );
4205
4204
  const network = yield getNetwork();
4206
- const btcNetwork = network === "mainnet" ? import_bitcoinjs_lib.default.networks.bitcoin : import_bitcoinjs_lib.default.networks.testnet;
4207
- const psbt = new import_bitcoinjs_lib.default.Psbt({ network: btcNetwork });
4205
+ const btcNetwork = network === "mainnet" ? bitcoin.networks.bitcoin : bitcoin.networks.testnet;
4206
+ const psbt = new bitcoin.Psbt({ network: btcNetwork });
4208
4207
  const btcRpcUrl = yield getBtcRpcUrl();
4209
4208
  yield Promise.all(
4210
4209
  inputs.map((input) => __async(this, null, function* () {
@@ -4906,7 +4905,7 @@ function getGroup(state) {
4906
4905
 
4907
4906
  // src/index.ts
4908
4907
  var getVersion = () => {
4909
- return "0.5.29-beta";
4908
+ return "0.5.31-beta";
4910
4909
  };
4911
4910
  if (typeof window !== "undefined") {
4912
4911
  window.__BTC_WALLET_VERSION = getVersion();