@@ -9,13 +9,14 @@ import { discoverConnectedAddress } from "../lib/stellarAccount";
99
1010interface WalletConnectProps {
1111 walletAddress : string | null ;
12+ usdcBalance ?: number ;
1213 onConnect : ( address : string ) => void ;
1314 onDisconnect : ( ) => void ;
1415}
1516
1617type ConnectionErrorType = 'not-installed' | 'not-allowed' | 'no-address' | 'generic' | null ;
1718
18- const WalletConnect : React . FC < WalletConnectProps > = ( { walletAddress, onConnect, onDisconnect } ) => {
19+ const WalletConnect : React . FC < WalletConnectProps > = ( { walletAddress, usdcBalance = 0 , onConnect, onDisconnect } ) => {
1920 const [ isConnecting , setIsConnecting ] = useState ( false ) ;
2021 const [ connectionError , setConnectionError ] = useState < ConnectionErrorType > ( null ) ;
2122 const [ showTooltip , setShowTooltip ] = useState ( false ) ;
@@ -200,6 +201,21 @@ const WalletConnect: React.FC<WalletConnectProps> = ({ walletAddress, onConnect,
200201 >
201202 { t ( 'wallet.rpcPrefix' ) } { hasCustomRpcConfig ? t ( 'wallet.rpcCustom' ) : t ( 'wallet.rpcDefault' ) }
202203 </ div >
204+ < div
205+ className = "glass-panel"
206+ style = { {
207+ padding : '8px 12px' ,
208+ borderRadius : '10px' ,
209+ border : '1px solid var(--border-glass)' ,
210+ fontSize : '0.75rem' ,
211+ color : 'var(--text-secondary)' ,
212+ minWidth : '130px' ,
213+ textAlign : 'right'
214+ } }
215+ aria-label = "USDC wallet balance"
216+ >
217+ USDC: < span style = { { color : 'var(--text-primary)' , fontWeight : 600 } } > { usdcBalance . toFixed ( 2 ) } </ span >
218+ </ div >
203219 < button
204220 className = "btn btn-outline"
205221 style = { { padding : '8px' , borderRadius : '50%' } }
0 commit comments