diff --git a/src/app/components/PairNavbarInfo/index.tsx b/src/app/components/PairNavbarInfo/index.tsx index 952717876..4965b23bb 100644 --- a/src/app/components/PairNavbarInfo/index.tsx +++ b/src/app/components/PairNavbarInfo/index.tsx @@ -27,11 +27,12 @@ const parsePairData = ( let highPrice = 0; let lowPrice = 0; - /** Special case for RBTC/XUSD pair - underlying AMM pool is XUSD/RBTC but we need to display the reverse */ - if ( - pairData[0].trading_pairs === pairData[1].trading_pairs && - pairData[1].base_symbol === Asset.XUSD - ) { + const isRbtcPair = pairData[0].trading_pairs === pairData[1].trading_pairs; + + const stablecoinsToInvert = [Asset.XUSD, Asset.DOC, 'rUSDT']; + + /** Special case for RBTC/[XUSD, DOC, rUSDT] pairs - underlying AMM pool is [token]/RBTC but we need to display the reverse */ + if (isRbtcPair && stablecoinsToInvert.includes(pairData[1].base_symbol)) { lastPrice = pairData[0].last_price; percentageChange = -pairData[0].price_change_percent_24h; lowPrice = Number(bignumber(1).div(pairData[0].high_price_24h).toFixed(18)); @@ -40,7 +41,7 @@ const parsePairData = ( } /** BTC is quote symbol */ - if (pairData[0].trading_pairs === pairData[1].trading_pairs) { + if (isRbtcPair) { lastPrice = pairData[0].last_price; percentageChange = pairData[0].price_change_percent_24h; highPrice = pairData[0].high_price_24h;