Show fiat amounts in wallet transaction history #167

Open
opened 2026-09-22 21:00:11 +00:00 by padreug · 0 comments
Owner

Follow-up to #166, which lets an invoice be denominated in fiat. The history list still shows sats only, so a €5.50 invoice appears as "7,301 sats" and the quote the payer actually agreed to is lost.

LNbits already stores what is needed on every payment's extra:

{ "fiat_currency": "EUR", "fiat_amount": 5.5, "fiat_rate": 1326.36 }

That is present for any payment created with a fiat unit, and also for outgoing LNURL payments sent with one.

Work

  • Carry fiatAmount / fiatCurrency through mapPaymentToTransaction onto PaymentTransaction.
  • Render the fiat amount as the primary figure with sats secondary, matching how #166 presents the created invoice. formatCurrency from useCurrencies handles locale and symbol.
  • Leave rows without a fiat denomination exactly as they are.

Why it was not in #166

It applies to all payments rather than only newly created ones, and it edits the shared payment mapper that #161 rewrites. Keeping it separate avoided a conflict between the two.

Worth considering at the same time: an optional "show amounts in my preferred currency" display setting, converting sat-denominated rows at the current rate. That is a different feature from recording the denomination a payment was actually quoted in, and should not be conflated with it.

Follow-up to #166, which lets an invoice be denominated in fiat. The history list still shows sats only, so a €5.50 invoice appears as "7,301 sats" and the quote the payer actually agreed to is lost. LNbits already stores what is needed on every payment's `extra`: ```json { "fiat_currency": "EUR", "fiat_amount": 5.5, "fiat_rate": 1326.36 } ``` That is present for any payment created with a fiat `unit`, and also for outgoing LNURL payments sent with one. ## Work - Carry `fiatAmount` / `fiatCurrency` through `mapPaymentToTransaction` onto `PaymentTransaction`. - Render the fiat amount as the primary figure with sats secondary, matching how #166 presents the created invoice. `formatCurrency` from `useCurrencies` handles locale and symbol. - Leave rows without a fiat denomination exactly as they are. ## Why it was not in #166 It applies to all payments rather than only newly created ones, and it edits the shared payment mapper that #161 rewrites. Keeping it separate avoided a conflict between the two. Worth considering at the same time: an optional "show amounts in my preferred currency" display setting, converting sat-denominated rows at the current rate. That is a different feature from recording the denomination a payment was actually quoted in, and should not be conflated with it.
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#167
No description provided.