diff options
author | w0xlt <94266259+w0xlt@users.noreply.github.com> | 2022-02-18 15:41:05 -0300 |
---|---|---|
committer | w0xlt <94266259+w0xlt@users.noreply.github.com> | 2022-02-24 13:47:53 -0300 |
commit | b1bc1431db1e86eefaf4a91e08663628d94656fc (patch) | |
tree | 37733dd111274e73f5d9c777c244d883d2abdd20 /src/qt/transactiondesc.cpp | |
parent | f1ce67f09fbaba4013443bce416e46e5b2d37c19 (diff) |
qt, refactor: remove redundant scope in `TransactionDesc::FormatTxStatus()`
Diffstat (limited to 'src/qt/transactiondesc.cpp')
-rw-r--r-- | src/qt/transactiondesc.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp index be5851d627..94aa3c409f 100644 --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -34,18 +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) { - 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 { - return tr("%1 confirmations").arg(nDepth); - } + 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) { + 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 { + return tr("%1 confirmations").arg(nDepth); } } |