fix(machine): UI polish — fiat rate display, 15s receipt with QR, remove CLINK

- Show exchange rate as fiat/BTC (e.g. Q615,000/BTC) instead of sats/fiat
- Show USD/BTC rate when currency != USD
- Complete screen stays 15s (was 3s) with txid QR code for receipt photo
- Add "Done" button for manual dismiss on complete screen
- Remove CLINK ndebit UI (mode selector, pubkey entry) pending k1 fix (#23)
- Remove askForReceipt/sendingReceipt screens (npub scan not active, #36)
- Remove negative sign on commission display
- Set timezone to America/Guatemala

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Patrick Mulligan 2026-03-01 15:36:18 -05:00
commit 254fbd26f2
4 changed files with 163 additions and 248 deletions

View file

@ -379,7 +379,7 @@ export function createATMMachine(
},
delays: {
TIMEOUT_MS: 300000, // 5 minutes
COMPLETE_DELAY: 3000,
COMPLETE_DELAY: 15000,
},
}).createMachine({
id: 'atm',
@ -482,7 +482,7 @@ export function createATMMachine(
},
on: {
PAYMENT_RECEIVED: {
target: 'askForReceipt',
target: 'complete',
actions: 'setPaymentReceived',
},
PAYMENT_FAILED: {
@ -523,6 +523,9 @@ export function createATMMachine(
after: {
COMPLETE_DELAY: '#atm.idle',
},
on: {
CANCEL: '#atm.idle',
},
},
error: {
on: {
@ -653,8 +656,8 @@ export function createATMMachine(
},
waitingForCashTaken: {
on: {
CASH_DISPENSED: 'askForReceipt',
TIMEOUT: 'askForReceipt', // Assume taken
CASH_DISPENSED: 'complete',
TIMEOUT: 'complete', // Assume taken
},
},
askForReceipt: {
@ -680,6 +683,9 @@ export function createATMMachine(
after: {
COMPLETE_DELAY: '#atm.idle',
},
on: {
CANCEL: '#atm.idle',
},
},
dispenseError: {
// Critical error - payment received but cash not dispensed