btc-wallet 0.5.27-beta → 0.5.28-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 +5 -17
- package/dist/index.js.map +2 -2
- package/esm/index.js +5 -17
- package/esm/index.js.map +2 -2
- package/package.json +1 -1
package/esm/index.js
CHANGED
@@ -19,18 +19,6 @@ var __spreadValues = (a, b) => {
|
|
19
19
|
return a;
|
20
20
|
};
|
21
21
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
22
|
-
var __objRest = (source, exclude) => {
|
23
|
-
var target = {};
|
24
|
-
for (var prop in source)
|
25
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
26
|
-
target[prop] = source[prop];
|
27
|
-
if (source != null && __getOwnPropSymbols)
|
28
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
29
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
30
|
-
target[prop] = source[prop];
|
31
|
-
}
|
32
|
-
return target;
|
33
|
-
};
|
34
22
|
var __accessCheck = (obj, member, msg) => {
|
35
23
|
if (!member.has(obj))
|
36
24
|
throw TypeError("Cannot " + msg);
|
@@ -4127,13 +4115,13 @@ function getWithdrawTransaction(_0) {
|
|
4127
4115
|
const config = getWalletConfig(env);
|
4128
4116
|
const _btcAddress = btcAddress || getBtcProvider().account;
|
4129
4117
|
const _csna = csna || (yield getCsnaAccountId(env));
|
4130
|
-
const
|
4118
|
+
const { inputs, outputs, isError, errorMsg, fromAmount, gasFee } = yield calculateWithdraw({
|
4131
4119
|
amount,
|
4132
4120
|
feeRate,
|
4133
4121
|
csna: _csna,
|
4134
4122
|
btcAddress: _btcAddress,
|
4135
4123
|
env
|
4136
|
-
})
|
4124
|
+
});
|
4137
4125
|
if (isError || !inputs || !outputs) {
|
4138
4126
|
throw new Error(errorMsg);
|
4139
4127
|
}
|
@@ -4141,7 +4129,7 @@ function getWithdrawTransaction(_0) {
|
|
4141
4129
|
console.log("outputs:", JSON.stringify(outputs));
|
4142
4130
|
console.log("inputs - outputs = gas");
|
4143
4131
|
console.log(
|
4144
|
-
`(${inputs.map((item) => item.value).join(" + ")}) - (${outputs.map((item) => item.value).join(" + ")}) = ${
|
4132
|
+
`(${inputs.map((item) => item.value).join(" + ")}) - (${outputs.map((item) => item.value).join(" + ")}) = ${gasFee}`
|
4145
4133
|
);
|
4146
4134
|
const network = yield getNetwork();
|
4147
4135
|
const btcNetwork = network === "mainnet" ? bitcoin.networks.bitcoin : bitcoin.networks.testnet;
|
@@ -4194,7 +4182,7 @@ function getWithdrawTransaction(_0) {
|
|
4194
4182
|
methodName: "ft_transfer_call",
|
4195
4183
|
args: {
|
4196
4184
|
receiver_id: config.bridgeContractId,
|
4197
|
-
amount:
|
4185
|
+
amount: fromAmount,
|
4198
4186
|
msg: JSON.stringify(msg)
|
4199
4187
|
},
|
4200
4188
|
gas: "300000000000000",
|
@@ -4842,7 +4830,7 @@ function getGroup(state) {
|
|
4842
4830
|
|
4843
4831
|
// src/index.ts
|
4844
4832
|
var getVersion = () => {
|
4845
|
-
return "0.5.
|
4833
|
+
return "0.5.28-beta";
|
4846
4834
|
};
|
4847
4835
|
if (typeof window !== "undefined") {
|
4848
4836
|
window.__BTC_WALLET_VERSION = getVersion();
|