From b2e4d66dca45fcae3fa414668121b2f9bc985f37 Mon Sep 17 00:00:00 2001 From: Andymeows Date: Sun, 7 Sep 2014 01:00:34 -0500 Subject: [PATCH] Adding an early return for values that indicate 0 DOGE to send to the paper wallets. Add the ability to send fractional amounts to paper wallets --- src/qt/utilitydialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp index 52d62ace0..16aa5d0a0 100644 --- a/src/qt/utilitydialog.cpp +++ b/src/qt/utilitydialog.cpp @@ -300,7 +300,7 @@ void PaperWalletDialog::on_printButton_clicked() QString amountInput = QInputDialog::getText(this, tr("Load Paper Wallets"), tr("Please wait for wallets to print and verify readability.
Enter the number of DOGE you wish to send to each wallet:"), QLineEdit::Normal, QString(), &ok); - if(!ok) { + if(!ok || amountInput == "0" || amountInput == "0.0") { return; } @@ -312,7 +312,7 @@ void PaperWalletDialog::on_printButton_clicked() } QList recipients; - quint64 amount = amountInput.toULongLong() * COIN; + quint64 amount = (quint64) ( amountInput.toFloat() * COIN ); foreach(const QString &dest, recipientPubKeyHashes) {