From 00d227579952df0172d333318f50dffb0c4ff2ed Mon Sep 17 00:00:00 2001 From: Chris Jacobs Date: Mon, 12 Aug 2024 13:34:05 -0700 Subject: [PATCH] feat: oeth withdrawal - full precision for 'receive amount' and fix mobile sizing bug --- libs/defi/oeth/src/redeem/components/Swapper.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/libs/defi/oeth/src/redeem/components/Swapper.tsx b/libs/defi/oeth/src/redeem/components/Swapper.tsx index c24f1ecf0..ef27c1223 100644 --- a/libs/defi/oeth/src/redeem/components/Swapper.tsx +++ b/libs/defi/oeth/src/redeem/components/Swapper.tsx @@ -40,11 +40,7 @@ import { useSwapState, useWatchBalance, } from '@origin/shared/providers'; -import { - formatError, - getFormatPrecision, - isNilOrEmpty, -} from '@origin/shared/utils'; +import { formatError, isNilOrEmpty } from '@origin/shared/utils'; import { format, from, mul } from 'dnum'; import { useIntl } from 'react-intl'; import { useAccount } from 'wagmi'; @@ -344,7 +340,7 @@ function SwapperWrapped({ amountIn === 0n; return ( - + @@ -399,7 +395,7 @@ function SwapperWrapped({ borderColor: 'divider', }} > - + {format([amountOut ?? 0n, tokenOut?.decimals ?? 18], { - digits: getFormatPrecision([ - amountOut ?? 0n, - tokenOut?.decimals ?? 18, - ]), + digits: 18, decimalsRounding: 'ROUND_DOWN', })}