From 45c4f20bd7fab3ccc14ed107ca33512bfa62acdb Mon Sep 17 00:00:00 2001 From: Tyler Shipe Date: Thu, 18 Nov 2021 16:49:48 +0000 Subject: [PATCH] use latest client; error msg when depositing all sol; pointer cursor on orderbook --- components/DepositModal.tsx | 12 +++++++++++- components/Orderbook.tsx | 5 ++++- yarn.lock | 15 +++++---------- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/components/DepositModal.tsx b/components/DepositModal.tsx index f1db47d2..8b9d8079 100644 --- a/components/DepositModal.tsx +++ b/components/DepositModal.tsx @@ -144,6 +144,10 @@ const DepositModal: FunctionComponent = ({ percentage: percentage.toFixed(2), }) + const inputDisabled = + selectedAccount.config.symbol === 'SOL' && + selectedAccount.uiBalance.toString() === inputAmount + return ( @@ -204,6 +208,12 @@ const DepositModal: FunctionComponent = ({ values={['25', '50', '75', '100']} /> + {selectedAccount.config.symbol === 'SOL' && + parseFloat(inputAmount) > selectedAccount.uiBalance - 0.01 ? ( +
+ You must leave enough SOL in your wallet to pay for the transaction +
+ ) : null} {repayAmount ? (
@@ -213,7 +223,7 @@ const DepositModal: FunctionComponent = ({