Browse Source

Merge pull request #3491

04f58ff qt: Better status text for mined transactions (Wladimir J. van der Laan)
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
13e99e463d
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 34
      src/qt/transactiontablemodel.cpp

34
src/qt/transactiontablemodel.cpp

@ -285,6 +285,24 @@ QString TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) cons @@ -285,6 +285,24 @@ QString TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) cons
{
QString status;
if(wtx->type == TransactionRecord::Generated)
{
switch(wtx->status.maturity)
{
case TransactionStatus::Immature:
status = tr("Immature (%1 confirmations, will be available after %2)").arg(wtx->status.depth).arg(wtx->status.depth + wtx->status.matures_in);
break;
case TransactionStatus::Mature:
status = tr("Confirmed (%1 confirmations)").arg(wtx->status.depth);
break;
case TransactionStatus::MaturesWarning:
status = tr("This block was not received by any other nodes and will probably not be accepted!");
break;
case TransactionStatus::NotAccepted:
status = tr("Generated but not accepted");
break;
}
} else {
switch(wtx->status.status)
{
case TransactionStatus::OpenUntilBlock:
@ -303,22 +321,6 @@ QString TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) cons @@ -303,22 +321,6 @@ QString TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) cons
status = tr("Confirmed (%1 confirmations)").arg(wtx->status.depth);
break;
}
if(wtx->type == TransactionRecord::Generated)
{
switch(wtx->status.maturity)
{
case TransactionStatus::Immature:
status += "\n" + tr("Mined balance will be available when it matures in %n more block(s)", "", wtx->status.matures_in);
break;
case TransactionStatus::Mature:
break;
case TransactionStatus::MaturesWarning:
status += "\n" + tr("This block was not received by any other nodes and will probably not be accepted!");
break;
case TransactionStatus::NotAccepted:
status += "\n" + tr("Generated but not accepted");
break;
}
}
return status;

Loading…
Cancel
Save