[bisq-network/bisq] Bisq allows deletion of a payment account despite open offers still using it (#4274)

James Cox notifications at github.com
Tue May 26 20:47:24 UTC 2020


Bisq already checks to see if a payment account is in use before allowing the user to delete it.  I tried both fiat and altcoin accounts.  Is there another way the scenario outlined above can happen?

1. have Alice create payment account X
2. have Alice create offer A with payment account X
3. have Alice delete payment account X with offer still open

`You cannot delete that account because...` 

![image](https://user-images.githubusercontent.com/47253594/82947739-1b328e00-9f66-11ea-914b-98f09cff715a.png)


The current check:

        boolean isPaymentAccountUsed = openOfferManager.getObservableList().stream()
                .anyMatch(o -> o.getOffer().getMakerPaymentAccountId().equals(paymentAccount.getId()));
        isPaymentAccountUsed = isPaymentAccountUsed || tradeManager.getTradableList().stream()
                .anyMatch(t -> t.getOffer().getMakerPaymentAccountId().equals(paymentAccount.getId()) ||
                        paymentAccount.getId().equals(t.getTakerPaymentAccountId()));
        if (!isPaymentAccountUsed)
            user.removePaymentAccount(paymentAccount);



-- 
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/issues/4274#issuecomment-634270082
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200526/a4ea21f4/attachment.html>


More information about the bisq-github mailing list