Skip to content

Commit

Permalink
change fields for failure struct check
Browse files Browse the repository at this point in the history
  • Loading branch information
NeverHappened committed Aug 18, 2023
1 parent c25cb02 commit 625b035
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/helpers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ export type AckFailuresResponse = {
type Failure = {
address: string;
id: string;
sequence_id: string;
ack: {
result: string | null; // base64 encoded bytes
error: string | null; // error text
response: {
result: string | null; // base64 encoded bytes
error: string | null; // error text
};
};
ack_type: string;
packet: {
Expand Down
10 changes: 5 additions & 5 deletions src/testcases/run_in_band/interchaintx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -769,41 +769,41 @@ describe('Neutron / Interchain TXs', () => {
// 3 ack failures, 1 timeout failure, just as described in the tests above
expect(failures.failures).toEqual([
expect.objectContaining({
channel_id: 'channel-3',
address:
'neutron1m0z0kk0qqug74n9u9ul23e28x5fszr628h20xwt6jywjpp64xn4qatgvm0',
id: '0',
packet: expect.objectContaining({
source_channel: 'channel-3',
sequence: '2',
}),
ack_type: 'ack',
}),
expect.objectContaining({
channel_id: 'channel-3',
address:
'neutron1m0z0kk0qqug74n9u9ul23e28x5fszr628h20xwt6jywjpp64xn4qatgvm0',
id: '1',
packet: expect.objectContaining({
source_channel: 'channel-3',
sequence: '3',
}),
ack_type: 'ack',
}),
expect.objectContaining({
channel_id: 'channel-3',
address:
'neutron1m0z0kk0qqug74n9u9ul23e28x5fszr628h20xwt6jywjpp64xn4qatgvm0',
id: '2',
packet: expect.objectContaining({
source_channel: 'channel-3',
sequence: '4',
}),
ack_type: 'ack',
}),
expect.objectContaining({
channel_id: 'channel-3',
address:
'neutron1m0z0kk0qqug74n9u9ul23e28x5fszr628h20xwt6jywjpp64xn4qatgvm0',
id: '3',
packet: expect.objectContaining({
source_channel: 'channel-3',
sequence: '5',
}),
ack_type: 'timeout',
Expand Down Expand Up @@ -890,7 +890,7 @@ describe('Neutron / Interchain TXs', () => {
);
expect(failuresResAfter.failures.length).toEqual(3);

// make sure contract's state hasn't been changed
// make sure contract's state has been changed
const acks = await getAcks(neutronChain, contractAddress);
expect(acks.length).toEqual(1);
expect(acks[0].sequence_id).toEqual(+failure.packet.sequence);
Expand Down

0 comments on commit 625b035

Please sign in to comment.