Skip to content

Commit

Permalink
Fix PrivateStargateClient
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Oct 12, 2023
1 parent f58530f commit 2b3e96f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/stargate/src/stargateclient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe("StargateClient", () => {
pendingWithoutSimapp();
const client = await StargateClient.connect(simapp.tendermintUrl);
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 cache
Expand Down
4 changes: 3 additions & 1 deletion packages/stargate/src/stargateclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import { SearchTxQuery } from "./search";

/** Use for testing only */
export interface PrivateStargateClient {
readonly cometClient: CometClient | undefined;
readonly client: {
readonly cometClient: CometClient | undefined;
};
}

export interface StargateClientOptions {
Expand Down

0 comments on commit 2b3e96f

Please sign in to comment.