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 getSelectedInternalAccount from selectors.js to accounts.ts #27644

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

davidmurdoch
Copy link
Contributor

@davidmurdoch davidmurdoch commented Oct 4, 2024

No description provided.

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.

@metamaskbot
Copy link
Collaborator

Builds ready [cba16ef]
Page Load Metrics (1814 ± 79 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15642328181316881
domContentLoaded15562280178715876
load15752322181416479
domInteractive19533584
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: -1.14 KiB (-0.02%)
  • common: 2.35 KiB (0.03%)

@davidmurdoch davidmurdoch force-pushed the circles-005 branch 2 times, most recently from 89f3391 to 6f8f641 Compare October 8, 2024 17:54
@davidmurdoch davidmurdoch force-pushed the circles-006 branch 4 times, most recently from 8ac0340 to 23628c4 Compare October 8, 2024 20:57
@davidmurdoch davidmurdoch added the team-tiger Tiger team (for tech debt reduction + performance improvements) label Oct 9, 2024
@davidmurdoch davidmurdoch changed the title move getSelectedInternalAccount from selectors.js to accounts.ts refactor: move getSelectedInternalAccount from selectors.js to accounts.ts Oct 9, 2024
Copy link

sonarcloud bot commented Oct 9, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [88acbfb]
Page Load Metrics (1820 ± 119 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint149226911815243117
domContentLoaded148525581774217104
load149227001820248119
domInteractive248043178
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: -1.12 KiB (-0.01%)
  • common: 2.12 KiB (0.03%)

@davidmurdoch davidmurdoch marked this pull request as ready for review October 16, 2024 14:56
@davidmurdoch davidmurdoch requested review from a team as code owners October 16, 2024 14:56
zone-live
zone-live previously approved these changes Oct 16, 2024
HowardBraham
HowardBraham previously approved these changes Oct 16, 2024
Base automatically changed from circles-005 to develop October 23, 2024 10:23
@HowardBraham HowardBraham dismissed stale reviews from zone-live and themself October 23, 2024 10:23

The base branch was changed.

@davidmurdoch davidmurdoch force-pushed the circles-006 branch 2 times, most recently from 631ebf0 to a759afc Compare October 28, 2024 23:14
@metamaskbot
Copy link
Collaborator

Builds ready [a759afc]
Page Load Metrics (2044 ± 215 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint170838142049452217
domContentLoaded169537212017436209
load170638062044448215
domInteractive19196553818
backgroundConnect980272110
firstReactRender482681155225
getState465182110
initialActions01000
loadScripts126631701531407195
setupStore1179312512
uiStartup190540492301454218
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 68 Bytes (0.00%)
  • ui: -1.12 KiB (-0.01%)
  • common: 2.06 KiB (0.03%)

@metamaskbot
Copy link
Collaborator

Builds ready [bb00b2c]
Page Load Metrics (2049 ± 118 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint175826082059251121
domContentLoaded170224352011233112
load174226222049246118
domInteractive279747189
backgroundConnect8193354321
firstReactRender541721013115
getState595242411
initialActions01000
loadScripts12391909149919794
setupStore1175292010
uiStartup192332522308347167
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 68 Bytes (0.00%)
  • ui: -1.09 KiB (-0.01%)
  • common: 2.06 KiB (0.03%)

@metamaskbot
Copy link
Collaborator

Builds ready [3f2a9e8]
Page Load Metrics (2045 ± 77 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint35123351699675324
domContentLoaded17122382202216278
load17252388204516177
domInteractive18241676029
backgroundConnect775282311
firstReactRender482861134923
getState55315157
initialActions01000
loadScripts12721856151315273
setupStore1267322211
uiStartup19322609228516780
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: -1.09 KiB (-0.01%)
  • common: 2.06 KiB (0.03%)

Copy link
Contributor

@Matt561 Matt561 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a couple questions related to the @ts-expect-error exceptions. Otherwise, this looks good to me 👍

@@ -43,6 +43,7 @@ const useBridging = () => {
const isMarketingEnabled = useSelector(getDataCollectionForMarketing);
const providerConfig = useSelector(getProviderConfig);
const keyring = useSelector(getCurrentKeyring);
// @ts-expect-error keyring type is wrong maybe?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this exception expected as part of this refactoring effort?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the existing types used in various places around our codebase don't match what the code actually represents, so we get errors like this when porting from JS to TS. If someone fixes the types this line will cause a compilation error, which is good as it will be the comment should just be removed at that time.

@@ -166,6 +167,7 @@ export function getCustodianIconForAddress(state: State, address: string) {

export function getIsCustodianSupportedChain(state: State) {
try {
// @ts-expect-error state types don't match
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these exceptions expected as part of this refactoring effort?

@HowardBraham HowardBraham requested review from a team and removed request for a team October 31, 2024 20:33
@HowardBraham HowardBraham added this pull request to the merge queue Nov 1, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 1, 2024
@HowardBraham HowardBraham added this pull request to the merge queue Nov 1, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 1, 2024
@HowardBraham HowardBraham added this pull request to the merge queue Nov 1, 2024
Merged via the queue into develop with commit 1cf8791 Nov 1, 2024
76 checks passed
@HowardBraham HowardBraham deleted the circles-006 branch November 1, 2024 03:40
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2024
@metamaskbot metamaskbot added the release-12.8.0 Issue or pull request that will be included in release 12.8.0 label Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.8.0 Issue or pull request that will be included in release 12.8.0 team-extension-platform team-tiger Tiger team (for tech debt reduction + performance improvements)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants