mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
show an error if amount is not valid (either the amount or decimals is empty)
This commit is contained in:
parent
6ed283946c
commit
929eb9dc6c
@ -49,6 +49,8 @@ void BitcoinAmountField::setText(const QString &text)
|
|||||||
|
|
||||||
QString BitcoinAmountField::text() const
|
QString BitcoinAmountField::text() const
|
||||||
{
|
{
|
||||||
|
if(amount->text().isEmpty() || decimals->text().isEmpty())
|
||||||
|
return QString();
|
||||||
return amount->text() + QString(".") + decimals->text();
|
return amount->text() + QString(".") + decimals->text();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,10 +48,10 @@ void SendCoinsDialog::on_sendButton_clicked()
|
|||||||
|
|
||||||
valid = GUIUtil::parseMoney(payAmount, &payAmountParsed);
|
valid = GUIUtil::parseMoney(payAmount, &payAmountParsed);
|
||||||
|
|
||||||
if(!valid)
|
if(!valid || payAmount.isEmpty())
|
||||||
{
|
{
|
||||||
QMessageBox::warning(this, tr("Send Coins"),
|
QMessageBox::warning(this, tr("Send Coins"),
|
||||||
tr("The amount to pay must be a valid number."),
|
tr("Must fill in an amount to pay."),
|
||||||
QMessageBox::Ok, QMessageBox::Ok);
|
QMessageBox::Ok, QMessageBox::Ok);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user