diff options
| author | Adam Soltys <[email protected]> | 2026-09-21 11:41:58 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-21 11:41:58 -0700 |
| commit | 4befa5c5e22ace56415e24321ceb4d9589b27fb3 (patch) | |
| tree | a7b5284b474557cd678c4b70d5ebe9a40070c7d3 /src/features/pos.js | |
| parent | 9886bc6a614baa7749cc5ced759506d1f69b6f50 (diff) | |
| download | coinosv3-4befa5c5e22ace56415e24321ceb4d9589b27fb3.tar.gz coinosv3-4befa5c5e22ace56415e24321ceb4d9589b27fb3.zip | |
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Tmfg8k5f3TbNJS34qiqHAp
Diffstat (limited to 'src/features/pos.js')
| -rw-r--r-- | src/features/pos.js | 7 |
1 files changed, 6 insertions, 1 deletions
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) { |
