mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
qt, refactor: remove redundant scope in TransactionDesc::FormatTxStatus()
This commit is contained in:
parent
f1ce67f09f
commit
b1bc1431db
1 changed files with 10 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue