Skip to content
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

Closed

Conversation

blabno
Copy link

@blabno blabno commented Nov 9, 2019

No description provided.

core/src/main/java/bisq/core/user/Preferences.java Outdated Show resolved Hide resolved

if (!(paymentAccount instanceof AssetAccount))
accountAgeWitnessService.publishMyAccountAgeWitness(paymentAccount.getPaymentAccountPayload());
paymentAccountManager.addPaymentAccount(paymentAccount);
}

public boolean onDeleteAccount(PaymentAccount paymentAccount) {
Copy link
Contributor

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.

Copy link
Author

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() {
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it's appropriate place for this Exception class. What about bisq.core.payment.exceptions ?

Although I don't see consistency in project codebase - some exceptions are inside exceptions package, others no.

Copy link
Member

@ripcurlx ripcurlx left a 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!

Copy link
Contributor

@chimp1984 chimp1984 left a 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.

@blabno blabno force-pushed the payment-accounts-refactoring branch from a98cf1b to f6c1a3c Compare November 19, 2019 16:12
@blabno
Copy link
Author

blabno commented Nov 19, 2019

@ripcurlx comments applied although I don't agree with some of them at all.

@chimp1984
Copy link
Contributor

I don't have time for another review. I leave review to other devs and if they ACK my NACK can be ignored.

@stale
Copy link

stale bot commented Dec 20, 2019

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.

@stale stale bot added the was:dropped label Dec 20, 2019
@stale
Copy link

stale bot commented Dec 27, 2019

This issue has been automatically closed because of inactivity. Feel free to reopen it if you think it is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants