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
{
double price = Settings::getInstance()->getHUSHPrice();
double price = Settings::getInstance()->getDRAGONXPrice();
return "$ " + QLocale(QLocale::English).toString(this->getDblAmount() * price, 'f', 2);
}

View File

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

View File

@@ -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

View File

@@ -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() {

View File

@@ -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();