From a1ab286f071c2eb7ce8ae6380b33d4f6f6f79e9c Mon Sep 17 00:00:00 2001 From: Cameron Gilbert Date: Mon, 29 Jul 2024 09:33:22 -0400 Subject: [PATCH] fix: client --- src/sdk/query/query.ts | 16 ++++------------ src/sdk/tx/txClient.ts | 31 ++----------------------------- 2 files changed, 6 insertions(+), 41 deletions(-) diff --git a/src/sdk/query/query.ts b/src/sdk/query/query.ts index 51c45f37..6c083a51 100644 --- a/src/sdk/query/query.ts +++ b/src/sdk/query/query.ts @@ -53,7 +53,7 @@ import { setupTokenFactoryExtension, } from ".." -export interface MsgExtension { +export interface NibiruExtension { readonly msg: Readonly<{ ethMsg: EthMsgExtension tokenFactoryMsg: TokenFactoryMsgExtension @@ -73,7 +73,7 @@ export interface MsgExtension { }> } -export const setupMsgExtension = (base: QueryClient): MsgExtension => { +export const setupNibiruExtension = (base: QueryClient): NibiruExtension => { return { msg: { ethMsg: setupEthMsgExtension(base), @@ -102,8 +102,7 @@ export type NibiruExtensions = StargateQueryClient & IbcExtension & WasmExtension & AuthExtension & - TokenFactoryExtension & - MsgExtension + NibiruExtension /** Querier for a Nibiru network. * @example @@ -136,20 +135,13 @@ export class NibiruQuerier extends StargateClient { this.tm = tmClient this.nibiruExtensions = StargateQueryClient.withExtensions( tmClient, - setupDevgasExtension, - setupEpochsExtension, - setupEthExtension, - setupOracleExtension, - setupSudoExtension, - setupInflationExtension, setupDistributionExtension, setupGovExtension, setupStakingExtension, setupIbcExtension, setupWasmExtension, setupAuthExtension, - setupTokenFactoryExtension, - setupMsgExtension + setupNibiruExtension ) } diff --git a/src/sdk/tx/txClient.ts b/src/sdk/tx/txClient.ts index c5674725..38b718b0 100644 --- a/src/sdk/tx/txClient.ts +++ b/src/sdk/tx/txClient.ts @@ -17,22 +17,7 @@ import { SigningCosmWasmClientOptions, setupWasmExtension, } from "@cosmjs/cosmwasm-stargate" -import { - setupInflationExtension, - setupSudoExtension, - NibiruExtensions, - setupOracleExtension, - setupEpochsExtension, - setupDevgasExtension, - setupTokenFactoryExtension, - setupDevgasMsgExtension, - setupInflationMsgExtension, - setupOracleMsgExtension, - setupSudoMsgExtension, - setupTokenFactoryMsgExtension, - setupEthExtension, - setupEthMsgExtension, -} from ".." +import { NibiruExtensions, setupNibiruExtension } from ".." export const nibiruRegistryTypes: ReadonlyArray<[string, GeneratedType]> = [ ...defaultRegistryTypes, @@ -52,25 +37,13 @@ export class NibiruTxClient extends SigningStargateClient { this.wasmClient = wasm this.nibiruExtensions = QueryClient.withExtensions( tmClient, - setupDevgasExtension, - setupEpochsExtension, - setupEthExtension, - setupOracleExtension, - setupSudoExtension, - setupInflationExtension, setupDistributionExtension, setupGovExtension, setupStakingExtension, setupIbcExtension, setupWasmExtension, setupAuthExtension, - setupTokenFactoryExtension, - setupDevgasMsgExtension, - setupEthMsgExtension, - setupInflationMsgExtension, - setupOracleMsgExtension, - setupSudoMsgExtension, - setupTokenFactoryMsgExtension + setupNibiruExtension ) }