Fix no connection status on sync
This commit is contained in:
@@ -242,6 +242,7 @@ void Controller::fillTxJsonParams(json& allRecepients, Tx tx)
|
|||||||
|
|
||||||
void Controller::noConnection()
|
void Controller::noConnection()
|
||||||
{
|
{
|
||||||
|
qDebug()<< __func__;
|
||||||
QIcon i = QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical);
|
QIcon i = QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical);
|
||||||
main->statusIcon->setPixmap(i.pixmap(16, 16));
|
main->statusIcon->setPixmap(i.pixmap(16, 16));
|
||||||
main->statusIcon->setToolTip("");
|
main->statusIcon->setToolTip("");
|
||||||
@@ -272,8 +273,9 @@ void Controller::noConnection()
|
|||||||
/// This will refresh all the balance data from hushd
|
/// This will refresh all the balance data from hushd
|
||||||
void Controller::refresh(bool force)
|
void Controller::refresh(bool force)
|
||||||
{
|
{
|
||||||
|
qDebug()<< __func__;
|
||||||
if (!zrpc->haveConnection())
|
if (!zrpc->haveConnection())
|
||||||
return noConnection();
|
return;
|
||||||
|
|
||||||
getInfoThenRefresh(force);
|
getInfoThenRefresh(force);
|
||||||
}
|
}
|
||||||
@@ -298,6 +300,7 @@ void Controller::processInfo(const json& info)
|
|||||||
|
|
||||||
void Controller::getInfoThenRefresh(bool force)
|
void Controller::getInfoThenRefresh(bool force)
|
||||||
{
|
{
|
||||||
|
qDebug()<< __func__;
|
||||||
if (!zrpc->haveConnection())
|
if (!zrpc->haveConnection())
|
||||||
return noConnection();
|
return noConnection();
|
||||||
|
|
||||||
@@ -624,6 +627,7 @@ void Controller::setLag(int lag)
|
|||||||
|
|
||||||
void Controller::refreshAddresses()
|
void Controller::refreshAddresses()
|
||||||
{
|
{
|
||||||
|
qDebug()<< __func__;
|
||||||
if (!zrpc->haveConnection())
|
if (!zrpc->haveConnection())
|
||||||
return noConnection();
|
return noConnection();
|
||||||
|
|
||||||
@@ -876,6 +880,7 @@ void Controller::updateUIBalances()
|
|||||||
|
|
||||||
void Controller::refreshBalances()
|
void Controller::refreshBalances()
|
||||||
{
|
{
|
||||||
|
qDebug()<< __func__;
|
||||||
if (!zrpc->haveConnection())
|
if (!zrpc->haveConnection())
|
||||||
return noConnection();
|
return noConnection();
|
||||||
|
|
||||||
@@ -929,6 +934,7 @@ void Controller::refreshBalances()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Controller::refreshTransactions() {
|
void Controller::refreshTransactions() {
|
||||||
|
qDebug()<< __func__;
|
||||||
if (!zrpc->haveConnection())
|
if (!zrpc->haveConnection())
|
||||||
return noConnection();
|
return noConnection();
|
||||||
|
|
||||||
@@ -1544,6 +1550,7 @@ void Controller::executeTransaction(Tx tx,
|
|||||||
|
|
||||||
void Controller::checkForUpdate(bool silent)
|
void Controller::checkForUpdate(bool silent)
|
||||||
{
|
{
|
||||||
|
qDebug()<< __func__;
|
||||||
// No checking for updates, needs testing with Gitea
|
// No checking for updates, needs testing with Gitea
|
||||||
return;
|
return;
|
||||||
if (!zrpc->haveConnection())
|
if (!zrpc->haveConnection())
|
||||||
@@ -1634,10 +1641,11 @@ void Controller::checkForUpdate(bool silent)
|
|||||||
// Get the hush->USD price from coinmarketcap using their API
|
// Get the hush->USD price from coinmarketcap using their API
|
||||||
void Controller::refreshHUSHPrice()
|
void Controller::refreshHUSHPrice()
|
||||||
{
|
{
|
||||||
|
qDebug()<< __func__;
|
||||||
if (!zrpc->haveConnection())
|
if (!zrpc->haveConnection())
|
||||||
return noConnection();
|
return;
|
||||||
|
|
||||||
// TODO: use/render all this data
|
// TODO: use/render all this data
|
||||||
QUrl cmcURL("https://api.coingecko.com/api/v3/simple/price?ids=hush&vs_currencies=btc%2Cusd%2Ceur%2Ceth%2Cgbp%2Ccny%2Cjpy%2Crub%2Ccad%2Csgd%2Cchf%2Cinr%2Caud%2Cinr&include_market_cap=true&include_24hr_vol=true&include_24hr_change=true");
|
QUrl cmcURL("https://api.coingecko.com/api/v3/simple/price?ids=hush&vs_currencies=btc%2Cusd%2Ceur%2Ceth%2Cgbp%2Ccny%2Cjpy%2Crub%2Ccad%2Csgd%2Cchf%2Cinr%2Caud%2Cinr&include_market_cap=true&include_24hr_vol=true&include_24hr_change=true");
|
||||||
|
|
||||||
QNetworkRequest req;
|
QNetworkRequest req;
|
||||||
|
|||||||
Reference in New Issue
Block a user