Skip to content

Commit

Permalink
getoffers: Include offers that can't be taken
Browse files Browse the repository at this point in the history
The getoffers api doesn't return any offers until the user has created
his payment accounts. Afterward the api will only return offers that the
user can take. This behavior is confusing and frustrating for new
developers. The new behavior is to show all offers for a given market
(direction, currency).
  • Loading branch information
alvasw committed Dec 20, 2024
1 parent 462144e commit c3fbc85
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions core/src/main/java/bisq/core/api/CoreOffersService.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ List<Offer> getOffers(String direction, String currencyCode) {
return offerBookService.getOffers().stream()
.filter(o -> !o.isMyOffer(keyRing))
.filter(o -> offerMatchesDirectionAndCurrency(o, direction, upperCaseCurrencyCode))
.filter(o -> offerFilterService.canTakeOffer(o, coreContext.isApiUser()).isValid())
.sorted(priceComparator(direction, true))
.collect(Collectors.toList());
} else {
Expand All @@ -226,7 +225,6 @@ List<Offer> getOffers(String direction, String currencyCode) {
.filter(o -> !o.isMyOffer(keyRing))
.filter(o -> offerMatchesDirectionAndCurrency(o, direction, "BTC"))
.filter(o -> o.getBaseCurrencyCode().equalsIgnoreCase(upperCaseCurrencyCode))
.filter(o -> offerFilterService.canTakeOffer(o, coreContext.isApiUser()).isValid())
.sorted(priceComparator(direction, false))
.collect(Collectors.toList());
else
Expand Down

0 comments on commit c3fbc85

Please sign in to comment.