chore(perps): update controller and extension integration support#41854
chore(perps): update controller and extension integration support#41854abretonc7s wants to merge 1 commit into
Conversation
Create a clean base branch from current main that contains only the perps controller upgrade, decimal-logic changes, and required non-UI integration support so the UI formatting work can live entirely on the stacked branch. Constraint: Base PR must contain no ui/ changes at all Rejected: Continue using the original long-lived branch as PR A | three-dot history still surfaces UI files without a force-push or a replacement PR Confidence: high Scope-risk: moderate Directive: Keep this branch non-UI; all ui/ changes should stack on top in the formatting branch Tested: Targeted Jest for perps infrastructure + perps-controller-init; ESLint on touched non-UI files Not-tested: Full repo-wide CI and full branch-wide validation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/perps (2 files, +168 -27)
📜 @MetaMask/policy-reviewers (12 files, +40 -84)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. |
There was a problem hiding this comment.
Extension platform is working hard to speed up CI and these changes would slow it down significantly for little to no added value.
As discussed, the test fail can be fixed simply by mocking @metamask/perps-controller in app/scripts/controllers/perps/infrastructure.test.ts (some accompanying changes to tests may be needed):
jest.mock('@metamask/perps-controller', () => ({
formatPerpsFiat: jest.fn((value: number) => `$${value.toFixed(2)}`),
formatPercentage: jest.fn((percent: number) => `+${percent.toFixed(2)}%`),
PRICE_RANGES_UNIVERSAL: [{ threshold: 0, decimals: 2 }],
}));See thread: https://github.com/MetaMask/metamask-extension/pull/41558/files#r3094208429
| transformIgnorePatterns: [ | ||
| '/node_modules/(?!(?:@metamask/perps-controller|@nktkas/hyperliquid|@noble|micro-eth-signer|micro-packed|@scure)/)', | ||
| ], |
There was a problem hiding this comment.
| transformIgnorePatterns: [ | |
| '/node_modules/(?!(?:@metamask/perps-controller|@nktkas/hyperliquid|@noble|micro-eth-signer|micro-packed|@scure)/)', | |
| ], |
| transformIgnorePatterns: [ | ||
| '/node_modules/(?!(?:@metamask/perps-controller|@nktkas/hyperliquid|@noble|micro-eth-signer|micro-packed|@scure)/)', | ||
| ], |
There was a problem hiding this comment.
No integration tests are even affected. There's just no reason for this.
| transformIgnorePatterns: [ | |
| '/node_modules/(?!(?:@metamask/perps-controller|@nktkas/hyperliquid|@noble|micro-eth-signer|micro-packed|@scure)/)', | |
| ], |
|
@metamaskbot update-policies |
|
Policy update failed. You can review the logs or retry the policy update here |
Description
This PR is the clean non-UI base branch for the perps controller upgrade in TAT-2699.
It upgrades the extension to
@metamask/perps-controller@3.1.1and keeps only the non-UI integration support required for that upgrade (StorageServicewiring, Jest support, and LavaMoat updates).All user-facing perps decimal/display changes were split out to the stacked PR #41853.
Changelog
CHANGELOG entry: null
Related issues
Fixes: TAT-2699
Related:
Manual testing steps
@metamask/perps-controller@3.1.1.StorageService, Jest support, LavaMoat) behave as expected.Screenshots/Recordings
Before
N/A for this non-UI base PR. UI-facing screenshot evidence lives in #41853.
After
N/A for this non-UI base PR. UI-facing screenshot evidence lives in #41853.
Pre-merge author checklist
Pre-merge reviewer checklist