Skip to content

Commit

Permalink
test: localOrchAccount.getBalance and localOrchAccount.getBalances
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpatrickdev committed Sep 4, 2024
1 parent ec68269 commit ed3037e
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions multichain-testing/test/account-balance-queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,17 @@ const queryAccountBalances = test.macro({
chainName
];
t.log(
icqEnabled
? 'ICQ Enabled expecting offer result.'
: 'ICQ Disabled expecting offer error',
chainName === 'agoric'
? 'Querying from Localchain, expecting offer result.'
: icqEnabled
? 'ICQ Enabled, expecting offer result.'
: 'ICQ Disabled, expecting offer error',
);

const {
status: { result, error },
} = offerResult;
if (icqEnabled) {
if (icqEnabled || chainName === 'agoric') {
t.is(error, undefined, 'No error observed for supported chain');
const balances = JSON.parse(result);
t.truthy(balances, 'Result is parsed successfully');
Expand Down Expand Up @@ -160,15 +162,17 @@ const queryAccountBalance = test.macro({
chainName
];
t.log(
icqEnabled
? 'ICQ Enabled, expecting offer result.'
: 'ICQ Disabled, expecting offer error',
chainName === 'agoric'
? 'Querying from Localchain, expecting offer result.'
: icqEnabled
? 'ICQ Enabled, expecting offer result.'
: 'ICQ Disabled, expecting offer error',
);

const {
status: { result, error },
} = offerResult;
if (icqEnabled) {
if (icqEnabled || chainName === 'agoric') {
t.is(error, undefined, 'No error observed for supported chain');
const parsedBalance = JSON.parse(result);
t.truthy(parsedBalance, 'Result is parsed successfully');
Expand All @@ -189,5 +193,7 @@ const queryAccountBalance = test.macro({

test.serial(queryAccountBalances, 'osmosis');
test.serial(queryAccountBalances, 'cosmoshub');
test.serial(queryAccountBalances, 'agoric');
test.serial(queryAccountBalance, 'osmosis');
test.serial(queryAccountBalance, 'cosmoshub');
test.serial(queryAccountBalance, 'agoric');

0 comments on commit ed3037e

Please sign in to comment.