Whymarrh Whitby
b6ccd22d6c
Update ESLint shared config to v3 ( #9274 )
...
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
4 years ago
Whymarrh Whitby
6ab12001e3
Fix prefer-destructuring issues ( #9263 )
...
See [`prefer-destructuring`](https://eslint.org/docs/rules/prefer-destructuring ) for more information.
This change enables `prefer-destructuring` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
6f4c3b3405
Tidy up Migrator tests ( #9264 )
4 years ago
Whymarrh Whitby
c1e3c229bc
Fix import/order issues ( #9239 )
...
See [`import/order`](https://eslint.org/docs/rules/import/order ) for more information.
This change enables `import/order` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
b7259e5d6a
Fix radix issues ( #9247 )
...
See [`radix`](https://eslint.org/docs/rules/radix ) for more information.
This change enables `radix` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
4357cda7b8
Fix no-shadow issues ( #9246 )
...
See [`no-shadow`](https://eslint.org/docs/rules/no-shadow ) for more information.
This change enables `no-shadow` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
e803807dd9
Fix no-param-reassign issues ( #9235 )
...
See [`no-param-reassign`](https://eslint.org/docs/rules/no-param-reassign ) for more information.
This change enables `no-param-reassign` and fixes the issues raised by the rule.
4 years ago
Thomas Huang
87e5281a82
Clear Account Details in AppState ( #9238 )
...
* Clear Account Details in AppState
We store sensitive information in the AppState under accountDetail for when the modal is active and present. This adds a new action/reducer and componentWillUnmount to clean up the persisted data left after leaving the modal.
* Remove reduntant clearAccountDetails call when clicking done button
4 years ago
Whymarrh Whitby
aaacf66c6e
Fix import/no-extraneous-dependencies issues ( #9232 )
...
See [`import/no-extraneous-dependencies`](https://eslint.org/docs/rules/import/no-extraneous-dependencies ) for more information.
This change enables `import/no-extraneous-dependencies` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
9e7841fa91
Consolidate ESLint config files ( #9231 )
4 years ago
Whymarrh Whitby
5d42a9b773
Fix require-unicode-regexp issues ( #9212 )
...
* Fix require-unicode-regexp issues
See [`require-unicode-regexp`](https://eslint.org/docs/rules/require-unicode-regexp ) for more information.
This change enables `require-unicode-regexp` and fixes the issues raised by the rule.
* Remove case-insensitive flag from regexps
4 years ago
Whymarrh Whitby
884775cf71
Fix no-negated-condition issues ( #9222 )
...
See [`no-negated-condition`](https://eslint.org/docs/rules/no-negated-condition ) for more information.
This change enables `no-negated-condition` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
c11888f287
Fix no-empty-function issues ( #9216 )
...
See [`no-empty-function`](https://eslint.org/docs/rules/no-empty-function ) for more information.
This change enables `no-empty-function` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
9b78d3ab07
Fix import/extensions issues ( #9217 )
...
See [`import/extensions`](https://eslint.org/docs/rules/import/extensions ) for more information.
This change enables `import/extensions` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
954df6e482
Fix no-constant-condition issues ( #9210 )
...
See [`no-constant-condition`](https://eslint.org/docs/rules/no-constant-condition ) for more information.
This change enables `no-constant-condition` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
853b89e314
Fix no-global-assign issues ( #9209 )
...
See [`no-global-assign`](https://eslint.org/docs/rules/no-global-assign ) for more information.
This change enables `no-global-assign` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
310b15ba4a
Fix no-plusplus issues ( #9206 )
...
See [`no-plusplus`](https://eslint.org/docs/rules/no-plusplus ) for more information.
This change enables `no-plusplus` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
f8ebfc2f63
Update PreferencesController#_validateERC20AssetParams tests ( #9204 )
...
This change fixes the `_validateERC20AssetParams` tests, ensuring that the given
options are all valid except those that are being tested. Previously the `symbol`
property was invalid _in addition to_ the `decimals` property.
4 years ago
Whymarrh Whitby
88f54e29fb
Fix no-empty issues ( #9202 )
...
See [`no-empty`](https://eslint.org/docs/rules/no-empty ) for more information.
This change enables `no-empty` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
3346c2fc07
Fix no-loop-func issues ( #9199 )
...
See [`no-loop-func`](https://eslint.org/docs/rules/no-loop-func ) for more information.
This change enables `no-loop-func` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
a8863a3446
Fix consistent-return issues ( #9192 )
...
See [`consistent-return`](https://eslint.org/docs/rules/consistent-return ) for more information.
This change enables `consistent-return` and fixes the issues raised by the rule.
4 years ago
Brad Decker
01f69d7e7a
colocate account modal styles with their components ( #9150 )
...
This one gets a bit more complicated because the styles were interwoven and needed to be untangled to be moved. Essentially, though, the goal is to put the styles where they make the most sense and colocate them with their components.
4 years ago
Erik Marks
4922b1b9b5
Check if getCleanAppState is defined before calling ( #9170 )
4 years ago
Erik Marks
c3bc7de412
Remove web3 e2e tests ( #9159 )
4 years ago
Erik Marks
948a4c8316
fixup! call initializeProvider where necessary
4 years ago
Erik Marks
30a59bb867
call initializeProvider where necessary
4 years ago
Erik Marks
93f695d3c6
fix timing-reliant network controller test
4 years ago
Erik Marks
1591ed7657
Robustify permissions controller requestUserApproval tests ( #9064 )
...
* convert requestUserApproval mock to wrapper
4 years ago
Erik Marks
5527a6d9e9
Remove web3 e2e tests ( #9159 )
4 years ago
Brad Decker
f3ba18d79f
remove unused section scss ( #9146 )
4 years ago
Erik Marks
826d1462f0
fixup! call initializeProvider where necessary
4 years ago
Erik Marks
b3e5befe74
call initializeProvider where necessary
4 years ago
Erik Marks
5cb22ee8df
fix timing-reliant network controller test
4 years ago
Erik Marks
f6f8e5cc4a
Robustify permissions controller requestUserApproval tests ( #9064 )
...
* convert requestUserApproval mock to wrapper
4 years ago
Whymarrh Whitby
b7a4d35318
Retry e2e tests 3 times ( #9070 )
4 years ago
Brad Decker
21292a8ed1
update eth-token-tracker ( #9056 )
4 years ago
Whymarrh Whitby
231867df39
Handle failure to build webDriver instance ( #9052 )
4 years ago
Whymarrh Whitby
5899937165
Await the completion of setupFetchMocking for e2e tests ( #9047 )
4 years ago
Whymarrh Whitby
bf6578c6b8
Enable guard-for-in rule ( #9000 )
4 years ago
Brad Decker
e463a47588
do not show amounts for approvals ( #9032 )
4 years ago
Whymarrh Whitby
2ae4720443
Fix words ( #9038 )
4 years ago
Whymarrh Whitby
50c4db73cf
Fix global-require issues ( #8999 )
4 years ago
Whymarrh Whitby
68a64af5b3
Fix callback-return issues ( #8996 )
...
See [`callback-return`](https://eslint.org/docs/rules/callback-return ) for more information.
This change enables `callback-return` and fixes the resulting issues.
4 years ago
Thomas Huang
7b2218ac6e
Clear unapprovedTxs on createNewVaultAndRestore ( #9026 )
...
Clear unapproved transactions from txStateManager.transactions on createNewVaultAndRestore
4 years ago
Whymarrh Whitby
c7fad8f400
Limit number of transactions passed outside of TransactionController ( #9010 )
...
Refs #8572
Refs #8991
This change limits the number of transactions (`txMeta`s) that are passed
outside of the `TransactionController`, resulting in shorter serialization and
deserialization times when state is moved between the background and UI
contexts.
`TransactionController#_updateMemstore`
---------------------------------------
The `currentNetworkTxList` state of the `TransactionController` is used
externally (i.e. outside of the controller) as the canonical source for
the full transaction history. Prior to this change, the method would iterate
the full transaction history and possibly return all of it.
This change limits it to `MAX_MEMSTORE_TX_LIST_SIZE` to make sure that:
1. Calls to `_updateMemstore` are fast(er)
2. Passing `currentNetworkTxList` around is fast(er)
(Shown in #8377 , `_updateMemstore`, is called _frequently_ when a transaction
is pending.)
The list is iterated backwards because it is possible that new transactions are
at the end of the list. [1]
Results
-------
In profiles before this change, with ~3k transactions locally,
`PortDuplexStream._onMessage` took up to ~4.5s to complete when the set of
transactions is included. [2]
In profiles after this change, `PortDuplexStream._onMessage` took ~90ms to
complete. [3]
Before vs. after profile screenshots:
![Profile 1][2]
![Profile 2][3]
[1]:5a3ae85b72/app/scripts/controllers/transactions/tx-state-manager.js (L172-L174)
[2]:https://user-images.githubusercontent.com/1623628/87613203-36f51d80-c6e7-11ea-89bc-11a1cc2f3b1e.png
[3]:https://user-images.githubusercontent.com/1623628/87613215-3bb9d180-c6e7-11ea-8d85-aff3acbd0374.png
[8337]:https://github.com/MetaMask/metamask-extension/issues/8377
[8572]:https://github.com/MetaMask/metamask-extension/issues/8572
[8991]:https://github.com/MetaMask/metamask-extension/issues/8991
4 years ago
Mark Stacey
022ef13372
Fix migration 47 ( #9014 )
...
This migration had referred to the non-existent
`TransactionsController` instead of `TransactionController`, so it
effectively did nothing. Now it should work.
This migration hasn't been included in any release yet, so we can fix
it in-place instead of adding an additional corrected migration.
The migration comment has also been updated, as it was inaccurate.
4 years ago
Whymarrh Whitby
4f0a205369
Use eslint@6.8.0 ( #8978 )
...
* Use eslint@6.8.0
* yarn lint:fix
4 years ago
Mark Stacey
2856af2336
Remove integration tests ( #8959 )
...
The remaining integration tests are all covered by e2e tests, so
they're no longer needed.
All associated scripts, fixtures, and dependencies have also been
removed.
4 years ago
Mark Stacey
d53c4f824e
Add `personal_sign` e2e test ( #8958 )
...
This tests the `personal_sign` method using the test dapp. This test
reflects part of the `confirm-sig-requests` integration test, which
tests the confirmation of a `personal_sign` signature request.
A `data-testid` prop was added to the 'Sign' button on the signature
request confirmation page, to make it easier to select the 'Sign'
button reliably.
4 years ago
Mark Stacey
111bef2baa
Update `@metamask/test-dapp` to v3.1.0 ( #8963 )
...
This updated test dapp has a new `personal_sign` button. It also fixes
the `Encrypt` button, which was broken in `v3.0.0`.
The `signature-request` e2e test needed to be updated to find the
'Sign' button by id rather than by text, since there are now two
buttons with the text 'Sign'.
4 years ago