Merged
Conversation
* origin/develop: Fix 9435 - Allow speeding up of underpriced transactions (#9687)
Sync `master` with `develop`
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.
* Fix related unit tests
* 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
previously approved these changes
Nov 13, 2020
|
Hey guys, When will this be released ? Thanks! |
7c7709b to
f49233b
Compare
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`
f49233b to
242d904
Compare
Collaborator
Author
Builds ready [242d904]
Page Load Metrics (400 ± 60 ms)
|
Collaborator
Author
Builds ready [c0a72e7]
Page Load Metrics (413 ± 63 ms)
|
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.
c0a72e7 to
0b6de08
Compare
Collaborator
Author
Builds ready [0b6de08]
Page Load Metrics (343 ± 30 ms)
|
The hardware wallet error handling improvements have been added to the release.
Collaborator
Author
Builds ready [20a3c8a]
Page Load Metrics (324 ± 24 ms)
|
Gudahtt
approved these changes
Nov 16, 2020
Member
Gudahtt
left a comment
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📦 🚀
v8.1.4 Changelog