fix: only remediate original tx when manual dispense fully succeeds
If the manual dispense itself partially fails (e.g., cassette jam during remediation), the original failed transaction must stay in error state so the operator knows it still needs attention. Only mark as 'remediated' when result.dispensed === true (all requested bills out). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
89b0ceaa73
commit
c10e3239b5
2 changed files with 4 additions and 3 deletions
|
|
@ -104,9 +104,9 @@ async function handleManagementCommand(
|
|||
error: result.error,
|
||||
})
|
||||
|
||||
// Remediate referenced failed transaction
|
||||
// Only remediate the original tx if ALL requested bills were dispensed
|
||||
let refRemediated = false
|
||||
if (request.ref_txid && isElectron && window.electronAPI) {
|
||||
if (request.ref_txid && result.dispensed && isElectron && window.electronAPI) {
|
||||
refRemediated = await window.electronAPI.remediateTransaction(request.ref_txid, txid)
|
||||
if (refRemediated) {
|
||||
console.log('[ATM] Remediated failed tx:', request.ref_txid)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue