launchpad: Update SigningCosmosClient to use GasPrice.fromString

This commit is contained in:
willclarktech 2020-08-18 16:29:30 +01:00
parent 86e7afbb1e
commit f30004db73
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7
2 changed files with 3 additions and 3 deletions

View File

@ -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,
};

View File

@ -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 */