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: remove global network usage from transaction confirmations #28236

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented Nov 1, 2024

Description

Remove usages of global network selectors from transaction confirmation React components and hooks.

Specifically:

  • Remove usages of the following selectors:
    • getConversionRate
    • getCurrentChainId
    • getNativeCurrency
    • getNetworkIdentifier
    • getNftContracts
    • getNfts
    • getProviderConfig
    • getRpcPrefsForCurrentProvider
  • Add new selectors:
    • selectConversionRateByChainId
    • selectNftsByChainId
    • selectNftContractsByChainId
    • selectNetworkIdentifierByChainId
  • Add ESLint rule to prevent further usage of global network selectors in confirmations directory.

Open in GitHub Codespaces

Related issues

Fixes: #3469 #3373 #3486 #3487

Manual testing steps

Full regression of all transaction confirmations and related functionality.

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@github-actions github-actions bot added the team-confirmations Push issues to confirmations team label Nov 1, 2024
@matthewwalsh0 matthewwalsh0 changed the base branch from develop to refactor/remove-global-network-usage-signatures November 1, 2024 20:48
Base automatically changed from refactor/remove-global-network-usage-signatures to develop November 4, 2024 10:12
@matthewwalsh0 matthewwalsh0 force-pushed the refactor/remove-global-network-usage-transactions branch from 1a2436d to 4751ebf Compare November 5, 2024 12:24
@metamaskbot
Copy link
Collaborator

Builds ready [4751ebf]
Page Load Metrics (2019 ± 105 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint30627461922427205
domContentLoaded170227351995220105
load174927472019219105
domInteractive179647199
backgroundConnect106424168
firstReactRender572091253919
getState566282512
initialActions01000
loadScripts11652014147118086
setupStore1197402914
uiStartup196430012313265127
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 4 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [64e464e]
Page Load Metrics (1940 ± 78 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint23022851874410197
domContentLoaded16882214191715775
load16922230194016278
domInteractive23204573919
backgroundConnect778232110
firstReactRender482951256732
getState56414168
initialActions01000
loadScripts11581636137513464
setupStore1192312713
uiStartup191127402213224107
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: -274 Bytes (-0.00%)
  • common: 244 Bytes (0.00%)

@matthewwalsh0 matthewwalsh0 changed the title refactor: remove global network usage from transactions refactor: remove global network usage from transaction confirmations Nov 5, 2024
@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review November 5, 2024 16:31
@matthewwalsh0 matthewwalsh0 requested review from a team as code owners November 5, 2024 16:31
@metamaskbot
Copy link
Collaborator

Builds ready [43317f9]
Page Load Metrics (2003 ± 172 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint27233671924518249
domContentLoaded170832961974347166
load171833692003358172
domInteractive2188512210
backgroundConnect777242211
firstReactRender532901164522
getState46417199
initialActions01000
loadScripts122623621454261125
setupStore1180342311
uiStartup194136152254361173
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: -29 Bytes (-0.00%)
  • common: 883 Bytes (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants