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

Version v11.15.2 #24385

Merged
merged 2 commits into from
May 6, 2024
Merged

Version v11.15.2 #24385

merged 2 commits into from
May 6, 2024

Conversation

danjm
Copy link
Contributor

@danjm danjm commented May 6, 2024

Manual testing steps:

  1. Download v11.14.5 from the releases page (https://github.com/MetaMask/metamask-extension/releases/download/v11.14.5/metamask-chrome-11.14.5.zip)
  2. Unzip
  3. go to chrome://extensions and "Load unpacked", selecting the file that was just unzipped
  4. Install and onboard
  5. Download v11.15.1 from the releases page (https://github.com/MetaMask/metamask-extension/releases/download/v11.15.1/metamask-chrome-11.15.1.zip)
  6. Unzip
  7. Delete the contents of the unzipped v11.14.5 folder
  8. Copy the contents of the unzipped v11.15.1 to the v11.14.5 folder
  9. Go to chrome://extensions and reload the extension installed in step 3
  10. install and onboard
  11. Notice that there is no "Enable smart transactions" modal shown to the user
  12. Download the build posted by MetaMask bot below (https://output.circle-artifacts.com/output/job/e99a3fdb-e19c-496f-8816-d90dfeab0975/artifacts/0/builds/metamask-chrome-11.15.2.zip)
  13. Repeat steps 6->10 with this build
  14. you should now see an "Enable Smart Transaction" modal

… previous versions (#24377)

## **Description**

This fixes a bug I found while testing v11.15.1. The bug is that
currently only new users will see the "Enable Smart Transactions" modal.
People who already have metamask installed and then update to v11.15.1
will not see the "Enable Smart Transactions" modal. This means that
existing users won't be notified that they can turn this functionality
on.

The reason is that `getIsSmartTransactionsOptInModalAvailable` only
returns true if the result of `getSmartTransactionsOptInStatus(state)`
is `null`. That depends on the `smartTransactionsOptInStatus` property,
from the preferences controller. That property is set within the
`preferencesController.preferences` property, which is an object, within
`initState` of the the preferences controller. `initState` is always
over written by pre-existing state if it existis (via the
`...opts.initState,` line). If a user is updating to v11.15.1 from a
previous version, `preferencesController.preferences` from the previous
version will overwrite the default `preferencesController.preferences`,
and so `smartTransactionsOptInStatus` will be `undefined` (and not
`null`).

The simple fix applied here is for `getSmartTransactionsOptInStatus` to
return `null` if `smartTransactionsOptInStatus` is undefined.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/24377?quickstart=1)

## **Manual testing steps**

1. Locally build and install v11.14.5 and onboard
2. Build this branch and update the existing local build to the build
generated by this branch
3. open metamask and you should see the "Enable Smart Transactions"
modal

Follow the above 3 steps on `develop` or on `Version-v11.15.1`, and
there will be no modal shown on step three.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.
Copy link
Contributor

github-actions bot commented May 6, 2024

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.

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label May 6, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [da8fd37]
Page Load Metrics (1125 ± 621 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint682281073618
domContentLoaded994272110
load56304411251292621
domInteractive994272110

@metamaskbot metamaskbot added the release-11.15.2 Issue or pull request that will be included in release 11.15.2 label May 6, 2024
Copy link
Contributor

@dan437 dan437 left a comment

Choose a reason for hiding this comment

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

Thanks, I can see it there when updating the extension from an older build to the 11.15.2 build.

image

@danjm danjm marked this pull request as ready for review May 6, 2024 12:11
@danjm danjm requested a review from a team as a code owner May 6, 2024 12:11
@danjm danjm merged commit 6327468 into master May 6, 2024
75 of 76 checks passed
@danjm danjm deleted the Version-v11.15.2 branch May 6, 2024 12:11
@github-actions github-actions bot locked and limited conversation to collaborators May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-11.15.2 Issue or pull request that will be included in release 11.15.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants