Dragonify more things

This commit is contained in:
fekt
2024-04-11 00:16:41 -04:00
parent b61085de60
commit c34b5ad16a
5 changed files with 7 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ double CAmount::getDblAmount() const
QString CAmount::toDecimalUSDString() 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); return "$ " + QLocale(QLocale::English).toString(this->getDblAmount() * price, 'f', 2);
} }

View File

@@ -46,7 +46,7 @@ public:
int _lag; int _lag;
void checkForUpdate(bool silent = true); void checkForUpdate(bool silent = true);
void refreshHUSHPrice(); void refreshDRAGONXPrice();
void refreshEURPrice(); void refreshEURPrice();
void refreshBTCPrice(); void refreshBTCPrice();
void refreshCNYPrice(); void refreshCNYPrice();

View File

@@ -279,7 +279,7 @@ void Recurring::updateInfoWithTx(RecurringPaymentInfo* r, Tx tx) {
r->fromAddr = tx.fromAddr; r->fromAddr = tx.fromAddr;
if (r->currency.isEmpty() || r->currency == "USD") { if (r->currency.isEmpty() || r->currency == "USD") {
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 { else {
r->currency = Settings::getTokenName(); r->currency = Settings::getTokenName();
@@ -547,7 +547,7 @@ void Recurring::executeRecurringPayment(MainWindow* main, RecurringPaymentInfo r
double amount = rpi.amt; double amount = rpi.amt;
if (rpi.currency == "USD") { if (rpi.currency == "USD") {
// If there is no price, then fail the payment // If there is no price, then fail the payment
if (Settings::getInstance()->getHUSHPrice() == 0) { if (Settings::getInstance()->getDRAGONXPrice() == 0) {
for (auto paymentNumber: paymentNumbers) { for (auto paymentNumber: paymentNumbers) {
updatePaymentItem(rpi.getHash(), paymentNumber, updatePaymentItem(rpi.getHash(), paymentNumber,
"", QObject::tr("No hush price was available to convert from USD"), "", 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 // Translate it into hush
amount = rpi.amt / Settings::getInstance()->getHUSHPrice(); amount = rpi.amt / Settings::getInstance()->getDRAGONXPrice();
} }
// Build a Tx // Build a Tx

View File

@@ -132,7 +132,7 @@ bool Settings::isSaplingActive() {
return (isTestnet() && getBlockNumber() > 0) || (!isTestnet() && getBlockNumber() > 0); return (isTestnet() && getBlockNumber() > 0) || (!isTestnet() && getBlockNumber() > 0);
} }
double Settings::getHUSHPrice() { double Settings::getDRAGONXPrice() {
return HUSHPrice; return HUSHPrice;
} }
double Settings::getEURPrice() { double Settings::getEURPrice() {

View File

@@ -114,7 +114,7 @@ public:
void setINRCAP(double p) { INRCAP = p; } void setINRCAP(double p) { INRCAP = p; }
void setGBPCAP(double p) { GBPCAP = p; } void setGBPCAP(double p) { GBPCAP = p; }
void setAUDCAP(double p) { AUDCAP = p; } void setAUDCAP(double p) { AUDCAP = p; }
double getHUSHPrice(); double getDRAGONXPrice();
double getEURPrice(); double getEURPrice();
double getBTCPrice(); double getBTCPrice();
double getCNYPrice(); double getCNYPrice();