From e9aaa2a7677dc146ba55c93b67ad4e33adf2c0ad Mon Sep 17 00:00:00 2001 From: ogous Date: Thu, 30 Jan 2025 13:19:58 +0300 Subject: [PATCH] throw error for client --- web/src/hooks/useBuy.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/hooks/useBuy.tsx b/web/src/hooks/useBuy.tsx index b2466d7..22dffe6 100644 --- a/web/src/hooks/useBuy.tsx +++ b/web/src/hooks/useBuy.tsx @@ -44,7 +44,8 @@ const useBuy = ({ account, }); if (amount > userBalance) { - return openFundModal(); + openFundModal(); + throw new Error("You dont have enough USDC."); } const checkAmmReturnTx = prepareContractCall({ contract: config.contracts.lens,