Skip to content

Commit b1bc143

Browse files
committed
qt, refactor: remove redundant scope in TransactionDesc::FormatTxStatus()
1 parent f1ce67f commit b1bc143

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/qt/transactiondesc.cpp

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,16 @@ using wallet::isminetype;
3434

3535
QString TransactionDesc::FormatTxStatus(const interfaces::WalletTx& wtx, const interfaces::WalletTxStatus& status, bool inMempool, int numBlocks)
3636
{
37-
{
38-
int nDepth = status.depth_in_main_chain;
39-
if (nDepth < 0) {
40-
return tr("conflicted with a transaction with %1 confirmations").arg(-nDepth);
41-
} else if (nDepth == 0) {
42-
const QString abandoned{status.is_abandoned ? QLatin1String(", ") + tr("abandoned") : QString()};
43-
return tr("0/unconfirmed, %1").arg(inMempool ? tr("in memory pool") : tr("not in memory pool")) + abandoned;
44-
} else if (nDepth < 6) {
45-
return tr("%1/unconfirmed").arg(nDepth);
46-
} else {
47-
return tr("%1 confirmations").arg(nDepth);
48-
}
37+
int nDepth = status.depth_in_main_chain;
38+
if (nDepth < 0) {
39+
return tr("conflicted with a transaction with %1 confirmations").arg(-nDepth);
40+
} else if (nDepth == 0) {
41+
const QString abandoned{status.is_abandoned ? QLatin1String(", ") + tr("abandoned") : QString()};
42+
return tr("0/unconfirmed, %1").arg(inMempool ? tr("in memory pool") : tr("not in memory pool")) + abandoned;
43+
} else if (nDepth < 6) {
44+
return tr("%1/unconfirmed").arg(nDepth);
45+
} else {
46+
return tr("%1 confirmations").arg(nDepth);
4947
}
5048
}
5149

0 commit comments

Comments
 (0)