diff --git a/packages/stargate/src/aminomsgs.ts b/packages/stargate/src/aminomsgs.ts index 42f288ee..aaabe64d 100644 --- a/packages/stargate/src/aminomsgs.ts +++ b/packages/stargate/src/aminomsgs.ts @@ -357,10 +357,12 @@ export interface AminoMsgTransfer extends AminoMsg { /** Bech32 account address */ readonly receiver: string; /** - * It is unclear if this is really optional. The Amino encoding expects unset values to be - * encoded as {}. + * The timeout as a (revision_number, revision_height) pair. + * + * This fied is is non-optional (https://github.com/cosmos/cosmos-sdk/blob/v0.42.7/x/ibc/applications/transfer/types/tx.pb.go#L49). + * In order to not set the timeout height, set it to {}. */ - readonly timeout_height?: AminoHeight; + readonly timeout_height: AminoHeight; /** * Timeout timestamp (in nanoseconds). The timeout is disabled when set to 0. * diff --git a/packages/stargate/src/aminotypes.spec.ts b/packages/stargate/src/aminotypes.spec.ts index 27aca600..aaff2efd 100644 --- a/packages/stargate/src/aminotypes.spec.ts +++ b/packages/stargate/src/aminotypes.spec.ts @@ -410,7 +410,7 @@ describe("AminoTypes", () => { token: coin(1234, "utest"), sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6", receiver: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5", - timeout_height: {}, // 🤷‍♂️ + timeout_height: {}, timeout_timestamp: undefined, }, };