Skip to content

Commit 31a9551

Browse files
committed
invert price if missing protocol version or <3
1 parent ef54ca5 commit 31a9551

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/java/haveno/core/trade/statistics/TradeStatistics3.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,8 @@ public Price getTradePrice() {
416416
public long getPrice() {
417417
boolean isInverted = CurrencyUtil.isCryptoCurrency(currency) &&
418418
(extraDataMap == null ||
419-
(extraDataMap.containsKey(Trade.PROTOCOL_VERSION) &&
420-
Integer.parseInt(extraDataMap.get(Trade.PROTOCOL_VERSION)) < 3));
419+
!extraDataMap.containsKey(Trade.PROTOCOL_VERSION) ||
420+
Integer.parseInt(extraDataMap.get(Trade.PROTOCOL_VERSION)) < 3);
421421
return isInverted ? PriceUtil.invertLongPrice(price, currency) : price;
422422
}
423423

0 commit comments

Comments
 (0)