@@ -36,13 +36,41 @@ QString TransactionDesc::FormatTxStatus(const interfaces::WalletTxStatus& status
3636{
3737 int depth = status.depth_in_main_chain ;
3838 if (depth < 0 ) {
39+ /* : Text explaining the current status of a transaction, shown in the
40+ status field of the details window for this transaction. This status
41+ represents an unconfirmed transaction that conflicts with another
42+ confirmed transaction. */
3943 return tr (" conflicted with a transaction with %1 confirmations" ).arg (-depth);
4044 } else if (depth == 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;
45+ QString s;
46+ if (inMempool) {
47+ /* : Text explaining the current status of a transaction, shown in the
48+ status field of the details window for this transaction. This status
49+ represents an unconfirmed transaction that is in the memory pool. */
50+ s = tr (" 0/unconfirmed, in memory pool" );
51+ } else {
52+ /* : Text explaining the current status of a transaction, shown in the
53+ status field of the details window for this transaction. This status
54+ represents an unconfirmed transaction that is not in the memory pool. */
55+ s = tr (" 0/unconfirmed, not in memory pool" );
56+ }
57+ if (status.is_abandoned ) {
58+ /* : Text explaining the current status of a transaction, shown in the
59+ status field of the details window for this transaction. This
60+ status represents an abandoned transaction. */
61+ s += QLatin1String (" , " ) + tr (" abandoned" );
62+ }
63+ return s;
4364 } else if (depth < 6 ) {
65+ /* : Text explaining the current status of a transaction, shown in the
66+ status field of the details window for this transaction. This
67+ status represents a transaction confirmed in at least one block,
68+ but less than 6 blocks. */
4469 return tr (" %1/unconfirmed" ).arg (depth);
4570 } else {
71+ /* : Text explaining the current status of a transaction, shown in the
72+ status field of the details window for this transaction. This status
73+ represents a transaction confirmed in 6 or more blocks. */
4674 return tr (" %1 confirmations" ).arg (depth);
4775 }
4876}
0 commit comments