mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-17 16:16:09 +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:
1 parent
94c54d5032
commit
2cdda0e62d
6 files changed
+27
-22
No files matched your search
@@ -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