A React Native application for virtual cryptocurrency trading simulation with real-time market data, portfolio management, and social learning features. This app is for educational purposes only - no real money is involved.
This is a simulation app for educational purposes only:
- No real money is involved in any transactions
- All trading activities use virtual currency
- Real market prices are used for educational realism only
- No actual cryptocurrency is bought, sold, or stored
- Designed for learning and practice purposes
- Virtual Trading Simulation: Practice trading with virtual money
- Real-time cryptocurrency price tracking (for educational purposes)
- Virtual portfolio management with P&L calculations
- Social learning through collections
- Leaderboards and rankings
- Multi-language support (English/Vietnamese)
- Dark theme UI
- Comprehensive learning modules
When users reset their account, the app would throw "User not authenticated" errors because the user state in Redux was cleared but not properly re-initialized.
The app now includes automatic user re-initialization:
- useDualBalance Hook: Automatically detects when user authentication is lost and re-initializes user data
- UserContext: Added
reinitializeUser()method to handle user data restoration - Error Handling: Enhanced error handling in trading components to automatically retry operations after re-authentication
- App Initialization: Improved app startup to ensure user data is properly loaded
- When a "User not authenticated" error occurs, the system automatically:
- Detects the authentication error
- Attempts to re-initialize user data using the stored UUID
- Fetches existing user data or creates a new user if needed
- Retries the original operation
The authentication fix is transparent to users. When they reset their account and try to trade, the app will automatically handle the re-authentication process.
- Node.js 18+
- React Native development environment
- Expo CLI
npm install
# or
yarn installnpx expo startMake sure to configure your Supabase credentials in the appropriate configuration files.
The app uses:
- Redux Toolkit for state management
- Supabase for backend services
- React Native WebView for charts
- Expo Router for navigation
- TypeScript for type safety
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License