Skip to content

Commit

Permalink
fix: add safety margin to estimated fees for hedera
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheng-Long committed Sep 10, 2024
1 parent 094468c commit 052149f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/dry-weeks-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/live-common": minor
---

Add safety margin to Hedera fee estimates
3 changes: 2 additions & 1 deletion libs/ledger-live-common/src/families/hedera/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export async function getEstimatedFees(account: Account): Promise<BigNumber> {
if (data[0]) {
return new BigNumber(10000)
.dividedBy(new BigNumber(data[0]))
.integerValue(BigNumber.ROUND_CEIL);
.integerValue(BigNumber.ROUND_CEIL)
.multipliedBy(estimatedFeeSafetyRate);
}
// eslint-disable-next-line no-empty
} catch {}
Expand Down

0 comments on commit 052149f

Please sign in to comment.