Browse Source

add txcount to hushd tab

pull/99/head
Jonathan "Duke" Leto 5 years ago
parent
commit
c74332ddaa
  1. 23
      src/mainwindow.ui
  2. 15
      src/rpc.cpp

23
src/mainwindow.ui

@ -1267,6 +1267,29 @@
</widget>
</item>
<item row="19" column="0">
<widget class="QLabel" name="txcountlabel">
<property name="text">
<string>Wallet Transactions</string>
</property>
</widget>
</item>
<item row="19" column="2">
<widget class="QLabel" name="txcount">
<property name="text">
<string>Loading...</string>
</property>
</widget>
</item>
<item row="19" column="1">
<widget class="QLabel" name="txcountspacer">
<property name="text">
<string>|</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="solrate">
<property name="text">

15
src/rpc.cpp

@ -601,7 +601,7 @@ void RPC::getInfoThenRefresh(bool force) {
Settings::getInstance()->setZcashdVersion(version);
ui->longestchain->setText(QString::number(longestchain));
ui->longestchain->setText(QString::number(longestchain));
ui->notarizedhashvalue->setText( ntzhash );
ui->notarizedtxidvalue->setText( ntztxid );
ui->lagvalue->setText( QString::number(lag) );
@ -659,7 +659,18 @@ void RPC::getInfoThenRefresh(bool force) {
QString localservices = QString::fromStdString( reply["localservices"].get<json::string_t>() );
ui->clientname->setText(clientname);
ui->localservices->setText(localservices);
ui->localservices->setText(localservices);
});
payload = {
{"jsonrpc", "1.0"},
{"id", "someid"},
{"method", "getwalletinfo"}
};
conn->doRPCIgnoreError(payload, [=](const json& reply) {
int txcount = reply["txcount"].get<json::number_integer_t>();
ui->txcount->setText(QString::number(txcount));
});
// Call to see if the blockchain is syncing.

Loading…
Cancel
Save