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. 11
      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">

11
src/rpc.cpp

@ -662,6 +662,17 @@ void RPC::getInfoThenRefresh(bool force) {
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.
payload = {
{"jsonrpc", "1.0"},

Loading…
Cancel
Save