btc-wallet 0.5.7-beta → 0.5.9-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 +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
@@ -3413,7 +3413,7 @@ function checkDepositDisabledAddress() {
|
|
3413
3413
|
return;
|
3414
3414
|
const addresses = JSON.parse(data);
|
3415
3415
|
const address = addresses == null ? void 0 : addresses[0];
|
3416
|
-
if (address.walletType === "ledger" &&
|
3416
|
+
if (address.walletType === "ledger" && !["p2wpkh", "p2sh"].includes(address.addressType)) {
|
3417
3417
|
throw new Error("Ledger is only supported for p2wpkh and p2sh address");
|
3418
3418
|
}
|
3419
3419
|
}
|
@@ -4221,7 +4221,7 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
|
|
4221
4221
|
const accountInfo = yield getAccountInfo(accountId, currentConfig.accountContractId);
|
4222
4222
|
yield checkGasTokenDebt(accountInfo, env, true);
|
4223
4223
|
const trans = [...params.transactions];
|
4224
|
-
console.log("raw trans:", trans);
|
4224
|
+
console.log("signAndSendTransactions raw trans:", trans);
|
4225
4225
|
const gasTokenBalance = (accountInfo == null ? void 0 : accountInfo.gas_token[currentConfig.token]) || "0";
|
4226
4226
|
const { transferGasTransaction, useNearPayGas, gasLimit } = yield calculateGasStrategy(
|
4227
4227
|
gasTokenBalance,
|
@@ -4430,11 +4430,14 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
|
|
4430
4430
|
newActions,
|
4431
4431
|
(0, import_utils10.baseDecode)(header.hash)
|
4432
4432
|
);
|
4433
|
+
console.log("convertTransactionToTxHex transaction:", _transaction);
|
4433
4434
|
const txBytes = (0, import_transaction.encodeTransaction)(_transaction);
|
4434
4435
|
const txHex = Array.from(txBytes, (byte) => ("0" + (byte & 255).toString(16)).slice(-2)).join(
|
4435
4436
|
""
|
4436
4437
|
);
|
4438
|
+
console.log("convertTransactionToTxHex txHex:", txHex);
|
4437
4439
|
const hash = import_bs58.default.encode(new Uint8Array(import_js_sha256.sha256.array(txBytes)));
|
4440
|
+
console.log("convertTransactionToTxHex hash:", hash);
|
4438
4441
|
return { txBytes, txHex, hash };
|
4439
4442
|
});
|
4440
4443
|
}
|
@@ -4486,7 +4489,7 @@ function setupBTCWallet({
|
|
4486
4489
|
|
4487
4490
|
// src/index.ts
|
4488
4491
|
var getVersion = () => {
|
4489
|
-
return "0.5.
|
4492
|
+
return "0.5.9-beta";
|
4490
4493
|
};
|
4491
4494
|
if (typeof window !== "undefined") {
|
4492
4495
|
window.__BTC_WALLET_VERSION = getVersion();
|