diff --git a/packages/launchpad/src/signingcosmosclient.spec.ts b/packages/launchpad/src/signingcosmosclient.spec.ts index 22537d77..f9214389 100644 --- a/packages/launchpad/src/signingcosmosclient.spec.ts +++ b/packages/launchpad/src/signingcosmosclient.spec.ts @@ -6,7 +6,7 @@ import { assertIsBroadcastTxSuccess, PrivateCosmosClient } from "./cosmosclient" import { GasPrice } from "./gas"; import { MsgDelegate } from "./msgs"; import { Secp256k1Wallet } from "./secp256k1wallet"; -import { SigningCosmosClient } from "./signingcosmosclient"; +import { PrivateSigningCosmosClient, SigningCosmosClient } from "./signingcosmosclient"; import { makeRandomAddress, pendingWithoutWasmd, validatorAddress } from "./testutils.spec"; const httpUrl = "http://localhost:1317"; @@ -33,7 +33,8 @@ describe("SigningCosmosClient", () => { const wallet = await Secp256k1Wallet.fromMnemonic(faucet.mnemonic); const gasPrice = new GasPrice(3.14, "utest"); const client = new SigningCosmosClient(httpUrl, faucet.address, wallet, gasPrice); - expect((client as any).fees).toEqual({ + const openedClient = (client as unknown) as PrivateSigningCosmosClient; + expect(openedClient.fees).toEqual({ send: { amount: [ { @@ -52,7 +53,8 @@ describe("SigningCosmosClient", () => { send: 160000, }; const client = new SigningCosmosClient(httpUrl, faucet.address, wallet, undefined, gasLimits); - expect((client as any).fees).toEqual({ + const openedClient = (client as unknown) as PrivateSigningCosmosClient; + expect(openedClient.fees).toEqual({ send: { amount: [ { @@ -72,7 +74,8 @@ describe("SigningCosmosClient", () => { send: 160000, }; const client = new SigningCosmosClient(httpUrl, faucet.address, wallet, gasPrice, gasLimits); - expect((client as any).fees).toEqual({ + const openedClient = (client as unknown) as PrivateSigningCosmosClient; + expect(openedClient.fees).toEqual({ send: { amount: [ { diff --git a/packages/launchpad/src/signingcosmosclient.ts b/packages/launchpad/src/signingcosmosclient.ts index cbb8dcdb..1889fb15 100644 --- a/packages/launchpad/src/signingcosmosclient.ts +++ b/packages/launchpad/src/signingcosmosclient.ts @@ -11,6 +11,11 @@ import { OfflineSigner } from "./wallet"; const defaultGasPrice = new GasPrice(0.025, "ucosm"); const defaultGasLimits: GasLimits = { send: 80000 }; +/** Use for testing only */ +export interface PrivateSigningCosmosClient { + readonly fees: FeeTable; +} + export class SigningCosmosClient extends CosmosClient { public readonly senderAddress: string;