diff --git a/packages/state-machine/src/machine.ts b/packages/state-machine/src/machine.ts index 873087b..377f58b 100644 --- a/packages/state-machine/src/machine.ts +++ b/packages/state-machine/src/machine.ts @@ -507,7 +507,11 @@ export function createATMMachine( }, }, confirmAbandon: { - // Warning: cash is in the machine, abandoning forfeits it + // Warning: cash is in the machine, abandoning forfeits it. + // Auto-clear after 60s so the machine self-recovers if customer walked away. + after: { + 60000: '#atm.idle', + }, on: { CANCEL: '#atm.idle', // User confirms they want to leave RETRY: 'generatingNdebit', // Go back and try again