Skip to content

Instantly share code, notes, and snippets.

@srph
Created June 21, 2023 10:08
Show Gist options
  • Save srph/c1a6b5b77b283c995ec8e47c557b9938 to your computer and use it in GitHub Desktop.
Save srph/c1a6b5b77b283c995ec8e47c557b9938 to your computer and use it in GitHub Desktop.
v47 Upgrade
import { Tendermint37Client } from "@cosmjs/tendermint-rpc";
// @see https://github.com/cosmos/cosmjs/issues/1353
// Replace await `SigningStargateClient.connectWithSigner` with this:
const connectWithStargateSigner: typeof SigningStargateClient['connectWithSigner'] = async (rpc, signer, options) => {
const client = await Tendermint37Client.connect(rpc)
return await SigningStargateClient.createWithSigner(client, signer, options)
}
// @see https://github.com/cosmos/cosmjs/issues/1353
// Replace await `SigningStargateClient.connectWithSigner` with this:
const connectWithCosmwasmSigner: typeof SigningCosmWasmClient['connectWithSigner'] = async (rpc, signer, options) => {
const client = await Tendermint37Client.connect(rpc)
return await SigningCosmWasmClient.createWithSigner(client, signer, options)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment