Show confirmations

This commit is contained in:
Aditya Kulkarni
2019-10-18 11:58:03 -07:00
parent e3ac42adfc
commit 5d86deeb5f
4 changed files with 17 additions and 5 deletions

View File

@@ -191,6 +191,7 @@ void Controller::getInfoThenRefresh(bool force) {
static int lastBlock = 0;
int curBlock = reply["latest_block_height"].get<json::number_integer_t>();
model->setLatestBlock(curBlock);
//int version = reply["version"].get<json::string_t>();
int version = 1;
Settings::getInstance()->setZcashdVersion(version);
@@ -334,8 +335,7 @@ void Controller::refreshTransactions() {
return noConnection();
zrpc->fetchTransactions([=] (json reply) {
QList<TransactionItem> txdata;
QList<TransactionItem> txdata;
for (auto& it : reply.get<json::array_t>()) {
QString address;
@@ -369,7 +369,7 @@ void Controller::refreshTransactions() {
it["block_height"].get<json::number_unsigned_t>(),
address,
QString::fromStdString(it["txid"]),
1,
model->getLatestBlock() - it["block_height"].get<json::number_unsigned_t>(),
items
});
} else {
@@ -382,7 +382,7 @@ void Controller::refreshTransactions() {
it["block_height"].get<json::number_unsigned_t>(),
address,
QString::fromStdString(it["txid"]),
1,
model->getLatestBlock() - it["block_height"].get<json::number_unsigned_t>(),
items
};