mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-22 11:39:29 +00:00
getMyOffers() does not require asset code
This commit is contained in:
parent
ce579b78ca
commit
1d46818732
1 changed files with 4 additions and 2 deletions
|
@ -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 a new issue