AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 54 Monero

Await Monero wallet close before deleting its files (#3757)

Public commit record

What the developer wrote

Authored by claude[bot]

81/100 · Strong
Await Monero wallet close before deleting its files (#3757)

The close was fire-and-forget on mobile and stored the cache while the
wallet directory was being deleted, so the delete could fail and leave
the WalletInfo row (and the wallet in its group) without a .keys file.


Claude-Session: https://claude.ai/code/session_01TRAFFJYMG2SKj7U4n9d8ZN

Co-authored-by: Claude <noreply@anthropic.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This change fixes a bug in Cake Wallet's Monero wallet deletion. Previously, when a user deleted a wallet, the app started closing the wallet in the background and immediately tried to delete its files. Because the wallet was still writing its cache to disk, the deletion could fail or leave behind a broken wallet record in the app's database. The fix makes the app wait for the wallet to fully close before deleting anything, preventing incomplete deletions and leftover database entries.

Recommended action

Treat as a reliability and data-integrity fix. Verify that closeWalletAwaitIfShould is no longer used in deletion paths and that the Isolate.run close path properly handles errors. Consider whether other wallet types or platforms have similar fire-and-forget close behavior during deletion. No immediate exploit response is indicated, but users who previously deleted wallets may have orphaned database rows or leftover files.

Security signals we found

01

Race condition between wallet close and filesystem deletion

02

Potential leftover WalletInfo row without .keys file

03

Data integrity issue in wallet deletion path

04

Fix uses synchronous-style await via Isolate.run to ensure close completes

Risk score

Why this scored 54/100

Our methodology →
Potential impact 18/30
Exploitability 8/25
Stealth signal 7/15
Affected reach 10/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.