-
Notifications
You must be signed in to change notification settings - Fork 5k
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: Enable redesigned transaction confirmations for all users #28321
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. |
03d87cf
to
806f6d6
Compare
Builds ready [806f6d6]
Page Load Metrics (1936 ± 89 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
8ece0b5
to
819c05b
Compare
Builds ready [9365487]
Page Load Metrics (2353 ± 128 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
b8cfa35
to
3a69a65
Compare
// fix race condition with mmi build | ||
if (process.env.MMI) { | ||
await driver.waitForSelector('[data-testid="global-menu-mmi-portfolio"]'); | ||
} |
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.
👍🏼
app/scripts/migrations/132.ts
Outdated
| Record<string, unknown> | ||
| undefined; | ||
|
||
if (isObject(preferencesControllerState) && isObject(preferences)) { |
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.
I think there's no need to check isObject(preferencesControllerState)
since preferences
is derived from preferencesControllerState
if (isObject(preferencesControllerState) && isObject(preferences)) { | |
if (isObject(preferences)) { |
app/scripts/migrations/132.ts
Outdated
): Record<string, unknown> { | ||
const preferencesControllerState = state?.PreferencesController as | ||
| Record<string, unknown> | ||
| undefined; |
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.
We have supported the case when no preferences state is found in previous migrations. It may be a good idea to support it here as well. Then we can ensure we set redesignedTransactionsEnabled
for this migration. Maybe it's automatically set to true by default later, in which case we wouldn't need this.
example: migration 122
if (!isObject(state.PreferencesController?.preferences)) {
state.PreferencesController = {
preferences: {},
};
}
0f54e15
to
7b198b9
Compare
Builds ready [7b198b9]
Page Load Metrics (1704 ± 90 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Migrates all users to the redesigned transactions. The setting will be automatically toggled on.
This change initially broke a number of end-to-end tests. After an analysis, I grouped these failing tests into three categories:
This includes multichain and transaction insights tests. All tests on these files were tweaked to pass on redesigned confirmations. Specific tests that initially broke for new confirmations were also duplicated and included the temporary helper method
tempToggleSettingRedesignedTransactionConfirmations
so they were run for the old confirmations that we still need to support.For these tests, we simply added
tempToggleSettingRedesignedTransactionConfirmations
. Once we remove the old flows, we can modify the tests to support the new flows. We didn't think it was as urgent to test these flows with the redesigned screens.For these tests, we simply added
tempToggleSettingRedesignedTransactionConfirmations
. Once we remove the old confirmation screens, we can delete these tests because they are no longer relevant, or otherwise already tested in the redesigned confirmation specific tests.Summary of the e2e tests that broke with the migration
User flows that have to be tested before enabling the redesign to all users, 🔴
User flows that we don't need to migrate immediately, but will have to be migrated or adapted when old confirmations flows are deleted, 🟡
User flows that we don't need to migrate to redesigned confirmations. 🟢
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3026
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist