transfer
/wallet Command
/wallet
command provides access to all wallet management features, allowing users to view balances, create wallets, set default wallets, and generate deposit addresses.Command Overview
src/bot/handlers/wallet.handler.ts
Features
1.
2.
3.
4.
5.
6.
Wallet Flows
Main Wallet Flow
/wallet → View Wallet List → Select Wallet → View Wallet Details →
↓
Set as Default or View Deposit Address
Create Wallet Flow
/wallet → View Wallet List → Create a Wallet → Select Network → Wallet Created
Response Examples
Wallet List
🏦 Your CopperX Wallets
Select a wallet to set as Default and view its details:
Wallet Details
💼 Wallet Details
Network: ethereum
Wallet ID: 12345abcde
Address: 0x1234...5678
Balance: 100.50 USDT
✅ Default Wallet
What would you like to do with this wallet?
All Balances
💰 Your Wallet Balances
Network: ethereum
Balance: 100.50 USDT
Address: 0x1234...5678
Network: polygon
Balance: 25.75 MATIC
Address: 0xabcd...efgh
Deposit Instructions
📥 Deposit to your ethereum wallet
Send funds to this address:
0x1234567890abcdef1234567890abcdef12345678
Only send ethereum network tokens to this address. Sending other tokens may result in permanent loss.
Implementation Details
Wallet Command Handler
Display Wallet List
Wallet Service Integration
WalletService
to perform operations:
Callback Handlers
Wallet Details Callback
Set Default Wallet Callback
Deposit Callback
Wallet Data Structures
Error Handling
Related Files
src/bot/messages/wallet.messages.ts
- Contains wallet message templatessrc/services/wallet.service.ts
- Service for wallet operationssrc/utils/copperxApi/copperxApi.wallet.ts
- API client for wallet operationssrc/types/wallet.types.ts
- Wallet data type definitionsBest Practices
<code>
tagsModified at 2025-03-23 17:08:20