From ac55776817e1d9e66a3048b06034a1d54abf57a5 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 8 Feb 2025 17:03:46 +0000 Subject: [PATCH] Diff-minimise --- doc/release-notes-28616.md | 6 ------ src/qt/transactionrecord.cpp | 35 ++++++++++++++++++++++++----------- 2 files changed, 24 insertions(+), 17 deletions(-) delete mode 100644 doc/release-notes-28616.md diff --git a/doc/release-notes-28616.md b/doc/release-notes-28616.md deleted file mode 100644 index b7773ca39b..0000000000 --- a/doc/release-notes-28616.md +++ /dev/null @@ -1,6 +0,0 @@ -GUI changes ------- - -- Transactions that are confirmed while assume utxo background sync is in progress, - will have a clock icon and a tooltip explaining that historical blocks are still - being verified. (#28616) diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 08ea59de7a..9332a9b92e 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -175,31 +175,44 @@ void TransactionRecord::updateStatus(const interfaces::WalletTxStatus& wtx, cons // For generated transactions, determine maturity if (type == TransactionRecord::Generated) { - if (wtx.blocks_to_maturity > 0) { + if (wtx.blocks_to_maturity > 0) + { status.status = TransactionStatus::Immature; - if (wtx.is_in_main_chain) { + if (wtx.is_in_main_chain) + { status.matures_in = wtx.blocks_to_maturity; - } else { + } + else + { status.status = TransactionStatus::NotAccepted; } - } else { + } + else + { status.status = TransactionStatus::Confirmed; } - } else { - if (status.depth < 0) { + } + else + { + if (status.depth < 0) + { status.status = TransactionStatus::Conflicted; } - else if (status.depth == 0) { + else if (status.depth == 0) + { status.status = TransactionStatus::Unconfirmed; - if (wtx.is_abandoned) { + if (wtx.is_abandoned) status.status = TransactionStatus::Abandoned; - } } else if (wtx.is_assumed) { status.status = TransactionStatus::AssumedConfirmed; - } else if (status.depth < RecommendedNumConfirmations) { + } + else if (status.depth < RecommendedNumConfirmations) + { status.status = TransactionStatus::Confirming; - } else { + } + else + { status.status = TransactionStatus::Confirmed; } }