A simple, user-friendly single-token wallet for eCash (XEC) built with React and Vite. This wallet is designed to handle one specific token at a time, making it perfect for projects that need a focused, streamlined wallet experience.
- 🪙 Single-token focus - Configure for one specific token
- 🌍 Multi-language support - Built-in internationalization
- 📱 Mobile-friendly - Responsive design that works on all devices
- 📷 QR code support - Scan QR codes for easy transactions
- ⚡ Fast development - Built with Vite for quick development cycles
- 🔄 Modern state management - Uses Jotai for predictable state handling
git clone https://github.com/zh/farm-wallet.git
cd farm-wallet
npm installCopy the environment example file and set your token ID:
cp .env.example .envEdit .env and set your token ID:
VITE_TOKEN_ID=your_token_id_herenpm run devYour wallet will be available at http://localhost:5173
The VITE_TOKEN_ID is the most important configuration. This determines which token your wallet will handle.
- Find your token ID: This is a long string (usually 64 characters) that uniquely identifies your token on the eCash network
- Add it to .env: Replace
your_token_id_herewith your actual token ID - Restart the dev server: Environment changes require a restart
Example:
VITE_TOKEN_ID=4bd147fc5d5ff26249a9299c46b80920c0b81f59a60895a2ca91a5a6fb9d8da1You can add other environment variables to customize the wallet:
# Optional: Custom API endpoints
VITE_API_BASE_URL=https://your-api.com
# Optional: Network configuration
VITE_NETWORK=mainnet# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run linting
npm run lint
# Fix linting issues automatically
npm run lint:fixfarm-wallet/
├── src/
│ ├── components/ # Reusable UI components
│ ├── pages/ # Main wallet pages
│ ├── hooks/ # Custom React hooks
│ ├── utils/ # Helper functions
│ ├── i18n/ # Translation files
│ └── styles/ # Styling
├── public/ # Static assets
└── dist/ # Built files (after npm run build)
- Build your project:
npm run build - Install Vercel CLI:
npm i -g vercel - Deploy:
vercel --prod - Set
VITE_TOKEN_IDenvironment variable in your Vercel dashboard
- Build your project:
npm run build - Upload the
dist/folder to Netlify - Set environment variables in your Netlify site settings
The wallet builds to static files, so you can deploy the dist/ folder to any web server:
npm run build
# Upload everything in dist/ to your web server- Add translation files in
src/i18n/locales/ - Import them in
src/i18n/index.js - The wallet will automatically detect user language
- Global styles:
src/styles/ - Component styles: Each component has its own CSS file
- The wallet uses modern CSS with CSS custom properties
- Create new components in
src/components/ - Add new pages in
src/pages/ - Use Jotai atoms in
src/atoms.jsfor state management
Wallet won't start: Make sure you've set VITE_TOKEN_ID in your .env file
Token not loading: Verify your token ID is correct and the token exists on the eCash network
Build failing: Run npm run lint:fix to fix common code issues
Dependencies issues: Delete node_modules and package-lock.json, then run npm install
This wallet is open source and welcomes contributions!
- Fork the repository: https://github.com/zh/farm-wallet
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and test them
- Run the linter:
npm run lint:fix - Commit your changes:
git commit -m 'Add amazing feature' - Push to your branch:
git push origin feature/amazing-feature - Open a Pull Request
- Frontend: React 19 + Vite 6
- State Management: Jotai
- Styling: Modern CSS
- Blockchain: ecash-lib for eCash integration
- QR Codes: Built-in QR code scanning and generation
- i18n: react-i18next for translations
This project is open source and available under the MIT License.