<blockquote>
<p><em>This is a Bisq Network proposal. Please familiarize yourself with the <a href="https://docs.bisq.network/proposals.html" rel="nofollow">submission and review process</a>.</em></p>
</blockquote>

<p>Checking the existing code, the design did consider having multiple base currencies. The current code for listing offers is below:</p>
<pre><code>    public void fillOfferBookListItems() {
        try {
            // setAll causes sometimes an UnsupportedOperationException
            // Investigate why....
            offerBookListItems.clear();
            offerBookListItems.addAll(offerBookService.getOffers().stream()
                    .map(OfferBookListItem::new)
                    .collect(Collectors.toList()));

            log.debug("offerBookListItems.size {}", offerBookListItems.size());
            fillOfferCountMaps();
        } catch (Throwable t) {
            t.printStackTrace();
            log.error("Error at fillOfferBookListItems: " + t.toString());
        }
    }

</code></pre>
<p>I propose a change to:</p>
<pre><code>    public void fillOfferBookListItems(String baseCurrency) {
        try {
            // setAll causes sometimes an UnsupportedOperationException
            // Investigate why....
            offerBookListItems.clear();
            offerBookListItems.addAll(offerBookService.getOffers().stream()
                        **.filter(new Predicate<>() {

                                                @Override
                                                public boolean test(Offer o) {
                                                        return CurrencyUtil.isFiatCurrency(o.getCurrencyCode()) ? 
                                                                        baseCurrency.equals(o.getOfferPayload().getBaseCurrencyCode()) :
                                                                        baseCurrency.equals(o.getOfferPayload().getCounterCurrencyCode());
                                                }
                                        })**
                    .map(OfferBookListItem::new)
                    .collect(Collectors.toList()));

            log.debug("offerBookListItems.size {}", offerBookListItems.size());
            fillOfferCountMaps();
        } catch (Throwable t) {
            t.printStackTrace();
            log.error("Error at fillOfferBookListItems: " + t.toString());
        }
    }
</code></pre>
<p>This change will allow the filtering of the list by the base currency; such that offers made with base currency of "XMR" will not show up in listings where only offers with base currency of "BTC" should appear.</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/proposals/issues/142?email_source=notifications&email_token=AJFFTNWERFLFLYG2O6SMES3QULGKVA5CNFSM4JOW5HDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H2DM7BQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNQEFXEKO4PBK2Q5LFTQULGKVANCNFSM4JOW5HDA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNXSF6XDHSKFP6SKURLQULGKVA5CNFSM4JOW5HDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H2DM7BQ.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/proposals/issues/142?email_source=notifications\u0026email_token=AJFFTNWERFLFLYG2O6SMES3QULGKVA5CNFSM4JOW5HDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H2DM7BQ",
"url": "https://github.com/bisq-network/proposals/issues/142?email_source=notifications\u0026email_token=AJFFTNWERFLFLYG2O6SMES3QULGKVA5CNFSM4JOW5HDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H2DM7BQ",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>