<p></p>
<p>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?</p>
<ol>
<li>have Alice create payment account X</li>
<li>have Alice create offer A with payment account X</li>
<li>have Alice delete payment account X with offer still open</li>
</ol>
<p><code>You cannot delete that account because...</code></p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/47253594/82947739-1b328e00-9f66-11ea-914b-98f09cff715a.png"><img src="https://user-images.githubusercontent.com/47253594/82947739-1b328e00-9f66-11ea-914b-98f09cff715a.png" alt="image" style="max-width:100%;"></a></p>
<p>The current check:</p>
<pre><code>    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);
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/issues/4274#issuecomment-634270082">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNULLTYNZMSGEF536G3RTQTFZANCNFSM4NKGGDHA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNTMG54M4XMZJ7CTUG3RTQTFZA5CNFSM4NKGGDHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEXHDDAQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/issues/4274#issuecomment-634270082",
"url": "https://github.com/bisq-network/bisq/issues/4274#issuecomment-634270082",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>