Skip to content

Commit

Permalink
Under simulation fix (#216)
Browse files Browse the repository at this point in the history
* add math.ceil to prevent int errors

* add comment for gas values

* bump gas adjustment

* changeset
  • Loading branch information
BurntVal authored Aug 27, 2024
1 parent 9c27672 commit 4e84d2b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/young-ladybugs-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@burnt-labs/constants": minor
"@burnt-labs/signers": minor
---

Fix under simulation
2 changes: 1 addition & 1 deletion packages/constants/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const xionCoin: Coin = {

export const xionGasValues = {
gasPrice: "0.025uxion",
gasAdjustment: 1.3,
gasAdjustment: 1.4,
gasAdjustmentMargin: 5000,
};

Expand Down
5 changes: 2 additions & 3 deletions packages/signers/src/signers/utils/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ export class AAClient extends SigningCosmWasmClient {
const calculatedFee: StdFee = calculateFee(simmedGas, gasPrice);

let defaultFee: StdFee;
let gas = (
parseInt(calculatedFee.gas) * gasAdjustment +
gasAdjustmentMargin
let gas = Math.ceil(
parseInt(calculatedFee.gas) * gasAdjustment + gasAdjustmentMargin,
).toString();

const chainId = await this.getChainId();
Expand Down

0 comments on commit 4e84d2b

Please sign in to comment.