From 045f8d0310d2340aa32db6f7e582dea45950d28a Mon Sep 17 00:00:00 2001 From: w0xlt <94266259+w0xlt@users.noreply.github.com> Date: Mon, 21 Feb 2022 15:17:24 -0300 Subject: [PATCH] scripted-diff: rename nDepth -> depth -BEGIN VERIFY SCRIPT- s() { sed -i -e 's/nDepth/depth/g' $(git grep -l 'nDepth' $1); } s src/qt/transactiondesc.cpp -END VERIFY SCRIPT- --- src/qt/transactiondesc.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp index 94aa3c409f..27dc234241 100644 --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -34,16 +34,16 @@ using wallet::isminetype; QString TransactionDesc::FormatTxStatus(const interfaces::WalletTx& wtx, const interfaces::WalletTxStatus& status, bool inMempool, int numBlocks) { - int nDepth = status.depth_in_main_chain; - if (nDepth < 0) { - return tr("conflicted with a transaction with %1 confirmations").arg(-nDepth); - } else if (nDepth == 0) { + int depth = status.depth_in_main_chain; + if (depth < 0) { + return tr("conflicted with a transaction with %1 confirmations").arg(-depth); + } else if (depth == 0) { const QString abandoned{status.is_abandoned ? QLatin1String(", ") + tr("abandoned") : QString()}; return tr("0/unconfirmed, %1").arg(inMempool ? tr("in memory pool") : tr("not in memory pool")) + abandoned; - } else if (nDepth < 6) { - return tr("%1/unconfirmed").arg(nDepth); + } else if (depth < 6) { + return tr("%1/unconfirmed").arg(depth); } else { - return tr("%1 confirmations").arg(nDepth); + return tr("%1 confirmations").arg(depth); } }