Fix PrivateStargateClient

This commit is contained in:
Simon Warta 2023-10-12 18:26:06 +02:00
parent f58530f449
commit 2b3e96ff1d
2 changed files with 4 additions and 2 deletions

View File

@ -97,7 +97,7 @@ describe("StargateClient", () => {
pendingWithoutSimapp(); pendingWithoutSimapp();
const client = await StargateClient.connect(simapp.tendermintUrl); const client = await StargateClient.connect(simapp.tendermintUrl);
const openedClient = client as unknown as PrivateStargateClient; const openedClient = client as unknown as PrivateStargateClient;
const getCodeSpy = spyOn(openedClient.cometClient!, "status").and.callThrough(); const getCodeSpy = spyOn(openedClient.client.cometClient!, "status").and.callThrough();
expect(await client.getChainId()).toEqual(simapp.chainId); // from network expect(await client.getChainId()).toEqual(simapp.chainId); // from network
expect(await client.getChainId()).toEqual(simapp.chainId); // from cache expect(await client.getChainId()).toEqual(simapp.chainId); // from cache

View File

@ -23,7 +23,9 @@ import { SearchTxQuery } from "./search";
/** Use for testing only */ /** Use for testing only */
export interface PrivateStargateClient { export interface PrivateStargateClient {
readonly cometClient: CometClient | undefined; readonly client: {
readonly cometClient: CometClient | undefined;
};
} }
export interface StargateClientOptions { export interface StargateClientOptions {