[bisq-network/bisq] Move Payment account creation and removal from UI to core (#3586)
chimp1984
notifications at github.com
Sat Nov 16 02:13:37 UTC 2019
chimp1984 commented on this pull request.
> }
public boolean onDeleteAccount(PaymentAccount paymentAccount) {
- boolean isPaymentAccountUsed = openOfferManager.getObservableList().stream()
- .filter(o -> o.getOffer().getMakerPaymentAccountId().equals(paymentAccount.getId()))
- .findAny()
- .isPresent();
- isPaymentAccountUsed = isPaymentAccountUsed || tradeManager.getTradableList().stream()
- .filter(t -> t.getOffer().getMakerPaymentAccountId().equals(paymentAccount.getId()) ||
- paymentAccount.getId().equals(t.getTakerPaymentAccountId()))
- .findAny()
- .isPresent();
- if (!isPaymentAccountUsed)
- user.removePaymentAccount(paymentAccount);
- return isPaymentAccountUsed;
+ try {
+ paymentAccountManager.removePaymentAccount(paymentAccount.getId());
We do not use ids as params for lookup if the object is available anyway.
--
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/3586#discussion_r347070843
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191115/1f25a0a0/attachment.html>
More information about the bisq-github
mailing list