Merge remote-tracking branch 'origin/fix-range-percentage' into main

This commit is contained in:
Tyler Shipe 2021-08-14 12:29:17 -04:00
commit b4542d49c5
1 changed files with 5 additions and 3 deletions

View File

@ -12,11 +12,13 @@ function formatRangePrice(price) {
const DayHighLow = ({ high, low, latest }) => {
let rangePercent = 0
if (high?.baseOraclePrice) {
rangePercent =
(parseFloat(latest?.baseOraclePrice) /
parseFloat(high?.baseOraclePrice)) *
100
((parseFloat(latest?.baseOraclePrice) -
parseFloat(low?.baseOraclePrice)) *
100) /
(parseFloat(high?.baseOraclePrice) - parseFloat(low?.baseOraclePrice))
}
return (