Skip to content

Commit

Permalink
fix: gas adjustment (#257)
Browse files Browse the repository at this point in the history
## Description

Closes: DPM-177

This PR addresses a bug that causes certain transactions to fail with
the "out of gas" error.

<!-- Add a description of the changes that this PR introduces and the
files that
are the most critical to review. -->

---

### Author Checklist

*All items are required. Please add a note to the item if the item is
not applicable and
please add links to any relevant follow up issues.*

- [x] included the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] provided a link to the relevant issue or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable
and please add
your handle next to the items reviewed if you only reviewed selected
items.*

- [ ] confirmed the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] confirmed all author checklist items have been addressed
  • Loading branch information
manu0466 authored Nov 2, 2023
1 parent 9f87b7d commit 57385d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/screens/BroadcastTx/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ export const useEstimateFee = () => {
setEstimatedFee(undefined);

// Compute a fallback fee amount.
const fallbackFee = calculateFee(gasOnFeeEstimationTimeout, gasPrice!);
const fallbackFee = calculateFee(gasOnFeeEstimationTimeout, gasPrice!.toString());

const feeEstimationPromise = PromiseTimeout.wrap(
DesmosClient.connect(chainInfo.rpcUrl, {
gasPrice,
gasAdjustment: 1.8,
}).then((c) =>
c.estimateTxFee(activeAccount.address, messages, {
publicKey: {
Expand Down

0 comments on commit 57385d4

Please sign in to comment.