mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 22:37:57 +00:00
Bridge zombienet tests: Check amount received at destination (#3490)
Related to https://github.com/paritytech/polkadot-sdk/issues/3475
This commit is contained in:
@@ -3,12 +3,13 @@ async function run(nodeName, networkInfo, args) {
|
||||
const api = await zombie.connect(wsUri, userDefinedTypes);
|
||||
|
||||
const accountAddress = args[0];
|
||||
const expectedIncrease = BigInt(args[1]);
|
||||
const initialAccountData = await api.query.system.account(accountAddress);
|
||||
const initialAccountBalance = initialAccountData.data['free'];
|
||||
while (true) {
|
||||
const accountData = await api.query.system.account(accountAddress);
|
||||
const accountBalance = accountData.data['free'];
|
||||
if (accountBalance > initialAccountBalance) {
|
||||
if (accountBalance > initialAccountBalance + expectedIncrease) {
|
||||
return accountBalance;
|
||||
}
|
||||
|
||||
@@ -17,4 +18,4 @@ async function run(nodeName, networkInfo, args) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { run }
|
||||
module.exports = {run}
|
||||
|
||||
Reference in New Issue
Block a user