<p></p>
<p><b>@jmacxx</b> requested changes on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4259#discussion_r429693006">desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java</a>:</p>
<pre style='color:#555'>> @@ -276,22 +276,24 @@ private boolean isAnyPricePresent() {
     }
 
     private void updateChartData() {
+
+        // Offer price can be null (if price feed unavailable), thus a null-tolerant comparator is used.
+        Comparator<Offer> offerPriceComparator = Comparator.comparing(Offer::getPrice, Comparator.nullsLast(Comparator.naturalOrder()));
+        // Offer amounts are used for the secondary sort. They are sorted from high to low.
+        Comparator<Offer> offerAmountComparator = Comparator.comparing(Offer::getAmount).reversed();
+
</pre>
<pre><code>    boolean isCrypto = CurrencyUtil.isCryptoCurrency(getCurrencyCode());
</code></pre>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4259#discussion_r429693072">desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java</a>:</p>
<pre style='color:#555'>> @@ -276,22 +276,24 @@ private boolean isAnyPricePresent() {
     }
 
     private void updateChartData() {
+
+        // Offer price can be null (if price feed unavailable), thus a null-tolerant comparator is used.
+        Comparator<Offer> offerPriceComparator = Comparator.comparing(Offer::getPrice, Comparator.nullsLast(Comparator.naturalOrder()));
+        // Offer amounts are used for the secondary sort. They are sorted from high to low.
+        Comparator<Offer> offerAmountComparator = Comparator.comparing(Offer::getAmount).reversed();
+
+        var buyOfferSortComparator =
+            offerPriceComparator.reversed() // Buy offers, as opposed to sell offers, are primarily sorted from high price to low.
</pre>
<pre><code>        (isCrypto ? offerPriceComparator : offerPriceComparator.reversed()) // Buy offers, as opposed to sell offers, are primarily sorted from high price to low.
</code></pre>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4259#discussion_r429693138">desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java</a>:</p>
<pre style='color:#555'>> @@ -276,22 +276,24 @@ private boolean isAnyPricePresent() {
     }
 
     private void updateChartData() {
+
+        // Offer price can be null (if price feed unavailable), thus a null-tolerant comparator is used.
+        Comparator<Offer> offerPriceComparator = Comparator.comparing(Offer::getPrice, Comparator.nullsLast(Comparator.naturalOrder()));
+        // Offer amounts are used for the secondary sort. They are sorted from high to low.
+        Comparator<Offer> offerAmountComparator = Comparator.comparing(Offer::getAmount).reversed();
+
+        var buyOfferSortComparator =
+            offerPriceComparator.reversed() // Buy offers, as opposed to sell offers, are primarily sorted from high price to low.
+            .thenComparing(offerAmountComparator);
+        var sellOfferSortComparator =
+            offerPriceComparator
</pre>
<pre><code>        (isCrypto ? offerPriceComparator.reversed() : offerPriceComparator)
</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/pull/4259#pullrequestreview-417409172">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNU2LZTLJX3G7Q3OTLLRTG5ZJANCNFSM4NBX63IQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNQAEVLSSISEKIO4G3DRTG5ZJA5CNFSM4NBX63I2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODDQSRFA.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/4259#pullrequestreview-417409172",
"url": "https://github.com/bisq-network/bisq/pull/4259#pullrequestreview-417409172",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>