btc-wallet 0.5.76-beta → 0.5.77-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 +21 -2
- package/dist/index.js.map +2 -2
- package/esm/index.js +21 -2
- package/esm/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -4313,7 +4313,26 @@ function calculateWithdraw(_0) {
|
|
4313
4313
|
satoshis = new import_big2.default(amount).minus(gasLimit).toNumber();
|
4314
4314
|
}
|
4315
4315
|
const brgConfig = yield getBridgeConfig({ env });
|
4316
|
-
const
|
4316
|
+
const { current_utxos_num } = yield nearCallFunction(
|
4317
|
+
config.bridgeContractId,
|
4318
|
+
"get_metadata",
|
4319
|
+
{},
|
4320
|
+
{ network: config.network }
|
4321
|
+
);
|
4322
|
+
const pageSize = 300;
|
4323
|
+
const totalPages = Math.ceil(current_utxos_num / pageSize);
|
4324
|
+
const utxoRequests = Array.from({ length: totalPages }, (_, index) => {
|
4325
|
+
const fromIndex = index * pageSize;
|
4326
|
+
const limit = Math.min(pageSize, current_utxos_num - fromIndex);
|
4327
|
+
return nearCallFunction(
|
4328
|
+
config.bridgeContractId,
|
4329
|
+
"get_utxos_paged",
|
4330
|
+
{ from_index: fromIndex, limit },
|
4331
|
+
{ network: config.network }
|
4332
|
+
);
|
4333
|
+
});
|
4334
|
+
const utxoResults = yield Promise.all(utxoRequests);
|
4335
|
+
const allUTXO = utxoResults.reduce((acc, result) => __spreadValues(__spreadValues({}, acc), result), {});
|
4317
4336
|
if (brgConfig.min_withdraw_amount) {
|
4318
4337
|
if (Number(satoshis) < Number(brgConfig.min_withdraw_amount)) {
|
4319
4338
|
return {
|
@@ -5320,7 +5339,7 @@ function getGroup(state) {
|
|
5320
5339
|
|
5321
5340
|
// src/index.ts
|
5322
5341
|
var getVersion = () => {
|
5323
|
-
return "0.5.
|
5342
|
+
return "0.5.77-beta";
|
5324
5343
|
};
|
5325
5344
|
if (typeof window !== "undefined") {
|
5326
5345
|
window.__BTC_WALLET_VERSION = getVersion();
|