diff --git a/src/controller.cpp b/src/controller.cpp index f6eac3b..587ed7d 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -254,6 +254,16 @@ void Controller::getInfoThenRefresh(bool force) { model->setEncryptionStatus(isEncrypted, isLocked); }); + zrpc->fetchSupply([=] (const json& reply) { + + int supply = reply["supply"].get(); + ui->supply_taddr->setText(QString::number(supply)); + int zfunds = reply["zfunds"].get(); + ui->supply_zaddr->setText(QString::number(zfunds)); + int total = reply["total"].get(); + ui->supply_total->setText(QString::number(total)); + }); + if ( doUpdate ) { // Something changed, so refresh everything. refreshBalances(); diff --git a/src/liteinterface.cpp b/src/liteinterface.cpp index 57eaeb1..f430664 100644 --- a/src/liteinterface.cpp +++ b/src/liteinterface.cpp @@ -137,6 +137,13 @@ void LiteInterface::fetchInfo(const std::function& cb, conn->doRPC("info", "", cb, err); } +void LiteInterface::fetchSupply(const std::function& cb) { + if (conn == nullptr) + return; + + conn->doRPCWithDefaultErrorHandling("coinsupply", "", cb); +} + void LiteInterface::fetchLatestBlock(const std::function& cb, const std::function& err) { diff --git a/src/liteinterface.h b/src/liteinterface.h index 43c5e6c..842fd1c 100644 --- a/src/liteinterface.h +++ b/src/liteinterface.h @@ -45,6 +45,8 @@ public: void fetchInfo(const std::function& cb, const std::function& err); + + void fetchLatestBlock(const std::function& cb, const std::function& err); @@ -62,6 +64,7 @@ public: void clearWallet(const std::function& cb); void fetchWalletEncryptionStatus(const std::function& cb); + void fetchSupply(const std::function& cb); void encryptWallet(QString password, const std::function& cb); void unlockWallet(QString password, const std::function& cb); void removeWalletEncryption(QString password, const std::function& cb); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 7effeea..f8286a9 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -18,11 +18,11 @@ :/icons/res/icon.ico:/icons/res/icon.ico - - + + - 2 + 4 @@ -948,7 +948,7 @@ - Hush Daemon + Information about Hush @@ -972,8 +972,8 @@ - - + + Qt::Vertical @@ -986,7 +986,7 @@ - + @@ -998,168 +998,235 @@ - + Qt::Horizontal - - - - BlockHeight - - + + + + + + | + + + + + + + Loading... + + + + + + + | + + + + + + + Next Halving + + + + + + + Loading... + + + + + + + | + + + + + + + Loading... + + + + + + + Vendor + + + + + + + Loading... + + + + + + + Loading... + + + + + + + Loading... + + + + + + + Loading... + + + + + + + | + + + + + + + | + + + + + + + Difficulty + + + + + + + | + + + + + + + Last Notarized Block + + + + + + + Loading... + + + + + + + | + + + + + + + Total Supply + + + + + + + | + + + + + + + Longestchain + + + + + + + | + + + + + + + Version hushlightd + + + + + + + BlockHeight + + + + + + + Supply zAddr + + + + + + + | + + + + + + + Loading... + + + + + + + Loading... + + + + + + + Supply tAddr + + + + - - - - | - - - - - - - Loading... - - - - - - - Vendor - - - - - - - | - - - - - - - Loading... - - - - - - - Version hushlightd - - - - - - - | - - - - - - - Loading... - - - - - - - Next Halving - - - - - - - | - - - - - - - Loading... - - - - - - - Last Notarized Block - - - - - - - | - - - - - - - Loading... - - - - - - - Longestchain - - - - - - - | - - - - - - - Loading... - - - - - - - Difficulty - - - - - - - | - - - - - - - Loading... - - - - + Qt::Horizontal - + @@ -1171,70 +1238,74 @@ - + Qt::Horizontal - - - - Market Cap - - + + + + + + Loading... + + + + + + + Market Cap + + + + + + + | + + + + + + + Loading... + + + + + + + Volume on Exchanges + + + + + + + | + + + + - - - - | - - - - - - - Loading... - - - - - - - Volume on Exchanges - - - - - - - | - - - - - - - Loading... - - - - + Qt::Horizontal - + This is a Lightwallet, you cant mine with it! - + Qt::Vertical