fix: pass UUID approval ID as string, not parseInt (closes #4) #18

Merged
sneak merged 1 commits from fix/approval-popup-uuid into main 2026-02-27 21:50:27 +01:00
Collaborator

Root cause: When approval IDs were changed from sequential integers to crypto.randomUUID() strings (security hardening), the popup's index.js still called parseInt(approvalId, 10) on the URL parameter. parseInt on a UUID like "a1b2c3d4-..." returns NaN, so every pendingApprovals[NaN] lookup fails → sendResponse(null) → popup closes immediately.

Fix: One-line change — pass the approval ID as-is instead of parseInt-ing it.

make check: all 14 tests pass, lint clean, format clean.

**Root cause:** When approval IDs were changed from sequential integers to `crypto.randomUUID()` strings (security hardening), the popup's `index.js` still called `parseInt(approvalId, 10)` on the URL parameter. `parseInt` on a UUID like `"a1b2c3d4-..."` returns `NaN`, so every `pendingApprovals[NaN]` lookup fails → `sendResponse(null)` → popup closes immediately. **Fix:** One-line change — pass the approval ID as-is instead of parseInt-ing it. **`make check`:** all 14 tests pass, lint clean, format clean.
sneak was assigned by clawbot 2026-02-27 21:34:35 +01:00
clawbot added 1 commit 2026-02-27 21:34:35 +01:00
fix: pass UUID approval ID as string, not parseInt (closes #4)
All checks were successful
check / check (push) Successful in 22s
8b7d73cc35
The approval ID was changed from sequential integers to crypto.randomUUID()
strings for security, but the popup still called parseInt() on it, which
converted the UUID to NaN. This caused every approval lookup to fail,
preventing the confirmation popup from displaying pending tx/sign requests.
Author
Collaborator

Code Review

LGTM — one-line fix, root cause is clear (UUID→parseInt=NaN). make check passes.

## Code Review LGTM — one-line fix, root cause is clear (UUID→parseInt=NaN). `make check` passes.
sneak merged commit 4eefe4c1af into main 2026-02-27 21:50:27 +01:00
sneak deleted branch fix/approval-popup-uuid 2026-02-27 21:50:28 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#18