Draft
Conversation
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
Builds and tests pass. All lint issues are fixed except a handful that are deferred pending future changes. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Moderate risk due to new controller dependencies and changes to initialization wiring/typing that could affect runtime messaging and controller lifecycle. Test behavior now depends on external `INFURA_PROJECT_KEY` and mocked timers, which may introduce CI/environment sensitivity. > > **Overview** > **Stabilizes wallet builds/tests by wiring in missing controllers and config.** The wallet package now depends on additional controllers (accounts/approval/connectivity/network/remote feature flags/transaction) and updates TS project references accordingly. > > **Improves runtime/test ergonomics.** Jest loads a local `.env` (with `.env.example` added and `.env` gitignored), `Wallet` exposes stronger typed `messenger`/`state` and adds `destroy()` to clean up controller instances; tests are updated to require `INFURA_PROJECT_KEY`, use fake timers, and properly teardown the wallet. > > **Tightens initialization typing and controller wiring.** Adds `initialization/defaults.ts` for inferred `DefaultInstances`/`DefaultActions`/`DefaultEvents`, introduces `bindMessengerAction` to preserve action typings, and updates controller initializers (notably `TransactionController` and `RemoteFeatureFlagController`) to pass required options and bind messenger actions safely. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit a652933. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Anvil provides a local chain for the transaction test, and the remaining tests don't make real RPC calls (nock blocks outgoing network), so a real Infura key is no longer needed to run the test suite. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a test for `createSecretRecoveryPhrase` to cover the untested utility. Marks the defensive `return undefined` branch in `destroy()` as ignored (all real controllers have a destroy method). Lowers coverage thresholds from 100% to reflect code that is not yet reachable from the public API in this prototype stage (e.g. isOffline callback, encryptor factory bodies, ConnectivityController.init). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ad559d1 to
623f9af
Compare
623f9af to
3fb60ee
Compare
Previously a pretest lifecycle hook, which is not guaranteed to run depending on how CI invokes tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Silences foundryup output on success (prints on failure), extracts the install step into a named test:prepare script for discoverability, and adds a yarn.config.cjs exception since the wallet test script differs from the monorepo standard. Also updates the stale error message in anvil.ts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Yarn's built-in shell doesn't support the shell syntax needed to suppress foundryup output on success and print it on failure. Moving to a real bash script avoids Yarn shell quirks that may explain why the anvil binary download isn't running reliably in CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mm-foundryup installs anvil to <cwd>/node_modules/.bin/anvil. If cwd isn't what we expect when the script runs (which may be why CI fails), anvil ends up somewhere neither getAnvilBinaryPath candidate matches. Explicitly cd to the package root and verify the expected file exists after install, with diagnostic output on failure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Node 18 does not expose globalThis.crypto by default, which causes the wallet package's tests to fail inside browser-passworder's generateSalt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Feature branch. WIP.
Know limitations:
References
Checklist