stargate: Update code for new codec

This commit is contained in:
willclarktech 2020-11-03 17:40:00 +01:00
parent c0eabee66a
commit 6afb8fbc2d
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7
3 changed files with 9 additions and 13 deletions

View File

@ -101,13 +101,13 @@ describe("IbcExtension", () => {
});
});
describe("unrelayedAcks", () => {
describe("unreceivedAcks", () => {
it("can be called", async () => {
pending("Fails with 'Query failed with (1): internal'. Make it work.");
pendingWithoutSimapp();
const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl);
const response = await client.ibc.unverified.unrelayedAcks("foo", "bar", [0, 1]);
const response = await client.ibc.unverified.unreceivedAcks("foo", "bar", [0, 1]);
expect(response).toBeTruthy(); // TODO: implement checks
tmClient.disconnect();

View File

@ -49,11 +49,11 @@ export interface IbcExtension {
channelId: string,
packetCommitmentSequences: readonly number[],
) => Promise<ibc.core.channel.v1.IQueryUnreceivedPacketsResponse>;
readonly unrelayedAcks: (
readonly unreceivedAcks: (
portId: string,
channelId: string,
packetCommitmentSequences: readonly number[],
) => Promise<ibc.core.channel.v1.IQueryUnrelayedAcksResponse>;
) => Promise<ibc.core.channel.v1.IQueryUnreceivedAcksResponse>;
readonly nextSequenceReceive: (
portId: string,
channelId: string,
@ -174,15 +174,11 @@ export function setupIbcExtension(base: QueryClient): IbcExtension {
});
return toObject(response);
},
unrelayedAcks: async (
portId: string,
channelId: string,
packetCommitmentSequences: readonly number[],
) => {
const response = await channelQuerySerice.unrelayedAcks({
unreceivedAcks: async (portId: string, channelId: string, packetAckSequences: readonly number[]) => {
const response = await channelQuerySerice.unreceivedAcks({
portId: portId,
channelId: channelId,
packetCommitmentSequences: packetCommitmentSequences.map((s) => Long.fromNumber(s)),
packetAckSequences: packetAckSequences.map((s) => Long.fromNumber(s)),
});
return toObject(response);
},

View File

@ -38,11 +38,11 @@ export interface IbcExtension {
channelId: string,
packetCommitmentSequences: readonly number[],
) => Promise<ibc.core.channel.v1.IQueryUnreceivedPacketsResponse>;
readonly unrelayedAcks: (
readonly unreceivedAcks: (
portId: string,
channelId: string,
packetCommitmentSequences: readonly number[],
) => Promise<ibc.core.channel.v1.IQueryUnrelayedAcksResponse>;
) => Promise<ibc.core.channel.v1.IQueryUnreceivedAcksResponse>;
readonly nextSequenceReceive: (
portId: string,
channelId: string,