fix for SDA
This commit is contained in:
@@ -205,7 +205,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()->getZECPrice();
|
||||
}
|
||||
else {
|
||||
r->currency = Settings::getTokenName();
|
||||
@@ -465,7 +465,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()->getZECPrice() == 0) {
|
||||
for (auto paymentNumber: paymentNumbers) {
|
||||
updatePaymentItem(rpi.getHash(), paymentNumber,
|
||||
"", QObject::tr("No hush price was available to convert from USD"),
|
||||
@@ -475,7 +475,7 @@ void Recurring::executeRecurringPayment(MainWindow* main, RecurringPaymentInfo r
|
||||
}
|
||||
|
||||
// Translate it into hush
|
||||
amount = rpi.amt / Settings::getInstance()->gethushPrice();
|
||||
amount = rpi.amt / Settings::getInstance()->getZECPrice();
|
||||
}
|
||||
|
||||
// Build a Tx
|
||||
|
||||
Reference in New Issue
Block a user