| 275 | } |
| 276 | |
| 277 | QString TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) const |
| 278 | { |
| 279 | QString status; |
| 280 | |
| 281 | switch(wtx->status.status) |
| 282 | { |
| 283 | case TransactionStatus::OpenUntilBlock: |
| 284 | status = tr("Open for %n more block(s)","",wtx->status.open_for); |
| 285 | break; |
| 286 | case TransactionStatus::OpenUntilDate: |
| 287 | status = tr("Open until %1").arg(GUIUtil::dateTimeStr(wtx->status.open_for)); |
| 288 | break; |
| 289 | case TransactionStatus::Unconfirmed: |
| 290 | status = tr("Unconfirmed"); |
| 291 | break; |
| 292 | case TransactionStatus::Abandoned: |
| 293 | status = tr("Abandoned"); |
| 294 | break; |
| 295 | case TransactionStatus::Confirming: |
| 296 | status = tr("Confirming (%1 of %2 recommended confirmations)").arg(wtx->status.depth).arg(TransactionRecord::RecommendedNumConfirmations); |
| 297 | break; |
| 298 | case TransactionStatus::Confirmed: |
| 299 | status = tr("Confirmed (%1 confirmations)").arg(wtx->status.depth); |
| 300 | break; |
| 301 | case TransactionStatus::Conflicted: |
| 302 | status = tr("Conflicted"); |
| 303 | break; |
| 304 | case TransactionStatus::Immature: |
| 305 | status = tr("Immature (%1 confirmations, will be available after %2)").arg(wtx->status.depth).arg(wtx->status.depth + wtx->status.matures_in); |
| 306 | break; |
| 307 | case TransactionStatus::NotAccepted: |
| 308 | status = tr("Generated but not accepted"); |
| 309 | break; |
| 310 | } |
| 311 | |
| 312 | return status; |
| 313 | } |
| 314 | |
| 315 | QString TransactionTableModel::formatTxDate(const TransactionRecord *wtx) const |
| 316 | { |
nothing calls this directly
no test coverage detected