diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/PaymentMethodForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/PaymentMethodForm.java index 2f962975e7d..42b2b922142 100644 --- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/PaymentMethodForm.java +++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/PaymentMethodForm.java @@ -189,27 +189,29 @@ else if (!paymentAccount.getTradeCurrencies().isEmpty()) else addTopLabelTextField(gridPane, ++gridRow, Res.get("payment.limitations"), limitationsText); - if (isAddAccountScreen) { - InputTextField inputTextField = addInputTextField(gridPane, ++gridRow, Res.get("payment.salt"), 0); - inputTextField.setText(Utilities.bytesAsHexString(paymentAccount.getPaymentAccountPayload().getSalt())); - inputTextField.textProperty().addListener((observable, oldValue, newValue) -> { - if (!newValue.isEmpty()) { - try { - // test if input is hex - Utilities.decodeFromHex(newValue); - - paymentAccount.setSaltAsHex(newValue); - } catch (Throwable t) { - new Popup().warning(Res.get("payment.error.noHexSalt")).show(); - inputTextField.setText(Utilities.bytesAsHexString(paymentAccount.getPaymentAccountPayload().getSalt())); - log.warn(t.toString()); + if (!(paymentAccount instanceof AssetAccount)) { + if (isAddAccountScreen) { + InputTextField inputTextField = addInputTextField(gridPane, ++gridRow, Res.get("payment.salt"), 0); + inputTextField.setText(Utilities.bytesAsHexString(paymentAccount.getPaymentAccountPayload().getSalt())); + inputTextField.textProperty().addListener((observable, oldValue, newValue) -> { + if (!newValue.isEmpty()) { + try { + // test if input is hex + Utilities.decodeFromHex(newValue); + + paymentAccount.setSaltAsHex(newValue); + } catch (Throwable t) { + new Popup().warning(Res.get("payment.error.noHexSalt")).show(); + inputTextField.setText(Utilities.bytesAsHexString(paymentAccount.getPaymentAccountPayload().getSalt())); + log.warn(t.toString()); + } } - } - }); - } else { - addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.salt", - Utilities.bytesAsHexString(paymentAccount.getPaymentAccountPayload().getSalt())), - Utilities.bytesAsHexString(paymentAccount.getPaymentAccountPayload().getSalt())); + }); + } else { + addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.salt", + Utilities.bytesAsHexString(paymentAccount.getPaymentAccountPayload().getSalt())), + Utilities.bytesAsHexString(paymentAccount.getPaymentAccountPayload().getSalt())); + } } }