mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-24 14:59:37 -05:00
getMyOffers() does not require asset code
This commit is contained in:
parent
ce579b78ca
commit
1d46818732
@ -288,9 +288,11 @@ public class CoreOffersService {
|
||||
private boolean offerMatchesDirectionAndCurrency(Offer offer,
|
||||
String direction,
|
||||
String currencyCode) {
|
||||
var offerOfWantedDirection = offer.getDirection().name().equalsIgnoreCase(direction);
|
||||
if ("".equals(direction)) direction = null;
|
||||
if ("".equals(currencyCode)) currencyCode = null;
|
||||
var offerOfWantedDirection = direction == null || offer.getDirection().name().equalsIgnoreCase(direction);
|
||||
var counterAssetCode = isCryptoCurrency(currencyCode) ? offer.getOfferPayload().getBaseCurrencyCode() : offer.getOfferPayload().getCounterCurrencyCode(); // TODO: crypto pairs invert base and counter currencies
|
||||
var offerInWantedCurrency = counterAssetCode.equalsIgnoreCase(currencyCode);
|
||||
var offerInWantedCurrency = currencyCode == null || counterAssetCode.equalsIgnoreCase(currencyCode);
|
||||
return offerOfWantedDirection && offerInWantedCurrency;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user