Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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-
  • Loading branch information
w0xlt committed Feb 24, 2022
commit 045f8d0310d2340aa32db6f7e582dea45950d28a
14 changes: 7 additions & 7 deletions src/qt/transactiondesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down