nit with how we convert percent to negative value
This commit is contained in:
parent
0e9f23ed56
commit
8964cf86aa
@ -9,7 +9,7 @@ import { ErrorText, ErrorPill } from './styleds'
|
|||||||
export default function FormattedPriceImpact({ priceImpact }: { priceImpact?: Percent }) {
|
export default function FormattedPriceImpact({ priceImpact }: { priceImpact?: Percent }) {
|
||||||
return (
|
return (
|
||||||
<ErrorText fontWeight={500} fontSize={12} severity={warningSeverity(priceImpact)}>
|
<ErrorText fontWeight={500} fontSize={12} severity={warningSeverity(priceImpact)}>
|
||||||
{priceImpact ? `-${priceImpact.toFixed(2)}%` : '-'}
|
{priceImpact ? `${priceImpact.multiply(-1).toFixed(2)}%` : '-'}
|
||||||
</ErrorText>
|
</ErrorText>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -17,7 +17,7 @@ export default function FormattedPriceImpact({ priceImpact }: { priceImpact?: Pe
|
|||||||
export function SmallFormattedPriceImpact({ priceImpact }: { priceImpact?: Percent }) {
|
export function SmallFormattedPriceImpact({ priceImpact }: { priceImpact?: Percent }) {
|
||||||
return (
|
return (
|
||||||
<ErrorPill fontWeight={500} fontSize={12} severity={warningSeverity(priceImpact)}>
|
<ErrorPill fontWeight={500} fontSize={12} severity={warningSeverity(priceImpact)}>
|
||||||
{priceImpact ? `(-${priceImpact.toFixed(2)}%)` : '-'}
|
{priceImpact ? `(${priceImpact.multiply(-1).toFixed(2)}%)` : '-'}
|
||||||
</ErrorPill>
|
</ErrorPill>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user