feat: Add wallet dashboard with balance and transfer functionality

New Components:
- AccountBalance: Real-time balance display with free/reserved breakdown
- TransferModal: Token transfer interface with transaction signing
- WalletDashboard: Complete wallet management page

Features:
- Live balance fetching from blockchain
- Balance subscription for real-time updates
- Transfer modal with recipient and amount input
- Transaction signing via Polkadot.js extension
- Transaction status tracking (signing, pending, success, error)
- Account switching support
- Responsive dashboard layout
- Quick action buttons (Send, Receive, History)

Technical:
- Integration with PolkadotContext
- web3FromAddress for transaction signing
- signAndSend for blockchain transactions
- Balance conversion (plancks to tokens)
- Error handling and user feedback
- Toast notifications for transaction status

Navigation:
- Added /wallet route with ProtectedRoute
- Added Wallet link to navigation menu
This commit is contained in:
2025-10-28 00:28:20 +03:00
parent 8482663c1b
commit 2d1a2cf3ba
5 changed files with 526 additions and 1 deletions
+7
View File
@@ -90,6 +90,13 @@ const AppLayout: React.FC = () => {
{t('nav.dashboard', 'Dashboard')}
</button>
<button
onClick={() => navigate('/wallet')}
className="text-gray-300 hover:text-white transition-colors flex items-center gap-1"
>
<Wallet className="w-4 h-4" />
{t('nav.wallet', 'Wallet')}
</button>
<button
onClick={() => navigate('/profile-settings')}
className="text-gray-300 hover:text-white transition-colors flex items-center gap-1"