From f30004db7303bcb9e0a3fe84a0c7530adfd5b5ad Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 18 Aug 2020 16:29:30 +0100 Subject: [PATCH] launchpad: Update SigningCosmosClient to use GasPrice.fromString --- packages/launchpad/src/signingcosmosclient.spec.ts | 4 ++-- packages/launchpad/src/signingcosmosclient.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/launchpad/src/signingcosmosclient.spec.ts b/packages/launchpad/src/signingcosmosclient.spec.ts index f9214389..b9b64d0f 100644 --- a/packages/launchpad/src/signingcosmosclient.spec.ts +++ b/packages/launchpad/src/signingcosmosclient.spec.ts @@ -31,7 +31,7 @@ describe("SigningCosmosClient", () => { it("can be constructed with custom gas price", async () => { const wallet = await Secp256k1Wallet.fromMnemonic(faucet.mnemonic); - const gasPrice = new GasPrice(3.14, "utest"); + const gasPrice = GasPrice.fromString("3.14utest"); const client = new SigningCosmosClient(httpUrl, faucet.address, wallet, gasPrice); const openedClient = (client as unknown) as PrivateSigningCosmosClient; expect(openedClient.fees).toEqual({ @@ -69,7 +69,7 @@ describe("SigningCosmosClient", () => { it("can be constructed with custom gas price and gas limits", async () => { const wallet = await Secp256k1Wallet.fromMnemonic(faucet.mnemonic); - const gasPrice = new GasPrice(3.14, "utest"); + const gasPrice = GasPrice.fromString("3.14utest"); const gasLimits = { send: 160000, }; diff --git a/packages/launchpad/src/signingcosmosclient.ts b/packages/launchpad/src/signingcosmosclient.ts index cfd75437..5cc229ba 100644 --- a/packages/launchpad/src/signingcosmosclient.ts +++ b/packages/launchpad/src/signingcosmosclient.ts @@ -15,7 +15,7 @@ export interface FeeTable extends Record { readonly send: StdFee; } -const defaultGasPrice = new GasPrice(0.025, "ucosm"); +const defaultGasPrice = GasPrice.fromString("0.025ucosm"); const defaultGasLimits: GasLimits = { send: 80000 }; /** Use for testing only */