Commit c67e5750 authored by Noah Zinsmeister's avatar Noah Zinsmeister

make price sig figs more consistent

parent 30f7385d
...@@ -145,7 +145,7 @@ export const PositionPreview = ({ ...@@ -145,7 +145,7 @@ export const PositionPreview = ({
<LightCard padding="12px "> <LightCard padding="12px ">
<AutoColumn gap="4px" justify="center"> <AutoColumn gap="4px" justify="center">
<TYPE.main fontSize="12px">Current price</TYPE.main> <TYPE.main fontSize="12px">Current price</TYPE.main>
<TYPE.mediumHeader>{`${price.toSignificant(6)} `}</TYPE.mediumHeader> <TYPE.mediumHeader>{`${price.toSignificant(5)} `}</TYPE.mediumHeader>
<TYPE.main <TYPE.main
textAlign="center" textAlign="center"
fontSize="12px" fontSize="12px"
......
...@@ -486,7 +486,7 @@ export default function AddLiquidity({ ...@@ -486,7 +486,7 @@ export default function AddLiquidity({
<TYPE.main> <TYPE.main>
{price ? ( {price ? (
<TYPE.main> <TYPE.main>
{invertPrice ? price?.invert()?.toSignificant(8) : price?.toSignificant(8)}{' '} {invertPrice ? price?.invert()?.toSignificant(5) : price?.toSignificant(5)}{' '}
{quoteCurrency?.symbol} {quoteCurrency?.symbol}
</TYPE.main> </TYPE.main>
) : ( ) : (
...@@ -568,7 +568,7 @@ export default function AddLiquidity({ ...@@ -568,7 +568,7 @@ export default function AddLiquidity({
Current Price Current Price
</TYPE.main> </TYPE.main>
<TYPE.body fontWeight={500} textAlign="center" fontSize={20}> <TYPE.body fontWeight={500} textAlign="center" fontSize={20}>
{invertPrice ? price.invert().toSignificant(3) : price.toSignificant(3)}{' '} {invertPrice ? price.invert().toSignificant(5) : price.toSignificant(5)}{' '}
</TYPE.body> </TYPE.body>
<TYPE.main fontWeight={500} textAlign="center" fontSize={12}> <TYPE.main fontWeight={500} textAlign="center" fontSize={12}>
{quoteCurrency?.symbol} {' / '} {quoteCurrency?.symbol} {' / '}
......
...@@ -147,7 +147,7 @@ function CurrentPriceCard({ ...@@ -147,7 +147,7 @@ function CurrentPriceCard({
<AutoColumn gap="8px" justify="center"> <AutoColumn gap="8px" justify="center">
<ExtentsText>{t('Current price')}</ExtentsText> <ExtentsText>{t('Current price')}</ExtentsText>
<TYPE.mediumHeader textAlign="center"> <TYPE.mediumHeader textAlign="center">
{(inverted ? pool.token1Price : pool.token0Price).toSignificant(4)}{' '} {(inverted ? pool.token1Price : pool.token0Price).toSignificant(5)}{' '}
</TYPE.mediumHeader> </TYPE.mediumHeader>
<ExtentsText>{currencyQuote?.symbol + ' / ' + currencyBase?.symbol}</ExtentsText> <ExtentsText>{currencyQuote?.symbol + ' / ' + currencyBase?.symbol}</ExtentsText>
</AutoColumn> </AutoColumn>
...@@ -640,7 +640,7 @@ export function PositionPage({ ...@@ -640,7 +640,7 @@ export function PositionPage({
<LightCard padding="12px" width="100%"> <LightCard padding="12px" width="100%">
<AutoColumn gap="8px" justify="center"> <AutoColumn gap="8px" justify="center">
<ExtentsText>Min price</ExtentsText> <ExtentsText>Min price</ExtentsText>
<TYPE.mediumHeader textAlign="center">{priceLower?.toSignificant(4)}</TYPE.mediumHeader> <TYPE.mediumHeader textAlign="center">{priceLower?.toSignificant(5)}</TYPE.mediumHeader>
<ExtentsText> {currencyQuote?.symbol + ' / ' + currencyBase?.symbol}</ExtentsText> <ExtentsText> {currencyQuote?.symbol + ' / ' + currencyBase?.symbol}</ExtentsText>
{inRange && ( {inRange && (
...@@ -655,7 +655,7 @@ export function PositionPage({ ...@@ -655,7 +655,7 @@ export function PositionPage({
<LightCard padding="12px" width="100%"> <LightCard padding="12px" width="100%">
<AutoColumn gap="8px" justify="center"> <AutoColumn gap="8px" justify="center">
<ExtentsText>Max price</ExtentsText> <ExtentsText>Max price</ExtentsText>
<TYPE.mediumHeader textAlign="center">{priceUpper?.toSignificant(4)}</TYPE.mediumHeader> <TYPE.mediumHeader textAlign="center">{priceUpper?.toSignificant(5)}</TYPE.mediumHeader>
<ExtentsText> {currencyQuote?.symbol + ' / ' + currencyBase?.symbol}</ExtentsText> <ExtentsText> {currencyQuote?.symbol + ' / ' + currencyBase?.symbol}</ExtentsText>
{inRange && ( {inRange && (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment