Skip to content

Commit

Permalink
Merge pull request #510 from oraichain/feat/fix-sign-osmosis
Browse files Browse the repository at this point in the history
update terdermint 37 getCosmWasmClient
  • Loading branch information
haunv3 authored Dec 22, 2023
2 parents 6f57b2d + edb4afa commit b21c680
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libs/cosmjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Coin, GasPrice } from '@cosmjs/stargate';
import { Tendermint37Client } from '@cosmjs/tendermint-rpc';
import { Stargate } from '@injectivelabs/sdk-ts';
import { network } from 'config/networks';

export type clientType = 'cosmwasm' | 'injective';

const collectWallet = async (chainId: string) => {
Expand All @@ -24,8 +23,9 @@ const getCosmWasmClient = async (
const { chainId, rpc, signer } = config;
const wallet = signer ?? (await collectWallet(chainId));
const defaultAddress = (await wallet.getAccounts())[0];
const client = await cosmwasm.SigningCosmWasmClient.connectWithSigner(
rpc ?? (network.rpc as string),
const tmClient = await Tendermint37Client.connect(rpc ?? (network.rpc as string));
const client = await cosmwasm.SigningCosmWasmClient.createWithSigner(
tmClient,
wallet,
options ?? {
gasPrice: GasPrice.fromString(network.fee.gasPrice + network.denom)
Expand Down

0 comments on commit b21c680

Please sign in to comment.