mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-06 14:45:04 +00:00
lib/currency.ts re-exports the shared @edr/ui-common formatter (was a local implementation always forcing 2 decimals, wrong for DJF). Currency pickers (new-booking-form, new-contract-form, new-shipment Currency selector and schemas) offer DJF wherever USD is offered. The bigger piece: offline-payment.ts's isUsdCurrency/isUsdOfflineBooking assumed exactly two payment rails (ETB online, USD offline) and picked one. DJF supports BOTH, so it's replaced with independent canPayOnline/canPayOffline predicates, updated across the 5 call sites that gated the Pay button vs. the bank-transfer badge. PaymentMethodModal's WAAFI/CAC Bank entries (Djibouti gateways mislabeled USD-only) now list DJF, and a currency that matches no provider returns no providers instead of silently offering all of them (was returning every provider, including the ETB-only one, on any unmatched currency). Claude-Session: https://claude.ai/code/session_01CZy77vCWhka3pnmVF9NDkL