|
1 | | -import {IAccount, IAsset, TAccountsResponse, TAssetsResponse, TLong} from '../interface'; |
2 | | -import { alias, data, lease, libs, nodeInteraction, setScript, transfer } from '@waves/waves-transactions'; |
| 1 | +import {IAccount, IAsset, TAccountsResponse, TLong} from '../interface'; |
| 2 | +import { alias, data, lease, libs, setScript, transfer } from '@waves/waves-transactions'; |
| 3 | +import { fetchBalanceDetails } from '@waves/node-api-js/cjs/api-node/addresses'; |
3 | 4 | import { ACCOUNT_SCRIPT, CHAIN_ID, DAP_SCRIPT, MASTER_ACCOUNT_SEED, NODE_URL } from '../constants'; |
4 | 5 | import { broadcastAndWait } from '../utils'; |
5 | 6 | import console from '../utils/console'; |
@@ -51,7 +52,7 @@ export default function <ASSETS extends Record<string, IAsset>, ACCOUNTS extends |
51 | 52 | await setLeasing(randomAddress, amount); |
52 | 53 | } |
53 | 54 |
|
54 | | - const { available } = await nodeInteraction.balanceDetails(address, NODE_URL); |
| 55 | + const { available } = await fetchBalanceDetails(NODE_URL, address); |
55 | 56 | const toSend = 100 * Math.pow(10, 8) - (+available); |
56 | 57 |
|
57 | 58 | await setBalance(address, toSend); |
|
0 commit comments