@deeeed/metamask-harness 0.26.1 → 0.26.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.26.2 - 2026-07-31
6
+
7
+ ### Fixed
8
+
9
+ - Verify Extension MetaMetrics consent through the production Redux store when test-only clean-state hooks are unavailable.
10
+
5
11
  ## 0.26.1 - 2026-07-31
6
12
 
7
13
  ### Fixed
@@ -7,9 +7,15 @@ runAdapter((input) => withExtensionPage(input, async (page) => {
7
7
 
8
8
  async function readConsentState() {
9
9
  return page.evaluate(`(async () => {
10
- const getState = globalThis.stateHooks?.getCleanAppState;
11
- if (typeof getState !== 'function') throw new Error('stateHooks.getCleanAppState is unavailable.');
12
- const metamask = (await getState())?.metamask ?? {};
10
+ const hooks = globalThis.stateHooks || {};
11
+ const storeState = hooks.store?.getState?.();
12
+ const cleanState = typeof hooks.getCleanAppState === 'function'
13
+ ? await hooks.getCleanAppState()
14
+ : undefined;
15
+ if (!storeState && !cleanState) {
16
+ throw new Error('Extension consent state is unavailable.');
17
+ }
18
+ const metamask = storeState?.metamask ?? cleanState?.metamask ?? {};
13
19
  return {
14
20
  optedIn: Boolean(metamask.optedIn),
15
21
  dataCollectionForMarketing: Boolean(metamask.dataCollectionForMarketing),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deeeed/metamask-harness",
3
- "version": "0.26.1",
3
+ "version": "0.26.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mm-harness": "bin/mm-harness"