@@ -285,38 +285,40 @@ QString TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) cons
285
285
{
286
286
QString status;
287
287
288
- switch (wtx->status .status )
289
- {
290
- case TransactionStatus::OpenUntilBlock:
291
- status = tr (" Open for %n more block(s)" ," " ,wtx->status .open_for );
292
- break ;
293
- case TransactionStatus::OpenUntilDate:
294
- status = tr (" Open until %1" ).arg (GUIUtil::dateTimeStr (wtx->status .open_for ));
295
- break ;
296
- case TransactionStatus::Offline:
297
- status = tr (" Offline (%1 confirmations)" ).arg (wtx->status .depth );
298
- break ;
299
- case TransactionStatus::Unconfirmed:
300
- status = tr (" Unconfirmed (%1 of %2 confirmations)" ).arg (wtx->status .depth ).arg (TransactionRecord::NumConfirmations);
301
- break ;
302
- case TransactionStatus::HaveConfirmations:
303
- status = tr (" Confirmed (%1 confirmations)" ).arg (wtx->status .depth );
304
- break ;
305
- }
306
288
if (wtx->type == TransactionRecord::Generated)
307
289
{
308
290
switch (wtx->status .maturity )
309
291
{
310
292
case TransactionStatus::Immature:
311
- status += " \n " + tr (" Mined balance will be available when it matures in %n more block(s) " , " " , wtx->status .matures_in );
293
+ status = tr (" Immature (%1 confirmations, will be available after %2) " ). arg (wtx-> status . depth ). arg (wtx-> status . depth + wtx->status .matures_in );
312
294
break ;
313
295
case TransactionStatus::Mature:
296
+ status = tr (" Confirmed (%1 confirmations)" ).arg (wtx->status .depth );
314
297
break ;
315
298
case TransactionStatus::MaturesWarning:
316
- status += " \n " + tr (" This block was not received by any other nodes and will probably not be accepted!" );
299
+ status = tr (" This block was not received by any other nodes and will probably not be accepted!" );
317
300
break ;
318
301
case TransactionStatus::NotAccepted:
319
- status += " \n " + tr (" Generated but not accepted" );
302
+ status = tr (" Generated but not accepted" );
303
+ break ;
304
+ }
305
+ } else {
306
+ switch (wtx->status .status )
307
+ {
308
+ case TransactionStatus::OpenUntilBlock:
309
+ status = tr (" Open for %n more block(s)" ," " ,wtx->status .open_for );
310
+ break ;
311
+ case TransactionStatus::OpenUntilDate:
312
+ status = tr (" Open until %1" ).arg (GUIUtil::dateTimeStr (wtx->status .open_for ));
313
+ break ;
314
+ case TransactionStatus::Offline:
315
+ status = tr (" Offline (%1 confirmations)" ).arg (wtx->status .depth );
316
+ break ;
317
+ case TransactionStatus::Unconfirmed:
318
+ status = tr (" Unconfirmed (%1 of %2 confirmations)" ).arg (wtx->status .depth ).arg (TransactionRecord::NumConfirmations);
319
+ break ;
320
+ case TransactionStatus::HaveConfirmations:
321
+ status = tr (" Confirmed (%1 confirmations)" ).arg (wtx->status .depth );
320
322
break ;
321
323
}
322
324
}
0 commit comments