From cbaafba06830c101e26c4d2d7ecaa73c4708c500 Mon Sep 17 00:00:00 2001 From: Matt <90358481+xbtmatt@users.noreply.github.com> Date: Wed, 4 Dec 2024 11:46:38 -0800 Subject: [PATCH] Fix swap component --- .../emojicoin/components/trade-emojicoin/SwapComponent.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/typescript/frontend/src/components/pages/emojicoin/components/trade-emojicoin/SwapComponent.tsx b/src/typescript/frontend/src/components/pages/emojicoin/components/trade-emojicoin/SwapComponent.tsx index 15b74c9d0..530abd695 100644 --- a/src/typescript/frontend/src/components/pages/emojicoin/components/trade-emojicoin/SwapComponent.tsx +++ b/src/typescript/frontend/src/components/pages/emojicoin/components/trade-emojicoin/SwapComponent.tsx @@ -244,9 +244,8 @@ export default function SwapComponent({ { setInputAmount(outputAmount); - // This is done as to not display an old value if the swap simulation fails. - setOutputAmount(0n); - setPrevious(0n); + setOutputAmount(inputAmount); + setPrevious(inputAmount); setIsSell((v) => !v); }} />