New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix problems with editing account names #6167
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NACK - Still broken when switching back to not use a custom account name
Apr.-26 11:00:03.709 [JavaFX Application Thread] ERROR bisq.common.setup.CommonSetup: Uncaught Exception from thread JavaFX Application Thread
Apr.-26 11:00:03.709 [JavaFX Application Thread] ERROR bisq.common.setup.CommonSetup: throwableMessage= Cannot invoke "bisq.desktop.components.InputTextField.getText()" because "this.bankIdInputTextField" is null
Apr.-26 11:00:03.709 [JavaFX Application Thread] ERROR bisq.common.setup.CommonSetup: throwableClass= class java.lang.NullPointerException
Apr.-26 11:00:03.709 [JavaFX Application Thread] ERROR bisq.common.setup.CommonSetup: Stack trace:
java.lang.NullPointerException: Cannot invoke "bisq.desktop.components.InputTextField.getText()" because "this.bankIdInputTextField" is null
at bisq.desktop.components.paymentmethods.GeneralBankForm.autoFillAccountTextFields(GeneralBankForm.java:145)
at bisq.desktop.components.paymentmethods.BankForm.autoFillNameTextField(BankForm.java:401)
at bisq.desktop.components.paymentmethods.PaymentMethodForm.lambda$addAccountNameTextFieldWithAutoFillToggleButton$2(PaymentMethodForm.java:144)
|
||
|
||
BankAccountPayload bankAccountPayload = null; | ||
CashDepositAccountPayload cashDepositAccountPayload = null; | ||
if (paymentAccountPayload instanceof BankAccountPayload) { | ||
bankAccountPayload = (BankAccountPayload) paymentAccountPayload; | ||
} else if (paymentAccountPayload instanceof CashDepositAccountPayload) { | ||
cashDepositAccountPayload = (CashDepositAccountPayload) paymentAccountPayload; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like it so much having those checks in the abstract class for specific implementations. I think it would be better to have a getBankId, getBranchId, getBankName and getAccountNr implementation in the CashDeposit and BankAccount forms WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in latest commit.
Code could be even more simplified when CashDepositAccountPayload
extends BankAccountPayload
- do you see any obstacles from doing it (in this pull request)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think - let's keep it to a minimum for now. I'll test it now.
Fixes #6162