Skip to content

Version v8.1.4 RC#9843

Merged
Gudahtt merged 122 commits intomasterfrom
Version-v8.1.4
Nov 16, 2020
Merged

Version v8.1.4 RC#9843
Gudahtt merged 122 commits intomasterfrom
Version-v8.1.4

Conversation

@metamaskbot
Copy link
Copy Markdown
Collaborator

@metamaskbot metamaskbot commented Nov 10, 2020

📦 🚀

v8.1.4 Changelog

darkwing and others added 30 commits October 28, 2020 16:56
* origin/develop:
  Fix 9435 - Allow speeding up of underpriced transactions (#9687)
)"

This reverts commit d5b8a4a. This
restores the new "main-quote-summary" designs that were initially
implemented in #9612.
The shared mocks used previously in the incoming transaction controller
tests have been replaced with functions that can generate a new mock
for each test.

We should avoid ever sharing mocks between tests. It's quite easy for
a mock to get accidentally mutated or not correctly "reset" for the
next test, leading to test inter-dependencies and misleading results.

In particular, it is unsafe to share a `sinon` fake (e.g. a spy or
stub) because they can't be fully reset between tests. Or at least it's
difficult to reset them property, and it can't be done while also
following their recommendations for preventing memory leaks.

The spy API and all related state can be reset with `resetHistory`,
which can be called between each test. However `sinon` also recommends
calling `restore` after each test, and this will cause `sinon` to drop
its internal reference to the fake object, meaning any subsequent call
to `resetHistory` would fail. This is intentional, as it's required to
prevent memory from building up during the test run, but it also means
that sharing `sinon` fakes is particularly difficult to do safely.

Instead we should never share mocks in the first place, which has other
benefits anyway.

This was discovered while writing tests for #9583. I mistakenly
believed that `sinon.restore()` would reset the spy state, and this was
responsible for many hours of debugging test failures.
If the swaps state is cleared in between the initial quote fetch and
the subsequent poll fetch, a `TypeError` will be thrown due to
`fetchParams` being set to `null`.

This is of no functional consequence, as `fetchParams` _should_ be
`null` in this case, and and no further action should be taken.

The optional chaining operator is now used to ensure the call no longer
throws.
* Standardize appearance of network settings

* Add separate route for network settings form

* Control network form rendering in popup via route

* Hide network form buttons when form is viewOnly

* Handle extremely long network names
This comment block describes the responsibilities of this controller.
This was motivated by a suggestion made during review of #9755 [1]

[1]: #9755 (comment)
Unit tests have been added to the incoming transactions controller to
ensure that block updates are correctly resulting in state updates when
incoming transactions are enabled. All other events that trigger state
updates are tested as well.

The tests were written to be minimally dependent upon implementation
details of the controller itself. `nock` was used to mock the API
response from Etherscan. Each event is triggered asynchronously by
`sinon`, as in production they are likely only triggered
asynchronously.

This was extracted from #9583

This PR includes a new `wait-until-called` module meant to help with
writing asynchronous tests. It allows you to wait until a stub has been
called.
rekmarks and others added 4 commits November 12, 2020 16:37
* Document where we need BigNumber-related changes

* Fix 1 unit test

* Debug progress

* Add required values for each upstream usage of getBigNumber

* Switch to base 10

* Address feedback
0xNikolas
0xNikolas previously approved these changes Nov 13, 2020
@rattrap
Copy link
Copy Markdown

rattrap commented Nov 13, 2020

Hey guys,

When will this be released ?
We're waiting for the fix for #9791

Thanks!

This reverts commit f30d261.

The custom HD path option was found to be unsafe to use, because the
displayed list of accounts would differ depending on which application
was open on the Ledger device. Essentially Ledger was accepting invalid
inputs, and returning junk responses.

This was too dangerous to ship, as it could leave users with an account
that they can't reliably recover. If we don't know how the derivation
is happening, then allowing this import puts our users at risk of
losing funds.

We can re-introduce this functionality after adding validation to
ensure that we only allow inputs that are handled correctly by Ledger.
`PropTypes.oneOf` was used accidentally instead of
`PropTypes.oneOfType`. `oneOf` expects literal values, not types.
`PropTypes.function` was used accidentally instead of `PropType.func`
@metamaskbot
Copy link
Copy Markdown
Collaborator Author

Builds ready [242d904]
Page Load Metrics (400 ± 60 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint28523663
domContentLoaded23865139812560
load23965340012560
domInteractive23765139812560

@metamaskbot
Copy link
Copy Markdown
Collaborator Author

Builds ready [c0a72e7]
Page Load Metrics (413 ± 63 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint319247199
domContentLoaded26575841113263
load26776041313263
domInteractive26575741113263

darkwing and others added 6 commits November 13, 2020 16:37
Changes that aren't user-facing have been omitted.
A few new user-facing features have been pulled into the release, and
the custom HD path support has been reverted.
@metamaskbot
Copy link
Copy Markdown
Collaborator Author

Builds ready [0b6de08]
Page Load Metrics (343 ± 30 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint30403531
domContentLoaded2585453416230
load2595463436230
domInteractive2575453416230

The hardware wallet error handling improvements have been added to the
release.
@metamaskbot
Copy link
Copy Markdown
Collaborator Author

Builds ready [20a3c8a]
Page Load Metrics (324 ± 24 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint318940126
domContentLoaded2464103235024
load2494113245024
domInteractive2454093225024

Copy link
Copy Markdown
Contributor

@tmashuang tmashuang left a comment

Choose a reason for hiding this comment

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

LGTM

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 not verified most of the features in this release, but I have been testing this throughout the week. I've ensured that the hardware connect flow still works now that the custom HD path feature has been reverted.

@Gudahtt Gudahtt merged commit 2e73285 into master Nov 16, 2020
@Gudahtt Gudahtt deleted the Version-v8.1.4 branch November 16, 2020 20:23
@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 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.