Skip to content

Version v8.1.8 RC#10024

Merged
Gudahtt merged 17 commits intomasterfrom
Version-v8.1.8
Dec 9, 2020
Merged

Version v8.1.8 RC#10024
Gudahtt merged 17 commits intomasterfrom
Version-v8.1.8

Conversation

@metamaskbot
Copy link
Copy Markdown
Collaborator

@metamaskbot metamaskbot commented Dec 9, 2020

📦 🚀

Changelog

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 9, 2020

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.

@Gudahtt
Copy link
Copy Markdown
Member

Gudahtt commented Dec 9, 2020

Since v8.1.8 is replacing what v8.1.7 was previously, I cherry-picked the old v8.1.7 changelog commit and updated the version number.

@metamaskbot
Copy link
Copy Markdown
Collaborator Author

Builds ready [1b1661d]
Page Load Metrics (589 ± 31 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint336449105
domContentLoaded3876885886431
load3886905896431
domInteractive3866885876431

@Gudahtt
Copy link
Copy Markdown
Member

Gudahtt commented Dec 9, 2020

We'll need to merge master into this branch to resolve those conflicts. It might be easiest to bring in the last blocker (#10026) first though.

@Gudahtt Gudahtt dismissed a stale review via 24c8d51 December 9, 2020 15:39
Gudahtt and others added 17 commits December 9, 2020 12:11
* Update transaction params validation

* fixup! Update transaction params validation

* Update to/data error message

* fixup! Update to/data error message
The `waitUntilCalled` utility now has a timeout. It will now throw an
error if the stub is not called enough times, rather than blocking
forever.

The return type had to be changed to a function, so that we could throw
when the timeout is triggered. I tried returning an error that rejected
first, but if you don't handle the error synchronously Node.js will
consider it to be an unhandled Promise rejected (even if it _is_
handled later on).

I worked around this by resolving in the timeout case as well, so that
there is never a "deferred" Promise exception in the timeout case. The
returned function re-throws the error if it's given. That way there is
never any unhandled Promise rejection.
Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 10.4.0 to 10.4.1.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/master/CHANGES.md)
- [Commits](highlightjs/highlight.js@10.4.0...10.4.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…back to build quote screen while having insufficient funds (#9994)
When the SES lockdown was added in #9729, the lockdown and the Sentry
initialization were migrated from the main bundle into separate
modules, which were run as separate `<script>` tags. These extra tags
were accidentally omitted for `home.html` and `notification.html`. As
a result Sentry was not initialized on these pages, so any errors
thrown on them would not be collected. They also do not benefit from
the SES lockdown.

The SES lockdown and Sentry initialization modules have been added to
both pages where they were missing.
The SES lockdown added in #9729 had the effect of obfuscating our error
messages. Any messages printed to the console would have the error
message replaced with the string "Error #" followed by a number. The
stack was also updated to point at `lockdown.cjs`, though the original
stack was preserved beneath the top stack frame.

Marking the `console` API as untamed seems to have fixed both issues.
The original error message is now printed to the console, along with
the original stack.
The new metrics controller has a `trackEvent` function that was being
called unbound, so `this` references were undefined. It is now bound
early in both places where it is passed in as a parameter.
On older browsers that don't support `globalThis`[1], the SES lockdown
throws an error. The `globalthis` shim has been added to all pages, to
the background process, and to the `contentscript`. This should prevent
the error on older browsers.

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis#Browser_compatibility
Failures to persist state are now logged in Sentry. Previously they
were only logged to the background console.
When you load an extension `.zip` file in Firefox, it fails to load
scripts with the `.cjs` file extension. However, it works if you load
the extension via the `manifest.json` file instead.

After renaming the `lockdown.cjs` file to `lockdown.js`, it works in
Firefox in all cases, regardless whether it's loaded by manifest or by
`.zip`.
All user-facing changes have been listed.
@Gudahtt
Copy link
Copy Markdown
Member

Gudahtt commented Dec 9, 2020

This branch looks a little strange because I was unable to base this on develop, as it has changes that we don't want to ship yet (the injected web3 removal). So instead I reverted both reverts, then cherry-picked everything we want from develop.

@metamaskbot
Copy link
Copy Markdown
Collaborator Author

Builds ready [f579acc]
Page Load Metrics (552 ± 14 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint31624894
domContentLoaded5026345502914
load5046355522914
domInteractive5026335502914

@Gudahtt Gudahtt marked this pull request as ready for review December 9, 2020 19:06
@Gudahtt Gudahtt requested review from a team and kumavis as code owners December 9, 2020 19:06
@Gudahtt Gudahtt requested a review from danjm December 9, 2020 19:06
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

I have tested the four user-facing changes.

  • #9992: Improve transaction params validation

I tested this using the malformed transaction mentioned in the repro for #9967, and I did get the appropriate error asking for either the to or data param to be set.

  • #9991: Don't allow more than 15% slippage
  • #9994: Prevent unwanted 'no quotes available' message when going back to build quote screen while having insufficient funds

These two seemed fairly straightforward to test

  • #9999: Fix missing contacts upon restart

I was able to confirm that contacts were viewable after restart without switching networks, so this appears to be fixed.

Additionally, I checked the console for lockdown errors on each window (popup, home, notification, phishing) and on the dapp and the background process. No errors anywhere. I also ensured Sentry was initialized everywhere it should be (in all places but the phishing page and the contentscript).

LGTM!

@Gudahtt Gudahtt merged commit b0579f9 into master Dec 9, 2020
@Gudahtt Gudahtt deleted the Version-v8.1.8 branch December 9, 2020 21:30
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants