Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move getProviderConfig out of ducks/metamask.js to shared/selectors/networks.ts #27646

Merged
merged 14 commits into from
Nov 21, 2024

Conversation

davidmurdoch
Copy link
Contributor

@davidmurdoch davidmurdoch commented Oct 4, 2024

Converts some from functions from JS to TS. Also updates some functions to match the actual expect return values.

Why only these functions? I'm trying to solve circular dependency issues. getProviderConfig is so widely used in the codebase, and makes use of multiple selectors itself, it makes it very complicated to untangle. I've put it in a new file (seelctors/networks.ts) just to, hopefully temporarily, simplify untangling other circular dependency issues.

Copy link
Contributor

github-actions bot commented Oct 4, 2024

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.

@davidmurdoch davidmurdoch added the team-tiger Tiger team (for tech debt reduction + performance improvements) label Oct 9, 2024
@davidmurdoch davidmurdoch changed the title move getProviderConfig out of ducks/metamask.js to `selectors/net… move getProviderConfig out of ducks/metamask.js to selectors/networks.ts Oct 9, 2024
@davidmurdoch davidmurdoch changed the title move getProviderConfig out of ducks/metamask.js to selectors/networks.ts chore: move getProviderConfig out of ducks/metamask.js to selectors/networks.ts Oct 9, 2024
@davidmurdoch davidmurdoch changed the title chore: move getProviderConfig out of ducks/metamask.js to selectors/networks.ts refactor: move getProviderConfig out of ducks/metamask.js to selectors/networks.ts Oct 9, 2024
@davidmurdoch davidmurdoch force-pushed the circles-008 branch 4 times, most recently from 2341b7f to 6f8db43 Compare October 9, 2024 19:11
@davidmurdoch davidmurdoch marked this pull request as ready for review October 16, 2024 21:27
@davidmurdoch davidmurdoch requested review from a team as code owners October 16, 2024 21:27
Copy link

@metamaskbot
Copy link
Collaborator

Builds ready [0c6f2a7]
Page Load Metrics (1738 ± 83 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15722348173918187
domContentLoaded15652305171216479
load15732350173817383
domInteractive187650199
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 9 Bytes (0.00%)
  • ui: -469 Bytes (-0.01%)
  • common: 3.75 KiB (0.05%)

ui/selectors/networks.ts Outdated Show resolved Hide resolved
ui/selectors/networks.ts Outdated Show resolved Hide resolved
ui/selectors/networks.ts Outdated Show resolved Hide resolved
ui/selectors/networks.ts Outdated Show resolved Hide resolved
ui/selectors/networks.ts Outdated Show resolved Hide resolved
Gudahtt
Gudahtt previously approved these changes Nov 21, 2024
@hazemdr454
Copy link

ok

@metamaskbot
Copy link
Collaborator

Builds ready [3e54a1e]
Page Load Metrics (2003 ± 133 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint38428401859538258
domContentLoaded163527671962273131
load165227772003278133
domInteractive1394462211
backgroundConnect8130403215
firstReactRender514091327235
getState5196354421
initialActions01000
loadScripts118921761466244117
setupStore65618178
uiStartup183030982293361173
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 66 Bytes (0.00%)
  • ui: 5.18 KiB (0.07%)
  • common: 2.4 KiB (0.03%)

@davidmurdoch davidmurdoch dismissed stale reviews from FrederikBolding and Gudahtt via 027ca07 November 21, 2024 21:56
Gudahtt
Gudahtt previously approved these changes Nov 21, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [d1b2e6b]
Page Load Metrics (2027 ± 136 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint165628552045314151
domContentLoaded164426122003282135
load165626262027284136
domInteractive14210493919
backgroundConnect106725199
firstReactRender521601182814
getState45823189
initialActions01000
loadScripts118920171486232111
setupStore66218189
uiStartup188029432267317152
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 66 Bytes (0.00%)
  • ui: 6.09 KiB (0.08%)
  • common: 2.3 KiB (0.03%)

@desi desi enabled auto-merge November 21, 2024 22:58
@desi desi disabled auto-merge November 21, 2024 23:01
@desi desi merged commit 5116c32 into develop Nov 21, 2024
75 checks passed
@desi desi deleted the circles-008 branch November 21, 2024 23:01
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2024
@metamaskbot metamaskbot added the release-12.9.0 Issue or pull request that will be included in release 12.9.0 label Nov 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.9.0 Issue or pull request that will be included in release 12.9.0 team-extension-platform team-tiger Tiger team (for tech debt reduction + performance improvements)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.