Skip to content

Commit

Permalink
fix: consider preliminaryFee on fee calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
joacohoyos committed Sep 17, 2024
1 parent 1993902 commit 4e614d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/flat-plants-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@blaze-cardano/tx": patch
---

Fix fee calculation before evaluation
2 changes: 1 addition & 1 deletion packages/blaze-tx/src/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ export class TxBuilder {
this.calculateFees(draft_tx);
excessValue = value.merge(
excessValue,
new Value(-(bigintMax(this.fee, this.minimumFee) + this.feePadding)),
new Value(-(bigintMax(this.fee, this.minimumFee) + this.feePadding) + BigInt(preliminaryFee)),
);
this.balanceChange(excessValue);
let evaluationFee: bigint = 0n;
Expand Down

0 comments on commit 4e614d2

Please sign in to comment.