[bisq-network/bisq] Display "Payment Method" column in Open Offers view (#4193)

James Cox notifications at github.com
Thu May 14 17:23:55 UTC 2020


@jmacxx commented on this pull request.



> @@ -118,6 +121,23 @@ String getMarketLabel(OpenOfferListItem item) {
         return CurrencyUtil.getCurrencyPair(item.getOffer().getCurrencyCode());
     }
 
+    String getPaymentMethod(OpenOfferListItem item) {
+        String result = "";
+        if (item != null) {
+            Offer offer = item.getOffer();
+            checkNotNull(offer);
+            checkNotNull(offer.getPaymentMethod());
+            String method = Res.get(offer.getPaymentMethod().getId() + "_SHORT");

:+1: Done / refactored.  `Res.get` handles `MissingResourceException` itself and in that case returns the key.  I think that is a good way of handling the case of missing translations since it alleviates the caller from having to write custom error handling everywhere.

-- 
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/4193#discussion_r425307021
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200514/43db8e57/attachment-0001.html>


More information about the bisq-github mailing list