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/esm/index.js
CHANGED
@@ -4241,7 +4241,26 @@ function calculateWithdraw(_0) {
|
|
4241
4241
|
satoshis = new Big2(amount).minus(gasLimit).toNumber();
|
4242
4242
|
}
|
4243
4243
|
const brgConfig = yield getBridgeConfig({ env });
|
4244
|
-
const
|
4244
|
+
const { current_utxos_num } = yield nearCallFunction(
|
4245
|
+
config.bridgeContractId,
|
4246
|
+
"get_metadata",
|
4247
|
+
{},
|
4248
|
+
{ network: config.network }
|
4249
|
+
);
|
4250
|
+
const pageSize = 300;
|
4251
|
+
const totalPages = Math.ceil(current_utxos_num / pageSize);
|
4252
|
+
const utxoRequests = Array.from({ length: totalPages }, (_, index) => {
|
4253
|
+
const fromIndex = index * pageSize;
|
4254
|
+
const limit = Math.min(pageSize, current_utxos_num - fromIndex);
|
4255
|
+
return nearCallFunction(
|
4256
|
+
config.bridgeContractId,
|
4257
|
+
"get_utxos_paged",
|
4258
|
+
{ from_index: fromIndex, limit },
|
4259
|
+
{ network: config.network }
|
4260
|
+
);
|
4261
|
+
});
|
4262
|
+
const utxoResults = yield Promise.all(utxoRequests);
|
4263
|
+
const allUTXO = utxoResults.reduce((acc, result) => __spreadValues(__spreadValues({}, acc), result), {});
|
4245
4264
|
if (brgConfig.min_withdraw_amount) {
|
4246
4265
|
if (Number(satoshis) < Number(brgConfig.min_withdraw_amount)) {
|
4247
4266
|
return {
|
@@ -5250,7 +5269,7 @@ function getGroup(state) {
|
|
5250
5269
|
|
5251
5270
|
// src/index.ts
|
5252
5271
|
var getVersion = () => {
|
5253
|
-
return "0.5.
|
5272
|
+
return "0.5.77-beta";
|
5254
5273
|
};
|
5255
5274
|
if (typeof window !== "undefined") {
|
5256
5275
|
window.__BTC_WALLET_VERSION = getVersion();
|