From c34b5ad16ade0814c908fdf6ec93fc86555206d8 Mon Sep 17 00:00:00 2001 From: fekt Date: Thu, 11 Apr 2024 00:16:41 -0400 Subject: [PATCH] Dragonify more things --- src/camount.cpp | 2 +- src/controller.h | 2 +- src/recurring.cpp | 6 +++--- src/settings.cpp | 2 +- src/settings.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/camount.cpp b/src/camount.cpp index 90fd732..ee3330c 100644 --- a/src/camount.cpp +++ b/src/camount.cpp @@ -43,7 +43,7 @@ double CAmount::getDblAmount() const QString CAmount::toDecimalUSDString() const { - double price = Settings::getInstance()->getHUSHPrice(); + double price = Settings::getInstance()->getDRAGONXPrice(); return "$ " + QLocale(QLocale::English).toString(this->getDblAmount() * price, 'f', 2); } diff --git a/src/controller.h b/src/controller.h index d9b98f2..48940b9 100644 --- a/src/controller.h +++ b/src/controller.h @@ -46,7 +46,7 @@ public: int _lag; void checkForUpdate(bool silent = true); - void refreshHUSHPrice(); + void refreshDRAGONXPrice(); void refreshEURPrice(); void refreshBTCPrice(); void refreshCNYPrice(); diff --git a/src/recurring.cpp b/src/recurring.cpp index 1089499..403446c 100644 --- a/src/recurring.cpp +++ b/src/recurring.cpp @@ -279,7 +279,7 @@ void Recurring::updateInfoWithTx(RecurringPaymentInfo* r, Tx tx) { r->fromAddr = tx.fromAddr; if (r->currency.isEmpty() || r->currency == "USD") { r->currency = "USD"; - r->amt = tx.toAddrs[0].amount.toqint64() * Settings::getInstance()->getHUSHPrice(); + r->amt = tx.toAddrs[0].amount.toqint64() * Settings::getInstance()->getDRAGONXPrice(); } else { r->currency = Settings::getTokenName(); @@ -547,7 +547,7 @@ void Recurring::executeRecurringPayment(MainWindow* main, RecurringPaymentInfo r double amount = rpi.amt; if (rpi.currency == "USD") { // If there is no price, then fail the payment - if (Settings::getInstance()->getHUSHPrice() == 0) { + if (Settings::getInstance()->getDRAGONXPrice() == 0) { for (auto paymentNumber: paymentNumbers) { updatePaymentItem(rpi.getHash(), paymentNumber, "", QObject::tr("No hush price was available to convert from USD"), @@ -559,7 +559,7 @@ void Recurring::executeRecurringPayment(MainWindow* main, RecurringPaymentInfo r } // Translate it into hush - amount = rpi.amt / Settings::getInstance()->getHUSHPrice(); + amount = rpi.amt / Settings::getInstance()->getDRAGONXPrice(); } // Build a Tx diff --git a/src/settings.cpp b/src/settings.cpp index ff545a6..11eac8b 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -132,7 +132,7 @@ bool Settings::isSaplingActive() { return (isTestnet() && getBlockNumber() > 0) || (!isTestnet() && getBlockNumber() > 0); } -double Settings::getHUSHPrice() { +double Settings::getDRAGONXPrice() { return HUSHPrice; } double Settings::getEURPrice() { diff --git a/src/settings.h b/src/settings.h index 30b9434..42af971 100644 --- a/src/settings.h +++ b/src/settings.h @@ -114,7 +114,7 @@ public: void setINRCAP(double p) { INRCAP = p; } void setGBPCAP(double p) { GBPCAP = p; } void setAUDCAP(double p) { AUDCAP = p; } - double getHUSHPrice(); + double getDRAGONXPrice(); double getEURPrice(); double getBTCPrice(); double getCNYPrice();