btc-wallet 0.3.31 → 0.3.32

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -1392,6 +1392,14 @@ function retryOperation(_0, _1) {
1392
1392
  throw new Error("Unexpected execution path");
1393
1393
  });
1394
1394
  }
1395
+ function toHex(originalString) {
1396
+ const charArray = originalString.split("");
1397
+ const asciiArray = charArray.map((char) => char.charCodeAt(0));
1398
+ const hexArray = asciiArray.map((code) => code.toString(16));
1399
+ let hexString = hexArray.join("");
1400
+ hexString = hexString.replace(/(^0+)/g, "");
1401
+ return hexString;
1402
+ }
1395
1403
 
1396
1404
  // src/utils/ethereumUtils.ts
1397
1405
  var import_util2 = require("@ethereumjs/util");
@@ -3025,7 +3033,7 @@ function checkBridgeTransactionStatus(url, txHash) {
3025
3033
  }
3026
3034
  function checkBtcTransactionStatus(url, sig) {
3027
3035
  return __async(this, null, function* () {
3028
- const { result_code, result_message, result_data } = yield request(`${url}/v1/btcTx?sig=${sig}`, {
3036
+ const { result_code, result_message, result_data } = yield request(`${url}/v1/btcTx?sig=${toHex(sig)}`, {
3029
3037
  timeout: 3e5,
3030
3038
  pollingInterval: 5e3,
3031
3039
  maxPollingAttempts: 60,
@@ -3959,14 +3967,6 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
3959
3967
  }
3960
3968
  return wallet;
3961
3969
  });
3962
- function toHex(originalString) {
3963
- const charArray = originalString.split("");
3964
- const asciiArray = charArray.map((char) => char.charCodeAt(0));
3965
- const hexArray = asciiArray.map((code) => code.toString(16));
3966
- let hexString = hexArray.join("");
3967
- hexString = hexString.replace(/(^0+)/g, "");
3968
- return hexString;
3969
- }
3970
3970
  function setupBTCWallet({
3971
3971
  iconUrl = "https://assets.deltatrade.ai/assets/chain/btc.svg",
3972
3972
  deprecated = false,
@@ -3998,7 +3998,7 @@ function setupBTCWallet({
3998
3998
 
3999
3999
  // src/index.ts
4000
4000
  var getVersion = () => {
4001
- return "0.3.31";
4001
+ return "0.3.32";
4002
4002
  };
4003
4003
  if (typeof window !== "undefined") {
4004
4004
  window.__BTC_WALLET_VERSION = getVersion();