From 332a0bda8a43dc4035de93633e7ab3a377b0f113 Mon Sep 17 00:00:00 2001 From: gmart7t2 <49558347+gmart7t2@users.noreply.github.com> Date: Mon, 6 Mar 2023 23:34:27 -0400 Subject: [PATCH] Correct reveal tx fee calculation (#1853) Co-authored-by: raphjaph --- src/subcommand/wallet/inscribe.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/subcommand/wallet/inscribe.rs b/src/subcommand/wallet/inscribe.rs index 915613e8fe..d9b537f82d 100644 --- a/src/subcommand/wallet/inscribe.rs +++ b/src/subcommand/wallet/inscribe.rs @@ -92,7 +92,9 @@ impl Inscribe { utxos.insert( reveal_tx.input[0].previous_output, - Amount::from_sat(unsigned_commit_tx.output[0].value), + Amount::from_sat( + unsigned_commit_tx.output[reveal_tx.input[0].previous_output.vout as usize].value, + ), ); let fees =