Browse Source

Add balances warning for syncing

import_zecw
adityapk00 5 years ago
parent
commit
37ab20fef6
  1. 5
      src/mainwindow.cpp
  2. 29
      src/mainwindow.ui
  3. 4
      src/rpc.cpp

5
src/mainwindow.cpp

@ -1018,6 +1018,8 @@ void MainWindow::exportKeys(QString addr) {
void MainWindow::setupBalancesTab() {
ui->unconfirmedWarning->setVisible(false);
ui->lblSyncWarning->setVisible(false);
ui->lblSyncWarningReceive->setVisible(false);
// Double click on balances table
auto fnDoSendFrom = [=](const QString& addr, const QString& to = QString(), bool sendMax = false) {
@ -1275,11 +1277,12 @@ void MainWindow::setupRecieveTab() {
// Connect t-addr radio button
QObject::connect(ui->rdioTAddr, &QRadioButton::toggled, [=] (bool checked) {
// DEPRECATED
// Whenever the t-address is selected, we generate a new address, because we don't
// want to reuse t-addrs
if (checked && this->rpc->getUTXOs() != nullptr) {
updateTAddrCombo(checked);
addNewTAddr();
//addNewTAddr();
}
});

29
src/mainwindow.ui

@ -161,6 +161,19 @@
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="lblSyncWarning">
<property name="styleSheet">
<string notr="true">color:red;</string>
</property>
<property name="text">
<string>Your node is still syncing, balances may not be updated</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="unconfirmedWarning">
<property name="sizePolicy">
@ -346,8 +359,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>920</width>
<height>301</height>
<width>928</width>
<height>353</height>
</rect>
</property>
<layout class="QVBoxLayout" name="sendToLayout">
@ -819,6 +832,16 @@
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="lblSyncWarningReceive">
<property name="styleSheet">
<string notr="true">color: red;</string>
</property>
<property name="text">
<string>Your node is still syncing, balances may not be updated</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
@ -1022,7 +1045,7 @@
<x>0</x>
<y>0</y>
<width>968</width>
<height>22</height>
<height>19</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">

4
src/rpc.cpp

@ -639,6 +639,10 @@ void RPC::getInfoThenRefresh(bool force) {
")";
main->statusLabel->setText(statusText);
// Update the balances view to show a warning if the node is still syncing
ui->lblSyncWarning->setVisible(isSyncing);
ui->lblSyncWarningReceive->setVisible(isSyncing);
auto zecPrice = Settings::getUSDFormat(1);
QString tooltip;
if (connections > 0) {

Loading…
Cancel
Save