From 4befa5c5e22ace56415e24321ceb4d9589b27fb3 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 21 Sep 2026 11:41:58 -0700 Subject: Point of sale: the sats sit under a fiat total, so a payer's wallet and the counter agree by eye. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Tmfg8k5f3TbNJS34qiqHAp --- src/features/pos.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/features') diff --git a/src/features/pos.js b/src/features/pos.js index 6a46b78..a95aeef 100644 --- a/src/features/pos.js +++ b/src/features/pos.js @@ -175,9 +175,14 @@ export function posFeature(ctx) { // ---- screens ------------------------------------------------------------- const big = (text) => h('div', { class: 'pos-big' }, text); + // The amount in the display unit, and underneath in the other one: the + // sats a payer's wallet will show under a fiat total, or the money under + // a sats total — a rate gone wrong is then plain to see on the counter. const money = (sats, rate) => h('div', { class: 'col', style: 'align-items:center;gap:2px' }, big(fmtAmount(sats) + ' ' + unitLabel()), - fiatLine(sats, rate) && getUnit() !== 'fiat' ? h('div', { class: 'muted' }, fiatLine(sats, rate)) : null); + getUnit() === 'fiat' + ? h('div', { class: 'muted' }, Number(sats).toLocaleString('en-US') + ' sats') + : fiatLine(sats, rate) ? h('div', { class: 'muted' }, fiatLine(sats, rate)) : null); const back = () => h('button', { class: 'btn-ghost btn-block', onClick: close }, t('back')); function amountScreen(p) { -- cgit v1.2.3