From 57ed9128442bf0ee8cca3b71824321128706f656 Mon Sep 17 00:00:00 2001 From: max <39312833+fritzschoff@users.noreply.github.com> Date: Tue, 21 May 2024 10:55:26 +0100 Subject: [PATCH] fix(withdrawmodal): susd dropdown (#275) --- .../ui/src/components/Assets/AssetTable/AssetsRow.tsx | 1 - .../ui/src/components/WithdrawModal/WithdrawModal.tsx | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/liquidity/ui/src/components/Assets/AssetTable/AssetsRow.tsx b/liquidity/ui/src/components/Assets/AssetTable/AssetsRow.tsx index fe64071f0..b9e950308 100644 --- a/liquidity/ui/src/components/Assets/AssetTable/AssetsRow.tsx +++ b/liquidity/ui/src/components/Assets/AssetTable/AssetsRow.tsx @@ -32,7 +32,6 @@ export const AssetsRow = ({ final, }: AssetsRowProps) => { const { isOpen, onOpen, onClose } = useDisclosure(); - const canWithdraw = unlockDate.getTime() < new Date().getTime(); const hoursToWithdraw = canWithdraw diff --git a/liquidity/ui/src/components/WithdrawModal/WithdrawModal.tsx b/liquidity/ui/src/components/WithdrawModal/WithdrawModal.tsx index 2fd0f5dc1..34f03f806 100644 --- a/liquidity/ui/src/components/WithdrawModal/WithdrawModal.tsx +++ b/liquidity/ui/src/components/WithdrawModal/WithdrawModal.tsx @@ -105,16 +105,16 @@ export function WithdrawModal({ isOpen, onClose }: { isOpen: boolean; onClose: ( return type; }); - const collateralTypeDisplayName = collateralTypesHydated?.find( - (item) => item.tokenAddress === selectedCollateralType - )?.symbol; + const collateralTypeDisplayName = + collateralTypesHydated?.find((item) => item.tokenAddress === selectedCollateralType)?.symbol || + 'sUSD'; return ( { - setAmount(new Wei(0)); + setAmount(ZEROWEI); onClose(); }} > @@ -216,7 +216,6 @@ export function WithdrawModal({ isOpen, onClose }: { isOpen: boolean; onClose: ( {!isBase && ( setSelectedCollateralType(usdTokens?.snxUSD || '')} - key={usdTokens?.snxUSD.concat('-base')} > sUSD