Wire currency picker to a real preference store #45

Open
opened 2026-05-07 09:52:02 +00:00 by padreug · 0 comments
Owner

Today the currency button in Hub.vue (and soon in the unified profile sheet) fires notImplemented toast — see Hub.vue:91-95. It needs to actually pick a preferred display currency (sats / USD / EUR / …) and persist it.

Scope

  • Decide on storage: localStorage via a new useCurrencyPreference composable, or extend the existing locale store pattern.
  • Surface the same dropdown UI as Theme and Language use (DropdownMenuRadioGroup).
  • Plumb the choice through formatPrice() callsites in market, activities, wallet, accounting. Each module already has its own currency field on items; the user preference becomes a display override, with sat-denominated values converted via Lightning price feed if needed.
  • Default = sats.

Out of scope

  • Real-time FX feed wiring (do that in a follow-up if not already covered by an existing service).

Why now

Surfaced while planning the unified bottom-nav / profile-sheet refactor — both the hub bottom row and the new profile sheet expose the currency dropdown, so it's worth wiring once.

Acceptance

  • Currency selection persists across app reloads.
  • All formatted prices (market checkout, wallet balance, libra ledger, activities tickets) honor the preference.
  • Toast no longer says "coming soon".
Today the currency button in `Hub.vue` (and soon in the unified profile sheet) fires `notImplemented` toast — see `Hub.vue:91-95`. It needs to actually pick a preferred display currency (sats / USD / EUR / …) and persist it. ## Scope - Decide on storage: localStorage via a new `useCurrencyPreference` composable, or extend the existing locale store pattern. - Surface the same dropdown UI as `Theme` and `Language` use (`DropdownMenuRadioGroup`). - Plumb the choice through `formatPrice()` callsites in `market`, `activities`, `wallet`, `accounting`. Each module already has its own `currency` field on items; the user preference becomes a *display* override, with sat-denominated values converted via Lightning price feed if needed. - Default = `sats`. ## Out of scope - Real-time FX feed wiring (do that in a follow-up if not already covered by an existing service). ## Why now Surfaced while planning the unified bottom-nav / profile-sheet refactor — both the hub bottom row and the new profile sheet expose the currency dropdown, so it's worth wiring once. ## Acceptance - [ ] Currency selection persists across app reloads. - [ ] All formatted prices (market checkout, wallet balance, libra ledger, activities tickets) honor the preference. - [ ] Toast no longer says "coming soon".
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/webapp#45
No description provided.