Bridge zombienet tests: Check amount received at destination (#3490)

Related to https://github.com/paritytech/polkadot-sdk/issues/3475
This commit is contained in:
Serban Iorga
2024-02-27 14:16:23 +01:00
committed by GitHub
parent 94c54d5032
commit 2cdda0e62d
6 changed files with 27 additions and 22 deletions
@@ -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}