Skip to content

Commit

Permalink
patch: minimum fee affect on excess val
Browse files Browse the repository at this point in the history
  • Loading branch information
micahkendall committed Aug 20, 2024
1 parent fa3a285 commit e6f670f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/funny-boxes-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@blaze-cardano/tx": patch
---

patch: minimum fee affect on excess val
4 changes: 3 additions & 1 deletion packages/blaze-tx/src/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,9 @@ export class TxBuilder {
tw = this.buildTransactionWitnessSet();
const evaluationFee = await this.evaluate(draft_tx);
this.fee += evaluationFee;
excessValue = value.merge(excessValue, new Value(-evaluationFee));
if (this.fee > this.minimumFee) {
excessValue = value.merge(excessValue, new Value(-evaluationFee));
}
tw.setRedeemers(this.redeemers);
draft_tx.setWitnessSet(tw);
}
Expand Down

0 comments on commit e6f670f

Please sign in to comment.