Added generic polling hook
Description
This adds a generic polling hook to provide a standardized way to poll UI information that is in multichain controllers. First starting with gas fee controller example implementation.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/1322
Manual testing steps
- Click Send button
- on confirmation page check that the gas fee updates
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.
Builds ready [556a765]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1086 ± 65 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 126 | 274 | 189 | 43 | 20 |
| domContentLoaded | 9 | 125 | 39 | 35 | 17 | ||
| load | 825 | 1391 | 1086 | 135 | 65 | ||
| domInteractive | 9 | 125 | 39 | 35 | 17 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 144 Bytes (0.00%)
- ui: 946 Bytes (0.01%)
- common: 0 Bytes (0.00%)
Codecov Report
Attention: 8 lines in your changes are missing coverage. Please review.
Comparison is base (
a13de55) 68.47% compared to head (d8bb41d) 68.56%.
:exclamation: Current head d8bb41d differs from pull request most recent head 93973ce. Consider uploading reports for the commit 93973ce to get more accurate results
| Files | Patch % | Lines |
|---|---|---|
| app/scripts/metamask-controller.js | 0.00% | 4 Missing :warning: |
| ui/store/actions.ts | 0.00% | 4 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## develop #22980 +/- ##
===========================================
+ Coverage 68.47% 68.56% +0.09%
===========================================
Files 1089 1089
Lines 43063 42924 -139
Branches 11475 11421 -54
===========================================
- Hits 29485 29427 -58
+ Misses 13578 13497 -81
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Builds ready [d8bb41d]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (979 ± 54 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 116 | 209 | 186 | 25 | 12 |
| domContentLoaded | 9 | 72 | 29 | 21 | 10 | ||
| load | 896 | 1393 | 979 | 113 | 54 | ||
| domInteractive | 9 | 72 | 29 | 21 | 10 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 144 Bytes (0.00%)
- ui: 1003 Bytes (0.01%)
- common: 0 Bytes (0.00%)
Builds ready [1c6d5ea]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1060 ± 72 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 80 | 607 | 213 | 105 | 50 |
| domContentLoaded | 9 | 82 | 25 | 20 | 10 | ||
| load | 745 | 1503 | 1060 | 150 | 72 | ||
| domInteractive | 9 | 82 | 25 | 20 | 10 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 144 Bytes (0.00%)
- ui: 1003 Bytes (0.01%)
- common: 0 Bytes (0.00%)