-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: Redesigned setApprovalForAll confirmations #27061
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. |
fa7fa67
to
8205e7b
Compare
94d7fc7
to
93dbee0
Compare
93dbee0
to
1244155
Compare
Builds ready [1244155]
Page Load Metrics (1767 ± 73 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
1244155
to
4a0bd3a
Compare
Builds ready [4a0bd3a]
Page Load Metrics (1568 ± 68 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #27061 +/- ##
===========================================
- Coverage 70.09% 70.01% -0.08%
===========================================
Files 1438 1447 +9
Lines 49971 50218 +247
Branches 13989 14048 +59
===========================================
+ Hits 35026 35157 +131
- Misses 14945 15061 +116 ☔ View full report in Codecov by Sentry. |
4a0bd3a
to
1fd42fe
Compare
await withFixtures( | ||
{ | ||
dapp: true, | ||
fixtures: new FixtureBuilder() | ||
.withPermissionControllerConnectedToTestDapp() | ||
.withPreferencesController({ | ||
preferences: { | ||
redesignedConfirmationsEnabled: true, | ||
isRedesignedConfirmationsDeveloperEnabled: true, | ||
}, | ||
}) | ||
.build(), | ||
ganacheOptions: defaultGanacheOptionsForType2Transactions, | ||
smartContract, | ||
testSpecificMock: mocks, | ||
title: this.test?.fullTitle(), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[comment]
we have a helper method withRedesignConfirmationFixtures
which we could update to support more options. The more I think about it, we could do what we did in the last PR and create a method to generate the fixture options object with these options instead.
@@ -16,7 +16,11 @@ import { | |||
RecipientRow, | |||
} from '../../shared/transaction-details/transaction-details'; | |||
|
|||
const Spender = () => { | |||
const Spender = ({ | |||
isSetApprovalForAll, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] we could set a default value to fix type to boolean
isSetApprovalForAll, | |
isSetApprovalForAll = false, |
@@ -44,14 +51,18 @@ const Spender = () => { | |||
); | |||
}; | |||
|
|||
export const ApproveDetails = () => { | |||
export const ApproveDetails = ({ | |||
isSetApprovalForAll, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] we could set a default value to fix type to boolean
isSetApprovalForAll, | |
isSetApprovalForAll = false, |
Builds ready [1fd42fe]
Page Load Metrics (1783 ± 127 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
test/e2e/tests/confirmations/transactions/erc1155-set-approval-for-all-redesign.spec.ts
Outdated
Show resolved
Hide resolved
...onfirmations/components/confirm/info/set-approval-for-all-info/set-approval-for-all-info.tsx
Outdated
Show resolved
Hide resolved
1ed1d28
2 tests suites failing which requires updates: SonarCloud is flagging coverage < 80% |
6d267b0
3bf14ef
to
6d267b0
Compare
6d267b0
to
717c4ff
Compare
Quality Gate passedIssues Measures |
Builds ready [717c4ff]
Page Load Metrics (1759 ± 103 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Implement setApprovalForAll redesigned confirmation for ERC721 and ERC1155 tokens. Includes e2e tests that use the Page Object Model, and refactors withRedesignedConfirmations to support EIP1559 transactions.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2937
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist