feat: Adding context to get current confirmation PR-2#26619
Conversation
|
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. |
0937983 to
52c9891
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
Builds ready [c6b35fb]
Page Load Metrics (87 ± 9 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
digiwand
left a comment
There was a problem hiding this comment.
The transition to context is looking great! Had a couple of comments above related to tests and a condition
| }, | ||
| }, | ||
| }; | ||
| const mockStore = getExampleMockSignatureConfirmState(); |
There was a problem hiding this comment.
[suggestion] I think "ExampleMock" could be redundant. I would recommend getMockSignatureConfirmState. Similar comment for the other helper mocks
There was a problem hiding this comment.
This name I have changed already in following PRs.
ui/pages/confirmations/hooks/useCurrentSignatureSecurityAlertResponse.ts
Show resolved
Hide resolved
Builds ready [7b24f9f]
Page Load Metrics (73 ± 9 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
| time: new Date().getTime(), | ||
| type: 'personal_sign', | ||
| securityProviderResponse: null, | ||
| chainid: '0x5', |
There was a problem hiding this comment.
Should this also use mockState.metamask.networkConfigurations.goerli.chainId?
There was a problem hiding this comment.
The object not not using mockState.metamask otherwise thus I would avoid importing it for just chainId.
|
Builds ready [6c4b939]
Page Load Metrics (1839 ± 86 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|



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