From 6293aa1a71770958f88aab96e6234e4a9e909b01 Mon Sep 17 00:00:00 2001 From: "nature.xie" Date: Mon, 25 Dec 2023 23:46:02 +0800 Subject: [PATCH] select token list for borrow --- components/Modal/index.tsx | 2 +- components/SelectToken/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Modal/index.tsx b/components/Modal/index.tsx index a7240325..2035639a 100644 --- a/components/Modal/index.tsx +++ b/components/Modal/index.tsx @@ -75,7 +75,7 @@ const Modal = () => { const maxBorrowAmountPositions = useAppSelector(getBorrowMaxAmount(tokenId)); const maxWithdrawAmount = useAppSelector(getWithdrawMaxAmount(tokenId)); const repayPositions = useAppSelector(getRepayPositions(tokenId)); - const { maxBorrowAmount, maxBorrowValue } = maxBorrowAmountPositions[selectedCollateralType]; + const { maxBorrowAmount } = maxBorrowAmountPositions[selectedCollateralType]; const repayAmount = repayPositions[selectedCollateralType]; const { symbol, diff --git a/components/SelectToken/index.tsx b/components/SelectToken/index.tsx index 9829dbb9..7c53ee6f 100644 --- a/components/SelectToken/index.tsx +++ b/components/SelectToken/index.tsx @@ -206,7 +206,7 @@ function GetBalance({ const { symbol, tokenId } = asset; const isWrappedNear = symbol === "NEAR"; const { supplyBalance, maxBorrowAmountPositions } = useUserBalance(tokenId, isWrappedNear); - const borrowBalance = maxBorrowAmountPositions[DEFAULT_POSITION]?.toString(); // TODO + const borrowBalance = maxBorrowAmountPositions[DEFAULT_POSITION]?.maxBorrowAmount?.toString(); // TODO updateAsset[tokenId] = { ...asset, supply_balance: supplyBalance,