add Hush Price to status bar
This commit is contained in:
@@ -43,7 +43,7 @@ void ConnectionLoader::doAutoConnect() {
|
|||||||
|
|
||||||
auto config = std::shared_ptr<ConnectionConfig>(new ConnectionConfig());
|
auto config = std::shared_ptr<ConnectionConfig>(new ConnectionConfig());
|
||||||
config->dangerous = true;
|
config->dangerous = true;
|
||||||
config->server = QString("127.0.0.1:9069");
|
config->server = QString("https://hush-lightwallet.de:439");
|
||||||
|
|
||||||
// Initialize the library
|
// Initialize the library
|
||||||
main->logger->write(QObject::tr("Attempting to initialize"));
|
main->logger->write(QObject::tr("Attempting to initialize"));
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ void Controller::setConnection(Connection* c) {
|
|||||||
|
|
||||||
this->zrpc->setConnection(c);
|
this->zrpc->setConnection(c);
|
||||||
|
|
||||||
ui->statusBar->showMessage("Your hushd is connected");
|
ui->statusBar->showMessage("Connectet with https://hush-lightwallet.de");
|
||||||
|
|
||||||
// See if we need to remove the reindex/rescan flags from the hush.conf file
|
// See if we need to remove the reindex/rescan flags from the hush.conf file
|
||||||
auto hushConfLocation = Settings::getInstance()->gethushdConfLocation();
|
auto hushConfLocation = Settings::getInstance()->gethushdConfLocation();
|
||||||
@@ -177,10 +177,11 @@ void Controller::getInfoThenRefresh(bool force) {
|
|||||||
|
|
||||||
// Connected, so display checkmark.
|
// Connected, so display checkmark.
|
||||||
QIcon i(":/icons/res/connected.gif");
|
QIcon i(":/icons/res/connected.gif");
|
||||||
main->statusLabel->setText(chainName + "(" + QString::number(curBlock) + ")");
|
main->statusLabel->setText( "connected" "(" + QString::number(curBlock) + ")");
|
||||||
|
main->statusLabel->setText(" HUSH/USD=$" + QString::number( (double) Settings::getInstance()->gethushPrice() ));
|
||||||
main->statusIcon->setPixmap(i.pixmap(16, 16));
|
main->statusIcon->setPixmap(i.pixmap(16, 16));
|
||||||
|
|
||||||
//int version = reply["version"].get<json::string_t>();
|
//int version = reply["version"].get<json::string_t>();
|
||||||
int version = 1;
|
int version = 1;
|
||||||
Settings::getInstance()->sethushdVersion(version);
|
Settings::getInstance()->sethushdVersion(version);
|
||||||
|
|
||||||
@@ -559,7 +560,7 @@ void Controller::refreshhushPrice() {
|
|||||||
//QString price = QString::fromStdString(hush["usd"].get<json::string_t>());
|
//QString price = QString::fromStdString(hush["usd"].get<json::string_t>());
|
||||||
qDebug() << "HUSH = $" << QString::number((double)hush["usd"]);
|
qDebug() << "HUSH = $" << QString::number((double)hush["usd"]);
|
||||||
Settings::getInstance()->sethushPrice( hush["usd"] );
|
Settings::getInstance()->sethushPrice( hush["usd"] );
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
// If anything at all goes wrong, just set the price to 0 and move on.
|
// If anything at all goes wrong, just set the price to 0 and move on.
|
||||||
|
|||||||
Reference in New Issue
Block a user