Skip to content

Commit

Permalink
launchpad: Update SigningCosmosClient to use GasPrice.fromString
Browse files Browse the repository at this point in the history
  • Loading branch information
willclarktech committed Aug 18, 2020
1 parent 4ad7fa4 commit a913974
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/launchpad/src/signingcosmosclient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/launchpad/src/signingcosmosclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface FeeTable extends Record<string, StdFee> {
readonly send: StdFee;
}

const defaultGasPrice = new GasPrice(0.025, "ucosm");
const defaultGasPrice = GasPrice.fromString("0.025ucosm");
const defaultGasLimits: GasLimits<FeeTable> = { send: 80000 };

/** Use for testing only */
Expand Down

0 comments on commit a913974

Please sign in to comment.