[bisq-network/bisq] Added check for empty validation (#3573)

Christoph Atteneder notifications at github.com
Wed Nov 13 10:57:17 UTC 2019


ripcurlx requested changes on this pull request.

NACK - Just move the one trim of the setAccountNameWithString to the PaymentMethodForm and utACk for the rest.

> @@ -240,28 +240,28 @@ public void addFormForAddAccount() {
         bankNameInputTextField = addInputTextField(gridPane, ++gridRow, Res.get("payment.bank.name"));
 
         bankNameInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
-            bankAccountPayload.setBankName(newValue);
+            bankAccountPayload.setBankName(newValue.trim());

I think the Payload objects should be POJOs without validation or verification code IMO. In that case the BankForm is an abstract class anyways and will be reused by all BankForm implementations.

> @@ -75,7 +75,7 @@ public void addFormForAddAccount() {
 
     @Override
     protected void autoFillNameTextField() {
-        setAccountNameWithString(accountIdInputTextField.getText());
+        setAccountNameWithString(accountIdInputTextField.getText().trim());

Here it makes sense to move the trim into the PaymentMethodForm as there is no value to pollute your account name (displayed to creator only) with additional spaces. So it would help to remove unnecessary whitespaces that were added by mistake.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/3573#pullrequestreview-316155544
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191113/5864cb15/attachment.html>


More information about the bisq-github mailing list