mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-11-05 11:56:37 +00:00
Strip leading and trailing whitespace from input address
This commit is contained in:
parent
b52be27a99
commit
cf7518b85d
1 changed files with 47 additions and 42 deletions
|
|
@ -211,6 +211,8 @@ public class PaymentController extends WalletFormController implements Initializ
|
|||
});
|
||||
|
||||
address.textProperty().addListener((observable, oldValue, newValue) -> {
|
||||
String strippedNewValue = newValue.strip();
|
||||
if (newValue.equals(strippedNewValue)) {
|
||||
address.leftProperty().set(null);
|
||||
|
||||
if(payNymProperty.get() != null && !newValue.equals(payNymProperty.get().nymName())) {
|
||||
|
|
@ -258,6 +260,9 @@ public class PaymentController extends WalletFormController implements Initializ
|
|||
if(validationSupport != null) {
|
||||
validationSupport.setErrorDecorationEnabled(true);
|
||||
}
|
||||
} else {
|
||||
address.setText(strippedNewValue);
|
||||
}
|
||||
});
|
||||
|
||||
label.textProperty().addListener((observable, oldValue, newValue) -> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue