Skip to content

Conversation

@FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Oct 16, 2025

getSnapKeyring fails when the client is locked since we cannot access the KeyringController. As with every other Snaps API, we want to wait for the client to be unlocked before allowing use of functionality that accesses the vault.


Note

Adds getUnlockPromise to manageAccounts and awaits unlock before routing requests to the snap keyring, with tests updated accordingly.

  • RPC method snap_manageAccounts:
    • Add getUnlockPromise to method hooks and await getUnlockPromise(true) before calling getSnapKeyring and routing to handleKeyringSnapMessage in manageAccounts.ts.
    • Update specificationBuilder and manageAccountsBuilder.methodHooks to include getUnlockPromise.
  • Tests:
    • Update manageAccounts.test.ts to include getUnlockPromise in hooks and mocks; maintain validation and routing assertions.
  • Misc:
    • Slightly adjust coverage threshold for lines in jest.config.js.

Written by Cursor Bugbot for commit ba55813. This will update automatically on new commits. Configure here.

@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.29%. Comparing base (6f54282) to head (ba55813).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3686   +/-   ##
=======================================
  Coverage   98.29%   98.29%           
=======================================
  Files         417      417           
  Lines       11924    11925    +1     
  Branches     1851     1851           
=======================================
+ Hits        11721    11722    +1     
  Misses        203      203           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@FrederikBolding FrederikBolding marked this pull request as ready for review October 16, 2025 10:47
@FrederikBolding FrederikBolding requested a review from a team as a code owner October 16, 2025 10:47
@FrederikBolding FrederikBolding added this pull request to the merge queue Oct 16, 2025
Merged via the queue into main with commit 1f14fa8 Oct 16, 2025
123 checks passed
@FrederikBolding FrederikBolding deleted the fb/wait-for-unlock-in-manageAccounts branch October 16, 2025 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants