<p></p>
<p><b>@sqrrm</b> approved this pull request.</p>

<p>utACK</p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/ghubstan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ghubstan">@ghubstan</a> There's a comment I'll give you a chance to reply to before merging.</p><hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/5056#discussion_r553512790">core/src/main/java/bisq/core/api/CoreOffersService.java</a>:</p>
<pre style='color:#555'>>  
-        // A buyer probably wants to see sell orders in price ascending order.
-        // A seller probably wants to see buy orders in price descending order.
-        if (direction.equalsIgnoreCase(BUY.name()))
-            offers.sort(Comparator.comparing(Offer::getPrice).reversed());
-        else
-            offers.sort(Comparator.comparing(Offer::getPrice));
-
+    List<Offer> getMyOffers(String direction, String currencyCode) {
+        List<Offer> offers = offerBookService.getOffers().stream()
+                .filter(o -> o.isMyOffer(keyRing))
+                .filter(o -> offerMatchesDirectionAndCurrency(o, direction, currencyCode))
+                .collect(Collectors.toList());
+        sortOffers(offers, direction);
</pre>
<p>Why not sort the offers in the stream, wouldn't that be more efficient? To make it more readable you could make a method <code>offerComparator</code>.</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/5056#pullrequestreview-563731331">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNT5JA2DYHQ7467LWSLSYX6JNANCNFSM4VT4235Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNTBXDC6MAPFS3IVE63SYX6JNA5CNFSM4VT42352YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOEGM5XAY.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/5056#pullrequestreview-563731331",
"url": "https://github.com/bisq-network/bisq/pull/5056#pullrequestreview-563731331",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>