From 8b9e2cb5acd35bfaafd634be3b40d33aadafff37 Mon Sep 17 00:00:00 2001 From: 0xshiba1 <158560741+0xshiba1@users.noreply.github.com> Date: Sat, 6 Jul 2024 09:29:54 +0800 Subject: [PATCH] swap page don't show deposited/borrowed for non-reserve assets --- frontend/src/pages/swap/[[...slug]].tsx | 70 +++++++++++++------------ 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/frontend/src/pages/swap/[[...slug]].tsx b/frontend/src/pages/swap/[[...slug]].tsx index c47d0f88..fcb20d0d 100644 --- a/frontend/src/pages/swap/[[...slug]].tsx +++ b/frontend/src/pages/swap/[[...slug]].tsx @@ -742,44 +742,46 @@ function Page() { -
-
-
- Deposited - - {formatToken(tokenOutDepositPositionAmount, { - exact: false, - })} - + {hasTokenOutReserve && ( +
+
+
+ Deposited + + {formatToken(tokenOutDepositPositionAmount, { + exact: false, + })} + +
+ +
+ Borrowed + + {formatToken(tokenOutBorrowPositionAmount, { + exact: false, + })} + +
-
- Borrowed - - {formatToken(tokenOutBorrowPositionAmount, { - exact: false, - })} - -
+ {tokenOut.ticker} +
- - - {tokenOut.ticker} - -
+ )}