From e4ce183e240414833677bb23767d70349a514431 Mon Sep 17 00:00:00 2001 From: denis-orbs Date: Tue, 12 Nov 2024 14:31:20 +0200 Subject: [PATCH] revert --- packages/dapp-example/src/SushiSwap.tsx | 6 +++--- .../lib/src/components/CreateOrderModal/states/Main.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/dapp-example/src/SushiSwap.tsx b/packages/dapp-example/src/SushiSwap.tsx index fd0fa704..c1db8f7d 100644 --- a/packages/dapp-example/src/SushiSwap.tsx +++ b/packages/dapp-example/src/SushiSwap.tsx @@ -159,9 +159,9 @@ const TWAPComponent = ({ limit }: { limit?: boolean }) => { if (!fromToken) { setFromToken(dappTokens?.[1]); } - // if (!toToken) { - // setToToken(dappTokens?.[2]); - // } + if (!toToken) { + setToToken(dappTokens?.[2]); + } }, [dappTokens, toToken]); const onSwitchTokens = () => { diff --git a/packages/lib/src/components/CreateOrderModal/states/Main.tsx b/packages/lib/src/components/CreateOrderModal/states/Main.tsx index 630a38c7..e40c5d61 100644 --- a/packages/lib/src/components/CreateOrderModal/states/Main.tsx +++ b/packages/lib/src/components/CreateOrderModal/states/Main.tsx @@ -188,7 +188,7 @@ const Fee = () => { return BN(outAmount).multipliedBy(fee).dividedBy(100).toFixed().toString(); }, [fee, outAmount, isMarketOrder]); - const amountUi = useFormatNumber({ value: useAmountUi(dstToken?.decimals, amount), decimalScale: 3 }); + const amountUi = useFormatNumberV2({ value: useAmountUi(dstToken?.decimals, amount)}); if (!fee) return null; return {amountUi ? `${amountUi} ${dstToken?.symbol}` : ""};