<p><b>@lusarz</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3586#discussion_r348024215">core/src/main/java/bisq/core/payment/PaymentAccountManager.java</a>:</p>
<pre style='color:#555'>> +
+            }
+            accountAgeWitnessService.publishMyAccountAgeWitness(paymentAccount.getPaymentAccountPayload());
+        }
+        return paymentAccount;
+    }
+
+    public void removePaymentAccount(String id) {
+        PaymentAccount paymentAccount = user.getPaymentAccount(id);
+        if (paymentAccount == null) {
+            throw new NotFoundException(format("Payment account %s not found", id));
+        }
+        boolean isPaymentAccountUsed = openOfferManager.getObservableList().stream()
+                .anyMatch(openOffer -> id.equals(openOffer.getOffer().getMakerPaymentAccountId()));
+        if (isPaymentAccountUsed) {
+            throw new PaymentAccountInUseException(format("Payment account %s is used for open offer", id));
</pre>
<p>No, and I don't have strong opinion what is better - Exceptions or ResultObject. I usually use Exceptions, but now I see a lot of opinions in net that recommends ResultObject. I think this approach might be interesting. Client code with a lot of <code>catch</code> blocks doesn't looks too nice.</p>
<p>Just give it a try, maybe you'll find some pros :)</p>
<p>Also consistency argument is relevant here. Validation in bisq <a href="https://github.com/bisq-network/bisq/blob/049655b6857449aaca789c9cee5358daf0a54419/core/src/main/java/bisq/core/util/validation/InputValidator.java#L26-L28">(for example here)</a> uses ResultObject instead of throwing typed exceptions.</p>

<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/pull/3586?email_source=notifications&email_token=AJFFTNS4GLUEVSX3BA3SVMLQUQGUTA5CNFSM4JLIFYS2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCMDBR3Q#discussion_r348024215">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNQSCY2RZX4PGU5OS7LQUQGUTANCNFSM4JLIFYSQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNTACGUUIHSAMAPCC23QUQGUTA5CNFSM4JLIFYS2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCMDBR3Q.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/pull/3586?email_source=notifications\u0026email_token=AJFFTNS4GLUEVSX3BA3SVMLQUQGUTA5CNFSM4JLIFYS2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCMDBR3Q#discussion_r348024215",
"url": "https://github.com/bisq-network/bisq/pull/3586?email_source=notifications\u0026email_token=AJFFTNS4GLUEVSX3BA3SVMLQUQGUTA5CNFSM4JLIFYS2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCMDBR3Q#discussion_r348024215",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>