Skip to content

feat: Adding context to get current confirmation PR-2#26619

Merged
jpuri merged 17 commits intodevelopfrom
confirmation_context_2
Sep 2, 2024
Merged

feat: Adding context to get current confirmation PR-2#26619
jpuri merged 17 commits intodevelopfrom
confirmation_context_2

Conversation

@jpuri
Copy link
Copy Markdown
Contributor

@jpuri jpuri commented Aug 22, 2024

Description

Using context to get currently selected confirmation in re-designed confirmation pages. This is done to switch to using react context transient UI state in re-designed confirmation pages.

Related issues

Ref: #26414

Manual testing steps

NA

Screenshots/Recordings

NA

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
Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions bot added the team-confirmations Push issues to confirmations team label Aug 22, 2024
@jpuri jpuri force-pushed the confirmation_context_2 branch from 0937983 to 52c9891 Compare August 22, 2024 16:21
@jpuri jpuri changed the title Adding context to get current confirmation feat: Adding context to get current confirmation Aug 22, 2024
@jpuri jpuri marked this pull request as ready for review August 22, 2024 17:29
@jpuri jpuri requested a review from a team as a code owner August 22, 2024 17:29
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.09%. Comparing base (5174392) to head (6c4b939).
Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #26619      +/-   ##
===========================================
+ Coverage    70.08%   70.09%   +0.01%     
===========================================
  Files         1414     1415       +1     
  Lines        49327    49328       +1     
  Branches     13781    13779       -2     
===========================================
+ Hits         34567    34572       +5     
+ Misses       14760    14756       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [c6b35fb]
Page Load Metrics (87 ± 9 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint831671162311
domContentLoaded56123842010
load5812387199
domInteractive185833105
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 3.21 KiB (0.05%)
  • common: -461 Bytes (-0.01%)

Copy link
Copy Markdown
Contributor

@digiwand digiwand left a comment

Choose a reason for hiding this comment

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

The transition to context is looking great! Had a couple of comments above related to tests and a condition

},
},
};
const mockStore = getExampleMockSignatureConfirmState();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[suggestion] I think "ExampleMock" could be redundant. I would recommend getMockSignatureConfirmState. Similar comment for the other helper mocks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This name I have changed already in following PRs.

@jpuri jpuri requested a review from a team as a code owner August 23, 2024 09:03
@jpuri jpuri requested a review from digiwand August 26, 2024 05:03
@jpuri jpuri changed the title feat: Adding context to get current confirmation feat: Adding context to get current confirmation PR-2 Aug 26, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [7b24f9f]
Page Load Metrics (73 ± 9 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6613397199
domContentLoaded4111466199
load4711473189
domInteractive85526126
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 3.12 KiB (0.04%)
  • common: -461 Bytes (-0.01%)

matthewwalsh0
matthewwalsh0 previously approved these changes Aug 27, 2024
time: new Date().getTime(),
type: 'personal_sign',
securityProviderResponse: null,
chainid: '0x5',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this also use mockState.metamask.networkConfigurations.goerli.chainId?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The object not not using mockState.metamask otherwise thus I would avoid importing it for just chainId.

Base automatically changed from confirmation_context to develop August 29, 2024 05:30
@jpuri jpuri dismissed matthewwalsh0’s stale review August 29, 2024 05:30

The base branch was changed.

@jpuri jpuri requested a review from matthewwalsh0 August 29, 2024 05:43
@sonarqubecloud
Copy link
Copy Markdown

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [6c4b939]
Page Load Metrics (1839 ± 86 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint33224601666472227
domContentLoaded16092331181016780
load16622470183918086
domInteractive20111392211
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 1.37 KiB (0.02%)
  • common: -461 Bytes (-0.01%)

@jpuri jpuri merged commit 3f0b044 into develop Sep 2, 2024
@jpuri jpuri deleted the confirmation_context_2 branch September 2, 2024 10:21
@github-actions github-actions bot locked and limited conversation to collaborators Sep 2, 2024
@metamaskbot metamaskbot added the release-12.6.0 Issue or pull request that will be included in release 12.6.0 label Sep 2, 2024
@gauthierpetetin gauthierpetetin added release-12.5.0 Issue or pull request that will be included in release 12.5.0 and removed release-12.6.0 Issue or pull request that will be included in release 12.6.0 labels Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-12.5.0 Issue or pull request that will be included in release 12.5.0 team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants