From ea56942ba956ea2e462c5f0f4f9904e2f734fa36 Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Fri, 15 Feb 2019 06:56:23 -0800 Subject: [PATCH] Revert "#69 - Use system locale to parse amounts" This reverts commit 8bdd9e8365bfe4fd1d8d63d41a62a0c199cdebc2. --- src/sendtab.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/sendtab.cpp b/src/sendtab.cpp index d955d42..878e0dd 100644 --- a/src/sendtab.cpp +++ b/src/sendtab.cpp @@ -439,8 +439,6 @@ Tx MainWindow::createTxFromSendPage() { // For each addr/amt in the sendTo tab int totalItems = ui->sendToWidgets->children().size() - 2; // The last one is a spacer, so ignore that double totalAmt = 0; - QLocale locale = QLocale::system(); - for (int i=0; i < totalItems; i++) { QString addr = ui->sendToWidgets->findChild(QString("Address") % QString::number(i+1))->text().trimmed(); // Remove label if it exists @@ -449,7 +447,7 @@ Tx MainWindow::createTxFromSendPage() { // If address is sprout, then we can't send change to sapling, because of turnstile. sendChangeToSapling = sendChangeToSapling && !Settings::getInstance()->isSproutAddress(addr); - double amt = locale.toDouble(ui->sendToWidgets->findChild(QString("Amount") % QString::number(i+1))->text().trimmed()); + double amt = ui->sendToWidgets->findChild(QString("Amount") % QString::number(i+1))->text().trimmed().toDouble(); totalAmt += amt; QString memo = ui->sendToWidgets->findChild(QString("MemoTxt") % QString::number(i+1))->text().trimmed(); @@ -457,7 +455,7 @@ Tx MainWindow::createTxFromSendPage() { } if (Settings::getInstance()->getAllowCustomFees()) { - tx.fee = locale.toDouble(ui->minerFeeAmt->text()); + tx.fee = ui->minerFeeAmt->text().toDouble(); } else { tx.fee = Settings::getMinerFee();