From af4215e9f9dc73a87a8853d0d7b931cbf98bba54 Mon Sep 17 00:00:00 2001 From: Furkan KAMACI Date: Wed, 30 Mar 2022 09:12:00 +0300 Subject: [PATCH] Typo is fixed for multiplier (#1103) --- packages/cli/examples/simulate.ts | 4 ++-- packages/cosmwasm-stargate/src/signingcosmwasmclient.ts | 4 ++-- packages/stargate/src/signingstargateclient.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/cli/examples/simulate.ts b/packages/cli/examples/simulate.ts index e4852f5f..2a5f3b74 100644 --- a/packages/cli/examples/simulate.ts +++ b/packages/cli/examples/simulate.ts @@ -34,7 +34,7 @@ const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, wallet console.log("Successfully broadcasted:", result); } -// Send transaction (using sendTokens with auto gas and custom muliplier) +// Send transaction (using sendTokens with auto gas and custom multiplier) { const recipient = "cosmos1xv9tklw7d82sezh9haa573wufgy59vmwe6xxe5"; const amount = coins(1234567, "ucosm"); @@ -82,7 +82,7 @@ const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, wallet console.log("Successfully broadcasted:", result); } -// Send transaction (using signAndBroadcast with auto gas and custom muliplier) +// Send transaction (using signAndBroadcast with auto gas and custom multiplier) { const recipient = "cosmos1xv9tklw7d82sezh9haa573wufgy59vmwe6xxe5"; const amount = coins(1234567, "ucosm"); diff --git a/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts b/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts index 0fab4171..1e940d88 100644 --- a/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts +++ b/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts @@ -495,8 +495,8 @@ export class SigningCosmWasmClient extends CosmWasmClient { if (fee == "auto" || typeof fee === "number") { assertDefined(this.gasPrice, "Gas price must be set in the client options when auto gas is used."); const gasEstimation = await this.simulate(signerAddress, messages, memo); - const muliplier = typeof fee === "number" ? fee : 1.3; - usedFee = calculateFee(Math.round(gasEstimation * muliplier), this.gasPrice); + const multiplier = typeof fee === "number" ? fee : 1.3; + usedFee = calculateFee(Math.round(gasEstimation * multiplier), this.gasPrice); } else { usedFee = fee; } diff --git a/packages/stargate/src/signingstargateclient.ts b/packages/stargate/src/signingstargateclient.ts index cfba5f33..74357fe8 100644 --- a/packages/stargate/src/signingstargateclient.ts +++ b/packages/stargate/src/signingstargateclient.ts @@ -283,8 +283,8 @@ export class SigningStargateClient extends StargateClient { if (fee == "auto" || typeof fee === "number") { assertDefined(this.gasPrice, "Gas price must be set in the client options when auto gas is used."); const gasEstimation = await this.simulate(signerAddress, messages, memo); - const muliplier = typeof fee === "number" ? fee : 1.3; - usedFee = calculateFee(Math.round(gasEstimation * muliplier), this.gasPrice); + const multiplier = typeof fee === "number" ? fee : 1.3; + usedFee = calculateFee(Math.round(gasEstimation * multiplier), this.gasPrice); } else { usedFee = fee; }