From efdfd8a73366a1f455f902320abb28c793fcc0d0 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 17 May 2021 10:58:30 +0200 Subject: [PATCH] Write fee amount more compact --- packages/stargate/src/stargateclient.spec.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/packages/stargate/src/stargateclient.spec.ts b/packages/stargate/src/stargateclient.spec.ts index c12f1199..3130ab32 100644 --- a/packages/stargate/src/stargateclient.spec.ts +++ b/packages/stargate/src/stargateclient.spec.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { fromBase64, toBase64 } from "@cosmjs/encoding"; import { + coins, DirectSecp256k1HdWallet, encodePubkey, makeAuthInfoBytes, @@ -312,12 +313,7 @@ describe("StargateClient", () => { }; const txBodyBytes = registry.encode(txBodyFields); const { accountNumber, sequence } = (await client.getSequence(address))!; - const feeAmount = [ - { - amount: "2000", - denom: "ucosm", - }, - ]; + const feeAmount = coins(2000, "ucosm"); const gasLimit = 200000; const authInfoBytes = makeAuthInfoBytes([pubkey], feeAmount, gasLimit, sequence); @@ -373,12 +369,7 @@ describe("StargateClient", () => { }; const txBodyBytes = registry.encode(txBodyFields); const chainId = await client.getChainId(); - const feeAmount = [ - { - amount: "2000", - denom: "ucosm", - }, - ]; + const feeAmount = coins(2000, "ucosm"); const gasLimit = 200000; const { accountNumber: accountNumber1, sequence: sequence1 } = (await client.getSequence(address))!;