From 78cf0886ccc1a4c023642c4a7d87f9196d637940 Mon Sep 17 00:00:00 2001 From: Burnt Val <117188229+BurntVal@users.noreply.github.com> Date: Fri, 9 Aug 2024 12:33:34 -0400 Subject: [PATCH] fix gas calculation (#214) * fix gas calculation * changeset --- .changeset/rare-llamas-lie.md | 5 +++++ packages/signers/src/signers/utils/client.ts | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .changeset/rare-llamas-lie.md diff --git a/.changeset/rare-llamas-lie.md b/.changeset/rare-llamas-lie.md new file mode 100644 index 00000000..67adf7b7 --- /dev/null +++ b/.changeset/rare-llamas-lie.md @@ -0,0 +1,5 @@ +--- +"@burnt-labs/signers": minor +--- + +Fix gas calculation param bug diff --git a/packages/signers/src/signers/utils/client.ts b/packages/signers/src/signers/utils/client.ts index 411f125b..212c2607 100644 --- a/packages/signers/src/signers/utils/client.ts +++ b/packages/signers/src/signers/utils/client.ts @@ -120,10 +120,7 @@ export class AAClient extends SigningCosmWasmClient { const simmedGas = await this.simulate(sender, messages, memo); const gasPrice = GasPrice.fromString(gasPriceString); - const calculatedFee: StdFee = calculateFee( - simmedGas * gasAdjustment, - gasPrice, - ); + const calculatedFee: StdFee = calculateFee(simmedGas, gasPrice); let defaultFee: StdFee; let gas = (