From 9c55a85be0658c18e7a9f2122108bd03fc8b82d3 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Wed, 8 Nov 2023 17:54:59 +0100 Subject: [PATCH] Deprecate SigningStargateClient.sendIbcTokens --- CHANGELOG.md | 4 ++++ packages/stargate/src/signingstargateclient.ts | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d1a9249e1..8b42fdf579 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,10 @@ and this project adheres to - @cosmjs/tendermint-rpc: `CometClient` should be used instead of `TendermintClient`. +- @cosmjs/stargate: Deprecate `SigningStargateClient.sendIbcTokens`. Please use + `signAndBroadcast` + `MsgTransferEncodeObject` instead. ([#1493]) + +[#1493]: https://github.com/cosmos/cosmjs/issues/1493 ## [0.31.3] - 2023-10-25 diff --git a/packages/stargate/src/signingstargateclient.ts b/packages/stargate/src/signingstargateclient.ts index 7e5fe314a4..13e4461f16 100644 --- a/packages/stargate/src/signingstargateclient.ts +++ b/packages/stargate/src/signingstargateclient.ts @@ -261,6 +261,12 @@ export class SigningStargateClient extends StargateClient { return this.signAndBroadcast(delegatorAddress, [withdrawMsg], fee, memo); } + /** + * @deprecated This API does not support setting the memo field of `MsgTransfer` (only the transaction memo). + * We'll remove this method at some point because trying to wrap the various message types is a losing strategy. + * Please migrate to `signAndBroadcast` with an `MsgTransferEncodeObject` created in the caller code instead. + * @see https://github.com/cosmos/cosmjs/issues/1493 + */ public async sendIbcTokens( senderAddress: string, recipientAddress: string,