@@ -48,9 +48,8 @@ import { ValidatorsParams } from '../types/requests/common/validators';
4848import { BroadcastTxParams } from '../types/requests/common/tx' ;
4949import { GenesisChunkedParams } from '../types/requests/common/genesis-chunked' ;
5050import { ICosmosProtocolAdapter } from '../adapters/base' ;
51- import { BaseAccount } from '@interchainjs/cosmos-types' ;
52- import { getAccount } from '@interchainjs/cosmos-types' ;
53- import { accountFromAny } from '../utils' ;
51+ import { BaseAccount , getAccount } from '@interchainjs/cosmos-types' ;
52+ import { accountFromAny , type PubkeyDecoderMap } from '../utils' ;
5453import { encodePubkey } from '@interchainjs/pubkey' ;
5554
5655
@@ -326,7 +325,10 @@ export class CosmosQueryClient implements ICosmosQueryClient {
326325 }
327326
328327 // Account queries
329- async getBaseAccount ( address : string ) : Promise < BaseAccount | null > {
328+ async getBaseAccount (
329+ address : string ,
330+ opts ?: { readonly pubkeyDecoders ?: PubkeyDecoderMap }
331+ ) : Promise < BaseAccount | null > {
330332 try {
331333 // Create a plain RPC object so getAccount can mutate it
332334 const rpc = {
@@ -341,7 +343,7 @@ export class CosmosQueryClient implements ICosmosQueryClient {
341343 }
342344
343345 // Use the new accountFromAny function to parse the account
344- const account = accountFromAny ( response . account ) ;
346+ const account = accountFromAny ( response . account , opts ) ;
345347
346348 // Convert the standardized Account back to BaseAccount format
347349 return {
@@ -364,4 +366,4 @@ export class CosmosQueryClient implements ICosmosQueryClient {
364366 capabilities : this . protocolAdapter . getCapabilities ( )
365367 } ;
366368 }
367- }
369+ }
0 commit comments