Merge pull request #400 from CosmWasm/fix-name-PrivateCosmosClient
Fix interface name: PrivateCosmWasmClient -> PrivateCosmosClient
This commit is contained in:
commit
562dc55110
@ -2,7 +2,7 @@
|
||||
import { sleep } from "@cosmjs/utils";
|
||||
import { ReadonlyDate } from "readonly-date";
|
||||
|
||||
import { assertIsBroadcastTxSuccess, CosmosClient, PrivateCosmWasmClient } from "./cosmosclient";
|
||||
import { assertIsBroadcastTxSuccess, CosmosClient, PrivateCosmosClient } from "./cosmosclient";
|
||||
import { makeSignBytes } from "./encoding";
|
||||
import { findAttribute } from "./logs";
|
||||
import { MsgSend } from "./msgs";
|
||||
@ -42,7 +42,7 @@ describe("CosmosClient", () => {
|
||||
it("caches chain ID", async () => {
|
||||
pendingWithoutWasmd();
|
||||
const client = new CosmosClient(wasmd.endpoint);
|
||||
const openedClient = (client as unknown) as PrivateCosmWasmClient;
|
||||
const openedClient = (client as unknown) as PrivateCosmosClient;
|
||||
const getCodeSpy = spyOn(openedClient.lcdClient, "nodeInfo").and.callThrough();
|
||||
|
||||
expect(await client.getChainId()).toEqual(wasmd.chainId); // from network
|
||||
@ -56,7 +56,7 @@ describe("CosmosClient", () => {
|
||||
it("gets height via last block", async () => {
|
||||
pendingWithoutWasmd();
|
||||
const client = new CosmosClient(wasmd.endpoint);
|
||||
const openedClient = (client as unknown) as PrivateCosmWasmClient;
|
||||
const openedClient = (client as unknown) as PrivateCosmosClient;
|
||||
const blockLatestSpy = spyOn(openedClient.lcdClient, "blocksLatest").and.callThrough();
|
||||
|
||||
const height1 = await client.getHeight();
|
||||
@ -73,7 +73,7 @@ describe("CosmosClient", () => {
|
||||
pendingWithoutWasmd();
|
||||
const client = new CosmosClient(wasmd.endpoint);
|
||||
|
||||
const openedClient = (client as unknown) as PrivateCosmWasmClient;
|
||||
const openedClient = (client as unknown) as PrivateCosmosClient;
|
||||
const blockLatestSpy = spyOn(openedClient.lcdClient, "blocksLatest").and.callThrough();
|
||||
const authAccountsSpy = spyOn(openedClient.lcdClient.auth, "account").and.callThrough();
|
||||
|
||||
|
||||
@ -150,7 +150,7 @@ export interface Block {
|
||||
}
|
||||
|
||||
/** Use for testing only */
|
||||
export interface PrivateCosmWasmClient {
|
||||
export interface PrivateCosmosClient {
|
||||
readonly lcdClient: LcdClient & AuthExtension;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
import { assert } from "@cosmjs/utils";
|
||||
|
||||
import { Coin, coin, coins } from "./coins";
|
||||
import { assertIsBroadcastTxSuccess, PrivateCosmWasmClient } from "./cosmosclient";
|
||||
import { assertIsBroadcastTxSuccess, PrivateCosmosClient } from "./cosmosclient";
|
||||
import { MsgDelegate } from "./msgs";
|
||||
import { Secp256k1Wallet } from "./secp256k1wallet";
|
||||
import { SigningCosmosClient } from "./signingcosmosclient";
|
||||
@ -35,7 +35,7 @@ describe("SigningCosmosClient", () => {
|
||||
const wallet = await Secp256k1Wallet.fromMnemonic(faucet.mnemonic);
|
||||
const client = new SigningCosmosClient(httpUrl, faucet.address, wallet);
|
||||
|
||||
const openedClient = (client as unknown) as PrivateCosmWasmClient;
|
||||
const openedClient = (client as unknown) as PrivateCosmosClient;
|
||||
const blockLatestSpy = spyOn(openedClient.lcdClient, "blocksLatest").and.callThrough();
|
||||
const authAccountsSpy = spyOn(openedClient.lcdClient.auth, "account").and.callThrough();
|
||||
|
||||
|
||||
2
packages/launchpad/types/cosmosclient.d.ts
vendored
2
packages/launchpad/types/cosmosclient.d.ts
vendored
@ -104,7 +104,7 @@ export interface Block {
|
||||
readonly txs: readonly Uint8Array[];
|
||||
}
|
||||
/** Use for testing only */
|
||||
export interface PrivateCosmWasmClient {
|
||||
export interface PrivateCosmosClient {
|
||||
readonly lcdClient: LcdClient & AuthExtension;
|
||||
}
|
||||
export declare class CosmosClient {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user