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
This commit is contained in:
Andymeows 2014-09-07 01:00:34 -05:00
parent 621e99b702
commit b2e4d66dca

View File

@ -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.<br/>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<SendCoinsRecipient> recipients;
quint64 amount = amountInput.toULongLong() * COIN;
quint64 amount = (quint64) ( amountInput.toFloat() * COIN );
foreach(const QString &dest, recipientPubKeyHashes)
{