From 88ee831a896edda8db1b47baccbc0bdca5fc7b72 Mon Sep 17 00:00:00 2001 From: "Joaquin Hoyos (Clark)" Date: Fri, 20 Sep 2024 14:07:59 +0200 Subject: [PATCH] fix: wrong final_size calculation (#180) --- .changeset/mighty-news-try.md | 5 +++++ packages/blaze-tx/src/tx.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/mighty-news-try.md diff --git a/.changeset/mighty-news-try.md b/.changeset/mighty-news-try.md new file mode 100644 index 00000000..766fc0d6 --- /dev/null +++ b/.changeset/mighty-news-try.md @@ -0,0 +1,5 @@ +--- +"@blaze-cardano/tx": patch +--- + +Small fee calculation fix diff --git a/packages/blaze-tx/src/tx.ts b/packages/blaze-tx/src/tx.ts index 0810df8e..b6eac40e 100644 --- a/packages/blaze-tx/src/tx.ts +++ b/packages/blaze-tx/src/tx.ts @@ -1620,7 +1620,7 @@ export class TxBuilder { "A transaction was built using fee padding. This is useful for working around changes to fee calculation, but ultimately is a bandaid. If you find yourself needing this, please open a ticket at https://github.com/butaneprotocol/blaze-cardano so we can fix the underlying inaccuracy!", ); } - let final_size = draft_tx.toCbor().length / 2; + let final_size = draft_size; do { const oldEvaluationFee = evaluationFee; this.fee += BigInt(