Commit f581837
authored
fix: Consider client active once it is open and unlocked (#37607)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
We recently changed it so `onActive` fires once the client has been
unlocked. This PR adjusts the hook that provides the `active` flag to
the same behavior.
[](https://codespaces.new/MetaMask/metamask-extension/pull/37607?quickstart=1)
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: null
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Updates client activity to require both UI open and wallet unlocked,
and adjusts Snap client-status E2E test expectations.
>
> - **Snaps / Controller**:
> - Update `getIsActive` in `app/scripts/metamask-controller.js` to
return `this._isClientOpen && isUnlocked` (was only
`this._isClientOpen`).
> - **Tests**:
> - Adjust `test/e2e/snaps/test-snap-clientstatus.spec.ts` to expect
`active: false` when `locked: true`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
29c0bf4. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent f638960 commit f581837
File tree
2 files changed
+6
-2
lines changed- app/scripts
- test/e2e/snaps
2 files changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7151 | 7151 | | |
7152 | 7152 | | |
7153 | 7153 | | |
7154 | | - | |
| 7154 | + | |
| 7155 | + | |
| 7156 | + | |
| 7157 | + | |
| 7158 | + | |
7155 | 7159 | | |
7156 | 7160 | | |
7157 | 7161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments