diff --git a/packages/sdk-ts/src/core/modules/ibc/msgs/MsgTransferCosmjs.ts b/packages/sdk-ts/src/core/modules/ibc/msgs/MsgTransferCosmjs.ts index 615776f6d..5242211fb 100644 --- a/packages/sdk-ts/src/core/modules/ibc/msgs/MsgTransferCosmjs.ts +++ b/packages/sdk-ts/src/core/modules/ibc/msgs/MsgTransferCosmjs.ts @@ -1,5 +1,3 @@ -// import { MsgTransferEncodeObject } from '@cosmjs/stargate' -import snakecaseKeys, { SnakeCaseKeys } from 'snakecase-keys' import { MsgTransfer as BaseMsgTransferCosmjs } from 'cosmjs-types/ibc/applications/transfer/v1/tx' import { CosmosBaseV1Beta1Coin, @@ -77,16 +75,28 @@ export default class MsgTransferCosmjs { } public toAmino() { - const proto = this.toProto() - const message = { - ...snakecaseKeys(proto), - } + const { params } = this + + const message = BaseMsgTransferCosmjs.fromPartial({ + sourcePort: params.port, + sourceChannel: params.channelId, + sender: params.sender, + receiver: params.receiver, + token: params.amount, + timeoutHeight: params.height + ? { + revisionHeight: BigInt(params.height.revisionHeight), + revisionNumber: BigInt(params.height.revisionNumber), + } + : undefined, + timeoutTimestamp: params.timeout ? BigInt(params.timeout) : undefined, + }) return { - type: 'cosmos-sdk/MsgTransfer', + type: '/ibc.applications.transfer.v1.MsgTransfer', value: { ...message, - } as unknown as SnakeCaseKeys, + }, } }