fix(access): session Complete failed on IPC clone; keep rate lookup off the unlock path #97

Merged
padreug merged 2 commits from fix/boltcard-session-ipc-clone into dev 2026-09-22 14:02:47 +00:00
Owner

Two follow-ups from the Sep 21 sintra test.

Complete with the loaded card failed with "An object could not be cloned": the session's withdraw/pay step was handed to Electron IPC as a Vue reactive proxy. The customer had to re-tap, which works because the direct-tap path passes a plain string. The steps are now copied into plain objects before crossing the bridge. Cash-in had the same bug.

Tap to unlock took ~3 s. The card server no longer blocks the session on a cold fiat rate lookup (aiolabs/boltcards fix/session-fiat-from-cache); when it returns a currency with no fiat, the ATM prices the balance in that currency from its own rate source after the unlock. The session round-trip time is now logged.

Two follow-ups from the Sep 21 sintra test. Complete with the loaded card failed with "An object could not be cloned": the session's withdraw/pay step was handed to Electron IPC as a Vue reactive proxy. The customer had to re-tap, which works because the direct-tap path passes a plain string. The steps are now copied into plain objects before crossing the bridge. Cash-in had the same bug. Tap to unlock took ~3 s. The card server no longer blocks the session on a cold fiat rate lookup (aiolabs/boltcards fix/session-fiat-from-cache); when it returns a currency with no fiat, the ATM prices the balance in that currency from its own rate source after the unlock. The session round-trip time is now logged.
At Complete the store handed the session's withdraw/pay step to
window.electronAPI straight out of the loadedBoltCard ref — a Vue
reactive proxy — and Electron's structured clone refused it:
'[ATM] Bolt Card withdraw failed: Error: An object could not be cloned.'
(sintra, 2026-09-21 06:51). The customer had to re-tap, which works
because the direct-tap path passes a plain string. Copy the steps field
by field into plain objects before they cross the bridge.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Tap → unlock took ~3 s on sintra. The card server's /session now fills
fiat only from its warm rate cache (aiolabs/boltcards
fix/session-fiat-from-cache); when it returns a currency with fiat null,
the store prices the balance in that currency from the ATM's own rate
source after the unlock, so the chip still shows the wallet's currency.
Log how long the session call took and whether the server priced it, so
the next latency question can be answered from the journal.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
padreug deleted branch fix/boltcard-session-ipc-clone 2026-09-22 14:02:47 +00:00
Sign in to join this conversation.
No reviewers
No labels
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/bitspire!97
No description provided.