0xMiden / 0xMiden/wallet

Cold-start auto-consume: locked-vault deferral leaves the row in GeneratingTransaction, blocking every queued consume for 30 min

未关闭
#772 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
5
派生
28
平均合并
9 小时 50 分钟
30 天内合并 PR
123

描述

## Problem
After a browser relaunch, the first auto-consume runs before the password is entered. The loop marks the row `GeneratingTransaction` / `stage: 'sending'`, then hits the locked vault and returns without reverting the row. Since the loop skips everything while a status-1 row exists, every other queued consume is blocked. Unlocking, Claim and Retry do nothing. Rows only clear at the 30-minute reaper (all fail) or after a browser restart. Reproduced on the shipped 1.15.21 bundle; same code on main.

## Environment
Bread Wallet 1.15.21 (26cf464c), Chrome 151, testnet, auto-consume on. Extension only.

## Steps to reproduce
1. Have consumable notes pending.
2. Quit and relaunch Chrome; do not enter the password right away.
3. Open Pending notes: one row sits on "sending", the rest stay Queued behind it. Unlock/Claim/Retry have no effect.

## Root cause
- `src/lib/miden/transaction/index.ts:313-316` sets status 1 before any vault check.
- `index.ts:319` → `transaction-processor.ts:88-92` throws a locked error while the vault is null (vault is memory-only in the SW).
- `index.ts:1382-1386` catches it and returns with no status revert.
- `index.ts:1335-1338` then skips every pass while the status-1 row exists; no unlock hook re-drives it.

Introduced by #375 (fix for #313), which widened the pre-existing non-reverting arm from #268. Related downstream symptom: #771.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。