Skip to content

Main#105

Merged
fanyiy merged 88 commits into
productionfrom
main
Nov 7, 2025
Merged

Main#105
fanyiy merged 88 commits into
productionfrom
main

Conversation

@fanyiy
Copy link
Copy Markdown
Contributor

@fanyiy fanyiy commented Nov 7, 2025

No description provided.

fanyiy and others added 30 commits October 6, 2025 23:19
- Create modular wallet architecture with domain-driven design
- Add domain models (Proof, Token, Mint, Wallet, Transaction)
- Add core services (MintService, TokenService, LightningService)
- Add pure utility functions (balance, fees, formatting, change-making)
- Migrate state stores (cashuStore, nutzapStore, transactionHistoryStore)
- Migrate React hooks to features/wallet/hooks/
- Migrate wallet components to features/wallet/components/
- Create public API exports (index.ts)
- Update imports in key files to use new wallet module
- Add comprehensive README for wallet feature

This makes the wallet functionality self-contained and reusable in other projects.
- Update components to import from @/features/wallet
- Update hooks to import from @/features/wallet
- Update lib/cashuLightning to use wallet utilities
- Update app/page.tsx to use wallet feature
- Replace calculateBalance with calculateBalanceByMint
- All active code now uses the new modular structure

Old stores/hooks remain temporarily for compatibility
- Fix MintQuoteState import - use re-exported enum from cashu-ts
- Fix CASHU_EVENT_KINDS import path in wallet hooks
- All builds now pass successfully
- Move BalanceDisplay from components/ui/ to features/wallet/components/
- Update imports to use wallet feature modules
- Update ChatHeader to import from @/features/wallet
- Delete old BalanceDisplay file
- Build passes successfully
sh1ftred and others added 29 commits November 1, 2025 09:05
…s. More robust error handling overall. it's almost perfect.
- Introduced loading and saving of disabled providers using localStorage.
- Updated ModelsTab to filter out disabled providers from the provider list.
- Added a new section in the UI to enable/disable providers.
- Enhanced useApiState hook to exclude disabled providers from API calls.
- Added utility functions for loading and saving disabled providers in storageUtils.
Add functionality to manage disabled providers in ModelsTab
- Add default mock response for /v1/keysets with 4 keysets (1 active, 3 inactive)
- Add default mock response for /v1/info with complete Minibits mint metadata
- Add warning to README about outdated mock data in development mode
- Include instructions for updating mock data from real mint
- Add retry mechanism that refunds all pending balances before retrying spend
- Limit to one retry attempt to prevent infinite loops
- Clean up local token storage after successful refunds
- Improve error messages to show max available mint balance
- Add selectedMintBalance check before attempting spend
- Remove debug console logs for cleaner output
- Added low balance warning if selected model can no longer be used
- Spending now take providers mints and lightning swap fees in account
- Add QRCodeModal component that displays at page level above all other components
- Implement zoom functionality when clicking on QR code in BalanceDisplay
- Add visual 'Zoom' hint badge on QR code to indicate it's clickable
- Prevent BalanceDisplay popover from closing when QR modal is open
- Pass isQrModalOpen state through component tree to manage popover behavior
- Modal centered on screen with z-index 99999 for proper layering
- Add scenario for 400/bad-request/invalid-model
- Returns text response with 'is not a valid model ID' message
- Matches error handling logic in apiUtils.ts handleApiError
- Includes latency support and request ID header
…ctionality

- Change Wallet tab button text to NWC
- Add quick amount buttons (500, 1000, 5000 sats) to NWC tab
- Add custom amount input and pay button for NWC payments
- Implement direct payment via connected NWC wallet with automatic invoice creation and payment processing
- Add copy button for invoice
@fanyiy fanyiy merged commit 87527a3 into production Nov 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants