Repository navigation
feat: add chart-type preference, OHLCV service wiring - #47749
Conversation
|
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. |
✨ Files requiring CODEOWNER review ✨🫰 @MetaMask/core-platform (1 files, +2 -0)
👨🔧 @MetaMask/extension-platform (2 files, +5 -0)
🕵️ @MetaMask/extension-privacy-reviewers (1 files, +3 -0)
📜 @MetaMask/policy-reviewers (8 files, +16 -0)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 🧪 @MetaMask/qa (2 files, +6 -0)
|
|
@metamaskbot update-policies |
|
Policies updated. Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 👀 lavamoat/webpack/mv2/beta/policy.json changes differ from lavamoat/webpack/mv2/main/policy.json changes |
1154fa7 to
65c0f08
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 65c0f08. Configure here.
Builds ready [65c0f08]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 3 warn · 🔴 4 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
65c0f08 to
29f07c1
Compare
Builds ready [29f07c1]
⚡ Performance Benchmarks (Total: 🟢 5 pass · 🟡 5 warn · 🔴 3 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
Prithpal-Sooriya
left a comment
There was a problem hiding this comment.
Policy Files LGTM
a0de43b to
c5f9d5e
Compare
Builds ready [c5f9d5e]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 3 warn · 🔴 3 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
c5f9d5e to
30b47dc
Compare
Builds ready [30b47dc] [reused from c5f9d5e]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 3 warn · 🔴 3 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
30b47dc to
7f6d7d4
Compare
Builds ready [7f6d7d4]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 3 warn · 🔴 2 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
|




Description
Foundation PR (1/5) for the Token Details Page (TDP) advanced charts work. This splits the original #47737 into five reviewable, stacked PRs:
This PR contains no user-facing UI on its own; the advanced chart is rendered in the UI PR (#47751) and stays behind the
AdvancedChartsremote feature flag. Landing it first keeps the CODEOWNER-reviewed surface (background controller wiring, fixtures, privacy/state-logs) small and isolated.What it includes:
PreferencesController(plusshared/types/preferences.tsandshared/lib/selectors/preferences.tsselector) so the TDP can persist the user's candle/line choice.@metamask/core-backendOHLCV service and its messenger are registered viaapp/scripts/messenger-client-init/*andmetamask-controller.js.default-fixture.json,onboarding-fixture.json, metrics state snapshots,state-logs.json) updated to reflect the new controller state.Base branch:
main.Changelog
CHANGELOG entry: null
Manual testing steps
Since this PR adds no visible UI, testing is a no-regression smoke check:
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches persisted preferences, background service initialization, and LavaMoat policies; new OHLCV service may open backend connectivity when later UI/flags enable it, but this PR alone adds no visible surface.
Overview
Adds background/state foundation for Token Details Page advanced charts (no user-facing UI in this PR).
Chart preferences —
PreferencesControllerandPreferencestypes now persisttdpChartType,tdpChartInterval, andtdpChartIndicators, with shared defaults inshared/constants/preferencesand new selectors (getTdpChartType,getTdpChartInterval,getTdpChartIndicators) so controller defaults and UI fallbacks stay aligned. Controller tests, fixtures, metrics snapshots, and state-logs schemas are updated for the new fields.OHLCV streaming — Registers
@metamask/core-backendOHLCVServicein the background viaOHLCVServiceInit, a restrictedgetOHLCVServiceMessenger(core allow-lists), andmetamask-controller/ messenger factory wiring. LavaMoat webpack policies grantAbortControllerandasync-mutextocore-backendfor this dependency path.Reviewed by Cursor Bugbot for commit 7f6d7d4. Bugbot is set up for automated code reviews on this repo. Configure here.