@@ -176,15 +176,15 @@ public void cancelAvailabilityRequest() {
176
176
public Price getPrice () {
177
177
String counterCurrencyCode = getCounterCurrencyCode ();
178
178
if (!offerPayload .isUseMarketBasedPrice ()) {
179
- return Price .valueOf (counterCurrencyCode , currenciesInverted () ? PriceUtil .invertLongPrice (offerPayload .getPrice (), counterCurrencyCode ) : offerPayload .getPrice ());
179
+ return Price .valueOf (counterCurrencyCode , isInverted () ? PriceUtil .invertLongPrice (offerPayload .getPrice (), counterCurrencyCode ) : offerPayload .getPrice ());
180
180
}
181
181
182
182
checkNotNull (priceFeedService , "priceFeed must not be null" );
183
183
MarketPrice marketPrice = priceFeedService .getMarketPrice (counterCurrencyCode );
184
184
if (marketPrice != null && marketPrice .isRecentExternalPriceAvailable ()) {
185
185
double factor ;
186
186
double marketPriceMargin = offerPayload .getMarketPriceMarginPct ();
187
- if (currenciesInverted ()) { // legacy offers inverted crypto prices
187
+ if (isInverted ()) { // legacy offers inverted crypto prices
188
188
factor = getDirection () == OfferDirection .SELL ?
189
189
1 - marketPriceMargin : 1 + marketPriceMargin ;
190
190
} else {
@@ -509,16 +509,16 @@ public String getCountryCode() {
509
509
}
510
510
511
511
public String getBaseCurrencyCode () {
512
- return currenciesInverted () ? offerPayload .getCounterCurrencyCode () : offerPayload .getBaseCurrencyCode (); // legacy offers inverted crypto
512
+ return isInverted () ? offerPayload .getCounterCurrencyCode () : offerPayload .getBaseCurrencyCode (); // legacy offers inverted crypto
513
513
}
514
514
515
515
public String getCounterCurrencyCode () {
516
516
if (currencyCode != null ) return currencyCode ;
517
- currencyCode = currenciesInverted () ? offerPayload .getBaseCurrencyCode () : offerPayload .getCounterCurrencyCode (); // legacy offers inverted crypto
517
+ currencyCode = isInverted () ? offerPayload .getBaseCurrencyCode () : offerPayload .getCounterCurrencyCode (); // legacy offers inverted crypto
518
518
return currencyCode ;
519
519
}
520
520
521
- public boolean currenciesInverted () {
521
+ public boolean isInverted () {
522
522
return !offerPayload .getBaseCurrencyCode ().equals ("XMR" );
523
523
}
524
524
0 commit comments