Skip to content

Commit

Permalink
upd query call
Browse files Browse the repository at this point in the history
  • Loading branch information
quasisamurai committed Mar 15, 2023
1 parent dac05f6 commit f1dea85
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/helpers/icq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ export const getRegisteredQuery = (
connection_id: string;
update_period: number;
last_submitted_result_local_height: number;
last_submitted_result_remote_height: number;
last_submitted_result_remote_height: {
revision_number: number;
revision_height: number;
};
deposit: { denom: string; amount: string }[];
submit_timeout: number;
};
Expand All @@ -51,8 +54,8 @@ export const waitForICQResultWithRemoteHeight = (
cm.blockWaiter,
() => getRegisteredQuery(cm, contractAddress, queryId),
async (query) =>
query.registered_query.last_submitted_result_remote_height >=
targetHeight,
query.registered_query.last_submitted_result_remote_height
.revision_height >= targetHeight,
numAttempts,
);

Expand Down

0 comments on commit f1dea85

Please sign in to comment.