Skip to content

Commit

Permalink
fix: client
Browse files Browse the repository at this point in the history
  • Loading branch information
cgilbe27 committed Jul 29, 2024
1 parent dd041d7 commit a1ab286
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 41 deletions.
16 changes: 4 additions & 12 deletions src/sdk/query/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import {
setupTokenFactoryExtension,
} from ".."

export interface MsgExtension {
export interface NibiruExtension {
readonly msg: Readonly<{
ethMsg: EthMsgExtension
tokenFactoryMsg: TokenFactoryMsgExtension
Expand All @@ -73,7 +73,7 @@ export interface MsgExtension {
}>
}

export const setupMsgExtension = (base: QueryClient): MsgExtension => {
export const setupNibiruExtension = (base: QueryClient): NibiruExtension => {
return {
msg: {
ethMsg: setupEthMsgExtension(base),
Expand Down Expand Up @@ -102,8 +102,7 @@ export type NibiruExtensions = StargateQueryClient &
IbcExtension &
WasmExtension &
AuthExtension &
TokenFactoryExtension &
MsgExtension
NibiruExtension

/** Querier for a Nibiru network.
* @example
Expand Down Expand Up @@ -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
)
}

Expand Down
31 changes: 2 additions & 29 deletions src/sdk/tx/txClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
)
}

Expand Down

0 comments on commit a1ab286

Please sign in to comment.