Add confirmations column to Transactions Table. (#168)

* Add confirmations column to Transactions table.

* Fix unsigned int wrapping for confirmation count.
This commit is contained in:
Tom Bradshaw (presstab)
2019-07-23 16:01:09 -06:00
committed by adityapk00
parent bd1edf9f0c
commit 486ee5c2e6
3 changed files with 18 additions and 16 deletions

View File

@@ -506,7 +506,7 @@ void RPC::refreshReceivedZTrans(QList<QString> zaddrs) {
}
auto amount = i["amount"].get<json::number_float_t>();
auto confirmations = (unsigned long)txidInfo["confirmations"].get<json::number_unsigned_t>();
auto confirmations = static_cast<long>(txidInfo["confirmations"].get<json::number_integer_t>());
TransactionItem tx{ QString("receive"), timestamp, zaddr, txid, amount,
confirmations, "", memos.value(zaddr + txid, "") };
@@ -879,7 +879,7 @@ void RPC::refreshTransactions() {
address,
QString::fromStdString(it["txid"]),
it["amount"].get<json::number_float_t>() + fee,
(unsigned long)it["confirmations"].get<json::number_unsigned_t>(),
static_cast<long>(it["confirmations"].get<json::number_unsigned_t>()),
"", "" };
txdata.push_back(tx);
@@ -936,7 +936,7 @@ void RPC::refreshSentZTrans() {
continue;
auto error = j["confirmations"].is_null();
if (!error)
sentTx.confirmations = j["confirmations"].get<json::number_unsigned_t>();
sentTx.confirmations = j["confirmations"].get<json::number_integer_t>();
}
transactionsTableModel->addZSentData(newSentZTxs);