-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
Feature Request
Current State
Currently, cashu.me supports the following fiat currencies with cent-based amounts:
- USD (1.00 USD = 100 amount)
- EUR (1.00 EUR = 100 amount)
This is implemented in:
src/stores/mints.ts:233-241-activeUnitCurrencyMultiplyergettersrc/stores/ui.ts:93-114-formatCurrencyfunction
Proposed Enhancement
Add support for additional fiat currencies that use similar cent-based denomination systems, such as:
- GBP (British Pound Sterling) - 1.00 GBP = 100 pence
- CHF (Swiss Franc) - 1.00 CHF = 100 rappen/centimes
- CAD (Canadian Dollar) - 1.00 CAD = 100 cents
- AUD (Australian Dollar) - 1.00 AUD = 100 cents
- JPY (Japanese Yen) - no subdivisions (multiplier = 1)
- And potentially others
Implementation Requirements
- Update
activeUnitCurrencyMultiplyerinsrc/stores/mints.tsto include new currencies - Update
formatCurrencyinsrc/stores/ui.tsto handle new currencies - Update
unitTickerShortMapinsrc/stores/ui.tsfor currency symbols/abbreviations - Update
activeUnitLabelgetter insrc/stores/mints.tsfor display labels - Ensure compatibility with Intl.NumberFormat for all supported currencies
- Add appropriate currency symbols and formatting
Benefits
- Broader international support
- Better user experience for non-USD/EUR users
- Consistency with existing fiat currency implementation pattern
Notes
- Different currencies have different subdivision systems (most use 100, but JPY has none)
- ISO 4217 currency codes should be used for consistency
- Currency formatting should respect locale-specific conventions via Intl.NumberFormat
Metadata
Metadata
Assignees
Labels
No labels