fix for SDA

This commit is contained in:
DenioD
2019-10-30 15:50:47 +01:00
parent d57c4ccfef
commit 0590d14693
7 changed files with 19 additions and 19 deletions

View File

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