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

feat: Adding context to get current confirmation PR-3 #26645

Merged
merged 22 commits into from
Sep 3, 2024

Conversation

jpuri
Copy link
Contributor

@jpuri jpuri commented Aug 26, 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.

@jpuri jpuri requested review from a team as code owners August 26, 2024 05:09
Copy link
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 26, 2024
@jpuri jpuri changed the title Refactoring confirmation code to use currentConfirmation from confirm… feat: Adding context to get current confirmation PR-3 Aug 26, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [59d707a]
Page Load Metrics (83 ± 9 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint791591122612
domContentLoaded4911977189
load5611983189
domInteractive175731126
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 3.03 KiB (0.04%)
  • common: -461 Bytes (-0.01%)

Copy link

codecov bot commented Aug 26, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.11%. Comparing base (3f0b044) to head (17a2c63).
Report is 13 commits behind head on develop.

Files with missing lines Patch % Lines
...ts/confirm/signature-message/signature-message.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #26645      +/-   ##
===========================================
- Coverage    70.12%   70.11%   -0.01%     
===========================================
  Files         1421     1422       +1     
  Lines        49524    49526       +2     
  Branches     13863    13863              
===========================================
- Hits         34728    34725       -3     
- Misses       14796    14801       +5     

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

matthewwalsh0
matthewwalsh0 previously approved these changes Aug 29, 2024
const currentConfirmation = useSelector(currentConfirmationSelector) as
| TransactionMeta
| undefined;
const { currentConfirmation } = useConfirmContext() as unknown as {
Copy link
Member

Choose a reason for hiding this comment

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

Minor, is it worth using a template on useConfirmContext to avoid the casting in future?

Something like:

const { currentConfirmation } = useConfirmContext<TransactionMeta>();

digiwand
digiwand previously approved these changes Aug 31, 2024
Base automatically changed from confirmation_context_2 to develop September 2, 2024 10:21
@jpuri jpuri dismissed digiwand’s stale review September 2, 2024 10:21

The base branch was changed.

@jpuri jpuri dismissed matthewwalsh0’s stale review September 2, 2024 10:21

The base branch was changed.

@metamaskbot
Copy link
Collaborator

Builds ready [9d87c7b]
Page Load Metrics (1884 ± 67 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint21321801563647311
domContentLoaded16712161186614067
load16832189188414067
domInteractive147835157
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: -87 Bytes (-0.00%)
  • common: 0 Bytes (0.00%)

Copy link

sonarcloud bot commented Sep 2, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [17a2c63]
Page Load Metrics (1664 ± 61 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint20120231442522251
domContentLoaded14982003164212158
load15072020166412761
domInteractive135530116
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: -87 Bytes (-0.00%)
  • common: 0 Bytes (0.00%)

@jpuri jpuri merged commit 0a90e50 into develop Sep 3, 2024
78 checks passed
@jpuri jpuri deleted the confirmation_context_3 branch September 3, 2024 01:10
@github-actions github-actions bot locked and limited conversation to collaborators Sep 3, 2024
@metamaskbot metamaskbot added the release-12.6.0 Issue or pull request that will be included in release 12.6.0 label Sep 3, 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.

6 participants