From 9f4e97eaff08a619ad9e682721144f8759a901e0 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 029003304e..44933a6d71 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 @@ -264,9 +264,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); }} />