1
0
mirror of https://github.com/ACINQ/eclair.git synced 2024-11-20 10:39:19 +01:00

Received amount must no be greater than 4 294 967 295 msat

This commit is contained in:
dpad85 2017-02-02 16:11:47 +01:00
parent 2d7d9a7528
commit c3772268c9

View File

@ -29,7 +29,7 @@ class ReceivePaymentController(val handlers: Handlers, val stage: Stage, val set
@FXML def handleGenerate(event: ActionEvent): Unit = {
if (GUIValidators.validate(amount.getText, amountError, "Amount must be numeric", GUIValidators.amountRegex)
&& GUIValidators.validate(amountError, "Amount must be greater than 0", amount.getText.toLong > 0)
&& GUIValidators.validate(amountError, "Amount must be 4200000 satoshis or less", amount.getText.toLong <= 4200000)) {
&& GUIValidators.validate(amountError, "Must be 4 294 967 295 mSat (~0.042 BTC) or less", amount.getText.toLong <= 4294967295L)) {
Try(amount.getText.toLong) match {
case Success(amountMsat) => handlers.getPaymentRequest(amount.getText.toLong, paymentRequest)
case _ => {}