Merge pull request #400 from CosmWasm/fix-name-PrivateCosmosClient

Fix interface name: PrivateCosmWasmClient -> PrivateCosmosClient
This commit is contained in:
Simon Warta 2020-08-18 15:13:31 +02:00 committed by GitHub
commit 562dc55110
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -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();

View File

@ -150,7 +150,7 @@ export interface Block {
}
/** Use for testing only */
export interface PrivateCosmWasmClient {
export interface PrivateCosmosClient {
readonly lcdClient: LcdClient & AuthExtension;
}

View File

@ -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();

View File

@ -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 {