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/dist/index.js
CHANGED
@@ -24,18 +24,6 @@ var __spreadValues = (a, b) => {
|
|
24
24
|
return a;
|
25
25
|
};
|
26
26
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
27
|
-
var __objRest = (source, exclude) => {
|
28
|
-
var target = {};
|
29
|
-
for (var prop in source)
|
30
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
31
|
-
target[prop] = source[prop];
|
32
|
-
if (source != null && __getOwnPropSymbols)
|
33
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
34
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
35
|
-
target[prop] = source[prop];
|
36
|
-
}
|
37
|
-
return target;
|
38
|
-
};
|
39
27
|
var __export = (target, all) => {
|
40
28
|
for (var name in all)
|
41
29
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -4196,13 +4184,13 @@ function getWithdrawTransaction(_0) {
|
|
4196
4184
|
const config = getWalletConfig(env);
|
4197
4185
|
const _btcAddress = btcAddress || getBtcProvider().account;
|
4198
4186
|
const _csna = csna || (yield getCsnaAccountId(env));
|
4199
|
-
const
|
4187
|
+
const { inputs, outputs, isError, errorMsg, fromAmount, gasFee } = yield calculateWithdraw({
|
4200
4188
|
amount,
|
4201
4189
|
feeRate,
|
4202
4190
|
csna: _csna,
|
4203
4191
|
btcAddress: _btcAddress,
|
4204
4192
|
env
|
4205
|
-
})
|
4193
|
+
});
|
4206
4194
|
if (isError || !inputs || !outputs) {
|
4207
4195
|
throw new Error(errorMsg);
|
4208
4196
|
}
|
@@ -4210,7 +4198,7 @@ function getWithdrawTransaction(_0) {
|
|
4210
4198
|
console.log("outputs:", JSON.stringify(outputs));
|
4211
4199
|
console.log("inputs - outputs = gas");
|
4212
4200
|
console.log(
|
4213
|
-
`(${inputs.map((item) => item.value).join(" + ")}) - (${outputs.map((item) => item.value).join(" + ")}) = ${
|
4201
|
+
`(${inputs.map((item) => item.value).join(" + ")}) - (${outputs.map((item) => item.value).join(" + ")}) = ${gasFee}`
|
4214
4202
|
);
|
4215
4203
|
const network = yield getNetwork();
|
4216
4204
|
const btcNetwork = network === "mainnet" ? import_bitcoinjs_lib.default.networks.bitcoin : import_bitcoinjs_lib.default.networks.testnet;
|
@@ -4263,7 +4251,7 @@ function getWithdrawTransaction(_0) {
|
|
4263
4251
|
methodName: "ft_transfer_call",
|
4264
4252
|
args: {
|
4265
4253
|
receiver_id: config.bridgeContractId,
|
4266
|
-
amount:
|
4254
|
+
amount: fromAmount,
|
4267
4255
|
msg: JSON.stringify(msg)
|
4268
4256
|
},
|
4269
4257
|
gas: "300000000000000",
|
@@ -4909,7 +4897,7 @@ function getGroup(state) {
|
|
4909
4897
|
|
4910
4898
|
// src/index.ts
|
4911
4899
|
var getVersion = () => {
|
4912
|
-
return "0.5.
|
4900
|
+
return "0.5.28-beta";
|
4913
4901
|
};
|
4914
4902
|
if (typeof window !== "undefined") {
|
4915
4903
|
window.__BTC_WALLET_VERSION = getVersion();
|