useUserWallets

Hook for managing multiple wallets associated with a user.
1import { useUserWallets } from '@avalabs/avacloud-waas-react';
2
3function WalletManager() {
4 const {
5 wallets,
6 isLoading,
7 error
8 } = useUserWallets();
9
10 if (isLoading) return <div>Loading wallets...</div>;
11 if (error) return <div>Error loading wallets</div>;
12
13 return (
14 <div>
15 {wallets.map(wallet => (
16 <div key={wallet.address}>
17 {wallet.address}
18 </div>
19 ))}
20 </div>
21 );
22}

Returns

  • wallets : Wallet[] - Array of user’s wallets
  • isLoading : boolean - Loading state
  • error : Error | null - Error state if wallet fetching fails

For any additional questions, please view our other knowledge base articles or contact a support team member via the chat button. Examples are for illustrative purposes only.

Learn More About AvaCloud | Download Case Studies | Schedule an AvaCloud Demo