diff --git a/frontend/src/components/VaultDashboard.tsx b/frontend/src/components/VaultDashboard.tsx index 729b58c..5c696ae 100644 --- a/frontend/src/components/VaultDashboard.tsx +++ b/frontend/src/components/VaultDashboard.tsx @@ -33,26 +33,26 @@ const VaultDashboard: React.FC = ({ const value = Number(amount); if (!walletAddress) { - toast.warning({ - title: "Wallet required", - description: "Connect your wallet before submitting a transaction.", - }); + toast.warning({ + title: "Wallet required", + description: "Connect your wallet before submitting a transaction.", + }); return; } if (!amount || Number.isNaN(value) || value <= 0) { - toast.warning({ - title: "Enter a valid amount", - description: "Choose a valid USDC amount before submitting the transaction.", - }); + toast.warning({ + title: "Enter a valid amount", + description: "Choose a valid USDC amount before submitting the transaction.", + }); return; } if (actionType === "withdraw" && value > availableBalance) { - toast.warning({ - title: "Insufficient balance", - description: "The withdrawal amount exceeds your available USDC balance.", - }); + toast.warning({ + title: "Insufficient balance", + description: "The withdrawal amount exceeds your available USDC balance.", + }); return; } @@ -64,13 +64,13 @@ const VaultDashboard: React.FC = ({ ); setAmount(""); setIsProcessing(null); - toast.success({ - title: actionType === "deposit" ? "Deposit queued" : "Withdrawal queued", - description: - actionType === "deposit" - ? `${value.toFixed(2)} USDC has been added to your pending vault activity.` - : `${value.toFixed(2)} USDC has been added to your pending withdrawal activity.`, - }); + toast.success({ + title: actionType === "deposit" ? "Deposit queued" : "Withdrawal queued", + description: + actionType === "deposit" + ? `${value.toFixed(2)} USDC has been added to your pending vault activity.` + : `${value.toFixed(2)} USDC has been added to your pending withdrawal activity.`, + }); }, 2000); }; diff --git a/frontend/src/components/WalletConnect.tsx b/frontend/src/components/WalletConnect.tsx index 109763e..ea12b80 100644 --- a/frontend/src/components/WalletConnect.tsx +++ b/frontend/src/components/WalletConnect.tsx @@ -31,12 +31,12 @@ const WalletConnect: React.FC = ({ walletAddress, onConnect, } if (walletAddress) { - onDisconnect(); - toast.info({ - title: "Wallet disconnected", - description: "Freighter is no longer connected to this session.", - }); - } + onDisconnect(); + toast.info({ + title: "Wallet disconnected", + description: "Freighter is no longer connected to this session.", + }); + } }; syncConnection(); @@ -56,31 +56,31 @@ const WalletConnect: React.FC = ({ walletAddress, onConnect, if (allowed.isAllowed) { const userInfo = await getAddress(); if (userInfo.address) { - onConnect(userInfo.address); - toast.success({ - title: t('toast.walletConnected.title'), - description: t('toast.walletConnected.description'), - }); + onConnect(userInfo.address); + toast.success({ + title: t('toast.walletConnected.title'), + description: t('toast.walletConnected.description'), + }); } } const discoveredAddress = await discoverConnectedAddress(); if (discoveredAddress) { - onConnect(discoveredAddress); - toast.success({ - title: "Wallet connected", - description: "Freighter is now connected to your YieldVault session.", - }); + onConnect(discoveredAddress); + toast.success({ + title: "Wallet connected", + description: "Freighter is now connected to your YieldVault session.", + }); } else { - toast.warning({ - title: t('toast.walletPermissionRequired.title'), - description: t('toast.walletPermissionRequired.description'), - }); + toast.warning({ + title: t('toast.walletPermissionRequired.title'), + description: t('toast.walletPermissionRequired.description'), + }); } } catch (e: unknown) { - console.error(e); - toast.error({ - title: t('toast.walletConnectionFailed.title'), - description: t('toast.walletConnectionFailed.description'), + console.error(e); + toast.error({ + title: t('toast.walletConnectionFailed.title'), + description: t('toast.walletConnectionFailed.description'), }); } finally { setIsConnecting(false); @@ -138,8 +138,8 @@ const WalletConnect: React.FC = ({ walletAddress, onConnect, onClick={() => { onDisconnect(); toast.info({ - title: t('toast.walletDisconnected.title'), - description: t('toast.walletDisconnected.description'), + title: t('toast.walletDisconnected.title'), + description: t('toast.walletDisconnected.description'), }); }} aria-label={t('wallet.disconnectAria')}