How metamask/metamask-mobile works
MetaMask Mobile is a self-custody wallet for accessing blockchain networks and compatible websites. Its principal user journey spans onboarding and account selection, network-aware wallet activity, and transaction or purchase flows; the repository also exposes browser, swaps, Perps, Predict, rewards, collectibles, and notification capabilities. The sampled sources show Quick Buy submitting through the Engine and activity queries using account, network, and transaction selectors. Several product branches are represented from the tree but their internal wiring was not sampled, so uncertain relationships are omitted or shown as unverified.
Main entry points: useTransactionsQuery.ts Transaction activity · index.js Mobile wallet · index.ts App state · useQuickBuyController.ts Quick Buy
Components 21
Wallet foundation
- Mobile wallet
index.js - Onboarding
app/actions/onboarding/index.ts - Account selection
app/selectors/multichainAccounts/accountTreeController.ts - Wallet Engine
app/core/Engine/Engine.ts - Network state
app/selectors/networkController.ts - App state
app/reducers/index.ts - Local storage
app/store/storage-wrapper.ts
Transactions and markets
- Bridge swaps
app/components/UI/Bridge - Quick Buy
app/components/UI/QuickBuy/hooks/useQuickBuyController.ts - Fiat on-ramp
app/components/UI/Ramp/hooks/useTransakController.ts - Transaction activity
app/components/Views/ActivityList/useTransactionsQuery.ts - Transaction selectors
app/selectors/transactionController.ts - Perpetual markets
app/components/UI/Perps - Prediction markets
app/components/UI/Predict/controllers/PredictController.ts
Browser and assets
- Web3 browser
app/actions/browser/index.js - Token and collectibles
app/actions/collectibles/index.js
Account services
- Rewards
app/actions/rewards/index.ts - Notifications
app/actions/notification/index.js - Wallet settings
app/actions/settings/index.js
Other components
- Wallet user
- Infura networks
Connections 13
- Wallet user → Mobile wallet: uses
README.md - Mobile wallet → Wallet Engine: runs wallet logic
- Mobile wallet → Infura networks: connects to networks
README.md - Transaction activity → Transaction selectors: queries transactions
app/components/Views/ActivityList/useTransactionsQuery.ts - Transaction activity → Account selection: queries accounts
app/components/Views/ActivityList/useTransactionsQuery.ts - Transaction activity → Network state: queries network
app/components/Views/ActivityList/useTransactionsQuery.ts - Quick Buy → Wallet Engine: submits transaction
app/components/UI/QuickBuy/hooks/useQuickBuyController.ts - Quick Buy → Fiat on-ramp: opens buy flow
app/components/UI/QuickBuy/hooks/useQuickBuyController.ts - Account selection → App state: selects account state
app/selectors/multichainAccounts/accountTreeController.ts - Transaction selectors → App state: selects transaction state
app/selectors/transactionController.ts - Network state → App state: selects network state
app/selectors/networkController.ts - Wallet settings → Local storage: persists preferences
- Notifications → Local storage: stores preferences