btc-wallet 0.5.9-beta → 0.5.11-beta

Sign up to get free protection for your applications and to get access to all the features.
package/esm/index.js CHANGED
@@ -441,24 +441,6 @@ var InjectedConnector = class extends BaseConnector {
441
441
  return accounts;
442
442
  });
443
443
  }
444
- getUniversalLink(url) {
445
- url = "https://www.deltatrade.ai/";
446
- console.log(this.metadata.id);
447
- switch (this.metadata.id) {
448
- case "unisat":
449
- return `unisat://dapp?url=${encodeURIComponent(url)}`;
450
- case "okx":
451
- return `okx://wallet/dapp/url?dappUrl=${encodeURIComponent(url)}`;
452
- case "bitget":
453
- return `https://bkcode.vip?action=dapp&url=${encodeURIComponent(url)}`;
454
- case "binance":
455
- return `binance://dapp?url=${encodeURIComponent(url)}`;
456
- case "xverse":
457
- return `https://connect.xverse.app/browser?url=${encodeURIComponent(url)}`;
458
- default:
459
- return url;
460
- }
461
- }
462
444
  getAccounts() {
463
445
  return __async(this, null, function* () {
464
446
  const accounts = yield this.getProviderOrThrow().getAccounts();
@@ -737,18 +719,10 @@ var XverseConnector = class extends BaseConnector {
737
719
  message: signStr,
738
720
  protocol: "ECDSA"
739
721
  });
740
- const modifiedSig = Buffer.from(result.signature, "base64");
741
722
  console.log("xverse walletType", address.walletType);
742
- console.log("xverse raw sig", result.signature, modifiedSig.toString("base64"));
743
- if (address.walletType === "ledger") {
744
- if (address.addressType === "p2wpkh") {
745
- modifiedSig[0] = 31 + (modifiedSig[0] - 39);
746
- } else if (address.addressType === "p2sh") {
747
- modifiedSig[0] = 31 + (modifiedSig[0] - 35);
748
- }
749
- } else {
750
- modifiedSig[0] = 31 + (modifiedSig[0] - 31) % 4;
751
- }
723
+ console.log("xverse raw sig", result.signature);
724
+ const modifiedSig = Buffer.from(result.signature, "base64");
725
+ modifiedSig[0] = 31 + (modifiedSig[0] - 31) % 4;
752
726
  const sig = modifiedSig.toString("base64");
753
727
  console.log("xverse modified sig", sig);
754
728
  return sig;
@@ -4380,14 +4354,11 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
4380
4354
  newActions,
4381
4355
  baseDecode(header.hash)
4382
4356
  );
4383
- console.log("convertTransactionToTxHex transaction:", _transaction);
4384
4357
  const txBytes = encodeTransaction(_transaction);
4385
4358
  const txHex = Array.from(txBytes, (byte) => ("0" + (byte & 255).toString(16)).slice(-2)).join(
4386
4359
  ""
4387
4360
  );
4388
- console.log("convertTransactionToTxHex txHex:", txHex);
4389
4361
  const hash = bs58.encode(new Uint8Array(sha256.array(txBytes)));
4390
- console.log("convertTransactionToTxHex hash:", hash);
4391
4362
  return { txBytes, txHex, hash };
4392
4363
  });
4393
4364
  }
@@ -4439,7 +4410,7 @@ function setupBTCWallet({
4439
4410
 
4440
4411
  // src/index.ts
4441
4412
  var getVersion = () => {
4442
- return "0.5.9-beta";
4413
+ return "0.5.11-beta";
4443
4414
  };
4444
4415
  if (typeof window !== "undefined") {
4445
4416
  window.__BTC_WALLET_VERSION = getVersion();