diff --git a/src/controller.cpp b/src/controller.cpp index 996690b..f46d306 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -334,7 +334,7 @@ void Controller::refreshTransactions() { for (auto& it : reply.get()) { QString address; - qint64 total_amount; + qint64 total_amount = 0; QList items; // First, check if there's outgoing metadata diff --git a/src/recurring.cpp b/src/recurring.cpp index 304ad0e..4bb79bf 100644 --- a/src/recurring.cpp +++ b/src/recurring.cpp @@ -460,7 +460,7 @@ void Recurring::processMultiplePending(RecurringPaymentInfo rpi, MainWindow* mai void Recurring::executeRecurringPayment(MainWindow* main, RecurringPaymentInfo rpi, QList paymentNumbers) { // Amount is in USD or ZEC? - auto amt = rpi.amt; + qint64 amt = Settings::getAmountFromUserDecimalStr(QString::number(rpi.amt, 'f', 8)); if (rpi.currency == "USD") { // If there is no price, then fail the payment if (Settings::getInstance()->getZECPrice() == 0) { diff --git a/src/websockets.cpp b/src/websockets.cpp index 660f06a..5bf8edb 100644 --- a/src/websockets.cpp +++ b/src/websockets.cpp @@ -658,7 +658,7 @@ void AppDataServer::processSendTx(QJsonObject sendTx, MainWindow* mainwindow, st tx.fee = Settings::getMinerFee(); // Find a from address that has at least the sending amout - double amt = sendTx["amount"].toString().toDouble(); + qint64 amt = Settings::getAmountFromUserDecimalStr(sendTx["amount"].toString()); auto allBalances = mainwindow->getRPC()->getModel()->getAllBalances(); QList> bals; for (auto i : allBalances.keys()) {