diff options
| author | Adam Soltys <[email protected]> | 2026-09-21 08:16:00 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-21 08:16:00 -0700 |
| commit | e2ca38a1088a0ec0595432726b2e708b14a811ea (patch) | |
| tree | d3153f4bd4066ccf78ff031dbcb26053d4697a80 /src/features/index.js | |
| parent | 40257dad7978797d5185e796136596ff10b6abec (diff) | |
| download | coinosv3-e2ca38a1088a0ec0595432726b2e708b14a811ea.tar.gz coinosv3-e2ca38a1088a0ec0595432726b2e708b14a811ea.zip | |
Point of sale: a bill, an optional tip prompt, one invoice, and a ledger that keeps tips apart.
A new deferred feature (src/features/pos.js): type the amount in the display
unit, optionally a note, Charge. With the tip prompt on, the customer sees
the bill and picks a percentage (configurable, default 10/15/20), their own
figure, or no tip; one Lightning invoice is made for the total through the
Ark feature's receive (new hooks arkLnInvoice/arkLnWatch/arkLnUnwatch/
arkLnCancel wrap createLnInvoice and pollArkLn). Paid, expired and cancelled
sales are recorded with the bill and the tip as separate figures, and the
fiat rate at the time; the amount screen shows today's bills, tips and total.
Doors: Settings → Payments card, and a button under the payment address on
Receive (a receiveExtras hook the names pane renders).
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'src/features/index.js')
| -rw-r--r-- | src/features/index.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/features/index.js b/src/features/index.js index a32bced..73369c3 100644 --- a/src/features/index.js +++ b/src/features/index.js @@ -22,14 +22,15 @@ import { syncFeature } from './sync.js'; import { messagesFeature } from './messages.js'; export function buildFeatures(ctx) { - return [{}, arkFeature(ctx), nostrLoginFeature(ctx), namesFeature(ctx), zapsFeature(ctx), {}, {}, syncFeature(ctx), messagesFeature(ctx)]; + return [{}, arkFeature(ctx), nostrLoginFeature(ctx), namesFeature(ctx), zapsFeature(ctx), {}, {}, syncFeature(ctx), messagesFeature(ctx), {}]; } export async function loadDeferredFeatures(ctx, features) { const late = []; await Promise.all([ import('./gifts.js').then((m) => { late.push(features[0] = m.giftsFeature(ctx)); }), import('./nwc.js').then((m) => { late.push(features[5] = m.nwcFeature(ctx)); }), - import('./hats.js').then((m) => { late.push(features[6] = m.hatsFeature(ctx)); }) + import('./hats.js').then((m) => { late.push(features[6] = m.hatsFeature(ctx)); }), + import('./pos.js').then((m) => { late.push(features[9] = m.posFeature(ctx)); }), ]); return late; } |
