Fix deviation percent for fixed-price crypto offers (#1411)

This commit is contained in:
bvcxza 2024-11-14 12:16:13 -03:00 committed by GitHub
parent ea8badd3f6
commit 023e2bcd2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -402,9 +402,7 @@ abstract class OfferBookViewModel extends ActivatableViewModel {
} }
public Optional<Double> getMarketBasedPrice(Offer offer) { public Optional<Double> getMarketBasedPrice(Offer offer) {
OfferDirection displayDirection = offer.isTraditionalOffer() ? direction : return priceUtil.getMarketBasedPrice(offer, direction);
direction.equals(OfferDirection.BUY) ? OfferDirection.SELL : OfferDirection.BUY;
return priceUtil.getMarketBasedPrice(offer, displayDirection);
} }
String formatMarketPriceMarginPct(Offer offer) { String formatMarketPriceMarginPct(Offer offer) {