Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion src/testcases/run_in_band/interchain_kv_query.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ describe('Neutron / Interchain KV Query', () => {
4: 3,
5: 4,
6: 11,
7: 50,
};
let testState: LocalState;
let neutronClient: SigningNeutronClient;
Expand Down Expand Up @@ -351,6 +352,19 @@ describe('Neutron / Interchain KV Query', () => {
testState.wallets.cosmos.val1.address,
);
});

test('register icq #7: balance', async () => {
const height = (await neutronClient.getHeight()) + updatePeriods[7];

await registerBalancesQuery(
neutronClient,
contractAddress,
connectionId,
height,
[COSMOS_DENOM],
testState.wallets.cosmos.val1.address,
);
});
});
});

Expand Down Expand Up @@ -462,8 +476,24 @@ describe('Neutron / Interchain KV Query', () => {
);
});

test("registered icq #7 doesn't exist", async () => {
test('get registered icq #7: balance', async () => {
const queryId = 7;
const queryResult = await getRegisteredQuery(
neutronClient,
contractAddress,
queryId,
);

expect(
queryResult.registered_query.last_submitted_result_local_height,
).greaterThan(0);
expect(
queryResult.registered_query.last_submitted_result_local_height,
).lessThan(queryResult.registered_query.update_period);
});

test("registered icq #8 doesn't exist", async () => {
const queryId = 8;
await expect(
getRegisteredQuery(neutronClient, contractAddress, queryId),
).rejects.toThrow();
Expand Down
Loading