Fix Transaction decimal

This commit is contained in:
DenioD
2019-10-26 12:53:09 +02:00
parent 9808e65293
commit 2f4e024fdc
11 changed files with 23 additions and 25 deletions

View File

@@ -511,22 +511,17 @@ Tx MainWindow::createTxFromSendPage() {
// If address is sprout, then we can't send change to sapling, because of turnstile.
sendChangeToSapling = sendChangeToSapling && !Settings::getInstance()->isSproutAddress(addr);
QString amtStr = ui->sendToWidgets->findChild<QLineEdit*>(QString("Amount") % QString::number(i+1))->text().trimmed();
if (amtStr.isEmpty()) {
amtStr = "-1";; // The user didn't specify an amount
}
double amt = amtStr.toDouble();
double amt = ui->sendToWidgets->findChild<QLineEdit*>(QString("Amount") % QString::number(i+1))->text().trimmed().toDouble();
totalAmt += amt;
QString memo = ui->sendToWidgets->findChild<QLabel*>(QString("MemoTxt") % QString::number(i+1))->text().trimmed();
tx.toAddrs.push_back( ToFields{addr, amt, memo} );
tx.toAddrs.push_back( ToFields{addr, amt, memo,} );
}
if (Settings::getInstance()->getAllowCustomFees()) {
tx.fee = ui->minerFeeAmt->text().toDouble();
} else {
}
else {
tx.fee = Settings::getMinerFee();
}