A component testing repository for wallet connection functionality used in LINE mini dApps on the KAIA blockchain.
- Node.js: Version 20+ (recommended) or 18+ (minimum)
- npm: Version 10+
- Git
-
Clone the repository
git clone <repository-url> cd MultiWallet
-
Install dependencies
npm install
-
Verify installation
npm test npm run lint
Start the development server:
npm run dev
The server will start on http://localhost:3001/wallet.html
(or next available port).
To test wallet connections, you'll need:
-
KAIA Wallet (Kaikas)
- Install Kaikas browser extension
- Create or import a KAIA wallet
- Connect to KAIA Mainnet (Chain ID: 8217)
-
OKX Wallet
- Install OKX Wallet browser extension
- Create or import an OKX wallet
- Ensure it's configured for Ethereum/KAIA networks
- Navigate to the wallet section in the application
- Click "Connect Wallet" to open the modal
- Test each wallet option:
- KAIA Wallet: Should detect Kaikas extension
- OKX Wallet: Should detect OKX extension
- Google/LINE: Social login functionality (if implemented)
- ✅ Wallet Detected: Modal shows connection options
- ✅ Wallet Not Detected: Error message appears
- ✅ Connection Success: Modal closes, wallet connected
- ✅ Connection Failed: Error message with details
- ✅ Network Switching: Automatically switch to KAIA network
src/wallet/
├── types.ts # TypeScript interfaces
├── WalletConnector.ts # Core wallet connection logic
├── WalletModal.tsx # React UI component
├── WalletModal.module.scss # Component styling
└── WalletConnector.test.ts # Unit tests
Wallet | Status | Protocol |
---|---|---|
KAIA Wallet (Kaikas) | ✅ Ready | KAIA ethers extension |
OKX Wallet | ✅ Ready | Standard Web3 |
Google OAuth | 🔄 Existing | Social login |
LINE Login | 🔄 Existing | Social login |
Bitget Wallet | ⏳ Planned | Phase 2 |
npm test # Run all tests
npm test WalletConnector # Run specific test
npm run lint # Check code style
npm run build # TypeScript compilation
Create .env
file (if needed):
# Example configuration
NODE_ENV=development
The app is configured for:
- KAIA Mainnet: Chain ID 8217
- KAIA Testnet: Chain ID 1001 (for development)
This repository follows a depth-first implementation approach:
- ✅ Phase 1: KAIA + OKX wallet integration (complete)
- ⏳ Phase 2: Add Bitget wallet support
- ⏳ Phase 3: Enhanced error handling and UX
- Silverlynx Normal Form (SNF): Minimal, complete implementation
- Adapter Pattern: Single interface for multiple wallets
- Error Handling: Comprehensive error states and messages
- TypeScript: Full type safety
- Responsive Design: Mobile-friendly UI
- Test Coverage: Unit tests for core functionality
-
"Wallet not detected"
- Ensure browser extension is installed and enabled
- Refresh the page and try again
-
"Connection failed"
- Check wallet is unlocked
- Verify network settings
- Check browser console for detailed errors
-
Node version warnings
- NestJS v11 requires Node 20+
- Install latest Node.js for best compatibility
Enable detailed logging:
NODE_ENV=development npm run dev
Check browser console for wallet connection logs.
- Follow existing code patterns
- Run tests before committing:
npm test
- Ensure linting passes:
npm run lint
- Write tests for new wallet integrations
Status: Phase 1 Complete - Ready for browser testing Last Updated: 2025-06-29