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
Move Payment account creation and removal from UI to core #3586
Conversation
18a5082
to
a98cf1b
Compare
core/src/main/java/bisq/core/payment/validation/AltCoinAddressValidator.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/payment/PaymentAccountManager.java
Outdated
Show resolved
Hide resolved
...rc/main/java/bisq/desktop/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java
Outdated
Show resolved
Hide resolved
|
||
if (!(paymentAccount instanceof AssetAccount)) | ||
accountAgeWitnessService.publishMyAccountAgeWitness(paymentAccount.getPaymentAccountPayload()); | ||
paymentAccountManager.addPaymentAccount(paymentAccount); | ||
} | ||
|
||
public boolean onDeleteAccount(PaymentAccount paymentAccount) { |
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 we should change the API here to not return a boolean but to add a 'canRemove()' method at the caller and only call remove if that returns true.
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 it's better to propagate the exception and handle it on the view layer, but wanted to do as little changes as possible in order not to overwhelm maintainers.
super(message); | ||
} | ||
|
||
public ValidationException() { |
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.
Only first one constructor with String message
as param is used anywhere in application.
* along with Bisq. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package bisq.core.payment; |
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.
core/src/main/java/bisq/core/payment/PaymentAccountManager.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/payment/PaymentAccountManager.java
Outdated
Show resolved
Hide resolved
desktop/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsDataModel.java
Show resolved
Hide resolved
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 - could you please address the comments by @lusarz and @chimp1984 and resolve conflicts with master. Thanks!
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, see comments. Bisq does not use exceptions for flow control which is considered by many developers as anti-pattern. Even if you tolerate that view it is bad to mix 2 different "philosophies" in a project.
a98cf1b
to
f6c1a3c
Compare
@ripcurlx comments applied although I don't agree with some of them at all. |
I don't have time for another review. I leave review to other devs and if they ACK my NACK can be ignored. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. Feel free to reopen it if you think it is still relevant. |
No description provided.