|
@ -110,7 +110,7 @@ public class PaymentController extends WalletFormController implements Initializ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
revalidate(amount, amountListener); |
|
|
revalidate(amount, amountListener); |
|
|
maxButton.setDisable(!isValidRecipientAddress()); |
|
|
maxButton.setDisable(!isValidAddressAndLabel()); |
|
|
sendController.updateTransaction(); |
|
|
sendController.updateTransaction(); |
|
|
|
|
|
|
|
|
if(validationSupport != null) { |
|
|
if(validationSupport != null) { |
|
@ -119,6 +119,7 @@ public class PaymentController extends WalletFormController implements Initializ |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
label.textProperty().addListener((observable, oldValue, newValue) -> { |
|
|
label.textProperty().addListener((observable, oldValue, newValue) -> { |
|
|
|
|
|
maxButton.setDisable(!isValidAddressAndLabel()); |
|
|
sendController.getCreateButton().setDisable(sendController.getWalletTransaction() == null || newValue == null || newValue.isEmpty() || sendController.isInsufficientFeeRate()); |
|
|
sendController.getCreateButton().setDisable(sendController.getWalletTransaction() == null || newValue == null || newValue.isEmpty() || sendController.isInsufficientFeeRate()); |
|
|
sendController.updateTransaction(); |
|
|
sendController.updateTransaction(); |
|
|
}); |
|
|
}); |
|
@ -136,7 +137,7 @@ public class PaymentController extends WalletFormController implements Initializ |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
maxButton.setDisable(!isValidRecipientAddress()); |
|
|
maxButton.setDisable(!isValidAddressAndLabel()); |
|
|
sendController.utxoLabelSelectionProperty().addListener((observable, oldValue, newValue) -> { |
|
|
sendController.utxoLabelSelectionProperty().addListener((observable, oldValue, newValue) -> { |
|
|
maxButton.setText("Max" + newValue); |
|
|
maxButton.setText("Max" + newValue); |
|
|
}); |
|
|
}); |
|
@ -175,6 +176,10 @@ public class PaymentController extends WalletFormController implements Initializ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private boolean isValidAddressAndLabel() { |
|
|
|
|
|
return isValidRecipientAddress() && !label.getText().isEmpty(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private Address getRecipientAddress() throws InvalidAddressException { |
|
|
private Address getRecipientAddress() throws InvalidAddressException { |
|
|
return Address.fromString(address.getText()); |
|
|
return Address.fromString(address.getText()); |
|
|
} |
|
|
} |
|
|