1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
Commit Graph

1731 Commits

Author SHA1 Message Date
Brad Decker
57be0e49d1
use waitForSelector instead of until (#10852)
* complete abstraction of until method

* response to feedback
2021-04-13 16:36:02 -05:00
Brad Decker
2f4e377cf5
add key literals to driver (#10854) 2021-04-12 10:32:38 -05:00
Thomas Huang
f7f1f28752
Adjust renderWithProvider to accommodate redux-less components (#10857) 2021-04-09 08:59:32 -07:00
Niranjana Binoy
8df7a712f3
Refactoring threebox.spec.js to use fixtures (#10849) 2021-04-08 19:53:18 -04:00
Brad Decker
9079fb87ec
add abstraction for waitForSelector (#10844) 2021-04-08 10:41:23 -05:00
Brad Decker
cd97340bb8
use locator abstraction in tests folder (#10833) 2021-04-07 09:57:40 -05:00
Niranjana Binoy
d1d7622c93
Refactoring signature-request.spec.js to use fixtures (#10820) 2021-04-07 10:18:20 -04:00
Niranjana Binoy
501829e5ca
Refactoring permissions.spec.js to use fixtures (#10829) 2021-04-06 17:11:22 -04:00
Niranjana Binoy
dc1a036786
Removing unnecessary params from withFixtures function call. (#10831) 2021-04-06 13:39:28 -04:00
Niranjana Binoy
966b2dcb43
Refactoring send-edit.spec.js to use fixtures (#10792) 2021-04-04 15:06:26 -04:00
Niranjana Binoy
044949f8e1
Refactoring address-book.spec.js to use fixtures (#10804) 2021-04-02 22:40:53 -04:00
Brad Decker
097439eda3
Add support for locators into driver abstraction (#10802) 2021-04-02 14:45:11 -05:00
Niranjana Binoy
e63fcf1e30
Refactoring ethereum-on.spec.js to use fixtures (#10778) 2021-03-31 13:06:44 -04:00
Dan J Miller
9573aa7515
Update @metamask/controllers to v6.2.1 (#10701) 2021-03-25 17:37:52 -02:30
Brad Decker
5a233e4634
colocate tests in flat structure (#10655) 2021-03-16 16:00:08 -05:00
Dan J Miller
153bbc6053
Move swaps constants to the shared constants directory (#10614) 2021-03-15 10:51:35 -02:30
Brad Decker
3d4dfc74a8
prefer chainId over networkId in most cases (#10594) 2021-03-12 16:23:26 -06:00
Brad Decker
2ed5bafa11
remove transactionCategory in favor of more types (#10615)
* remove transactionCategory in favor of more types

* remove reference to STANDARD in stubs
2021-03-10 14:16:44 -06:00
Erik Marks
a29fc51838
Ensure permission log will only store JSON-able data (#10524) 2021-03-10 11:50:06 -08:00
Brad Decker
aa37e30c08
use etherscan-link for account-link (#10590) 2021-03-10 11:21:52 -06:00
David Walsh
92680cf56f
Add support for multiple Ledger & Trezor hardware accounts (#10505) 2021-03-09 14:39:16 -06:00
Thomas Huang
3ba91df387
Unifies unit tests filename suffix to .test.js (#10607)
* Unifies the filename suffix to .test.js

* Display @babel/no-invalid-this rule for tx-controller.test.js

* Add test file extension to test:unit:global
2021-03-09 11:08:06 -08:00
Dan J Miller
c86ceacfd9
Standard reference to ETH_SWAPS_TOKEN_ADDRESS via ETH_SWAPS_TOKEN_OBJECT.address (#10613) 2021-03-09 12:29:35 -03:30
Brad Decker
3840a58e82
use metamask/etherscan-link (#10580) 2021-03-04 12:16:33 -06:00
Brad Decker
e42658b590
cache balances by chain id (#10545) 2021-03-02 16:53:07 -06:00
Brad Decker
616b71271a
add chainId to all new transaction metadata (#10528) 2021-03-01 09:15:42 -06:00
Brad Decker
caa32d87fb
key tokens by chainId (#10510) 2021-02-26 09:40:25 -06:00
Brad Decker
15d78b8158
use chain id for enabling ENS IPFS resolution (#10507) 2021-02-25 05:40:57 -06:00
Shane
e3084b87cc
fix: manually connect accountsChanged (#10477)
fixes #9933
2021-02-19 09:48:49 -08:00
Brad Decker
4c5edea294
fix contract exchange rate race condition (#10414) 2021-02-12 11:41:53 -06:00
Erik Marks
e48053a6d5
Add custom network RPC method (#9724)
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
Co-authored-by: Brad Decker <git@braddecker.dev>
2021-02-12 09:25:58 -06:00
Brad Decker
19fa2f5962
cancel unapproved confirmations on network change (#10357) 2021-02-08 17:22:30 -06:00
Thomas Huang
418662c365
Move ganache server from test setup to individual test file. (#9703) 2021-02-04 10:50:58 -08:00
Erik Marks
76a2a9bb8b
@metamask/eslint config@5.0.0 (#10358)
* @metamask/eslint-config@5.0.0
* Update eslintrc and prettierrc
* yarn lint:fix
2021-02-04 10:15:23 -08:00
kumavis
b98cef16af
Update to Node v14 (#9514)
* manual rebase against develop

* Update .nvmrc
2021-02-03 13:45:38 +08:00
Thomas Huang
99b6fee0ed
Stub out background and bg methods in actions test (#10321)
Move from using the backgound/metamask-controller instance to a stubbed/mocked out verison of the background methods.
2021-02-02 00:55:12 -08:00
Mark Stacey
f381f41cb2
Fix network dropdown button (#10312)
This fixes a bug where the network menu would remain present after a
second click on the network menu button. The bug was caused by the
click being handled _twice_, by two separate handlers. First it was
caught by the external click handler of the dropdown menu, which closed
the menu. Second, it was caught by the network button itself, which re-
opened the menu. This all happens quickly enough that to the user it
appears to stay open.

The external click handler of the menu now only fires if the menu is
open. Additionally, any click that is caught by the network menu is
stopped from propagating further, so that it can't trigger additional
click handlers.
2021-01-30 12:12:55 -03:30
Brad Decker
3806e0a2a6
Refactor NetworkDisplay, ConnectedStatusIndicator, etc to use ColorIndicator (#10214) 2021-01-27 10:51:59 -06:00
Alex Donesky
569672027c
Allow editing transaction amount after clicking max (#10278) 2021-01-27 13:13:28 -03:30
Thomas Huang
1dad4abfdc
Fix site metadata JSON-RPC handler (#10243)
* Fix getting the site metadata from the request origin params.

Regressed from inpage-provider ts migration the request. The property domainMetadata is now set as a params key for the request.

https://github.com/MetaMask/inpage-provider/blob/v7.0.0/src/siteMetadata.js#L19-L25
vs
https://github.com/MetaMask/inpage-provider/blob/main/src/siteMetadata.ts#L19-L27

* Change hardcoded mocked response of the request to the prod response.
2021-01-22 10:27:07 -08:00
Erik Marks
30ff153103
eth-rpc-errors@4.0.2 (#10226) 2021-01-20 22:06:41 -08:00
Erik Marks
4fef2b7443
Add MAX_SAFE_CHAIN_ID and refactor chain ID validation (#10224)
* Add MAX_SAFE_CHAIN_ID constant
* Add isSafeChainId to shared utils module
* Move isPrefixedFormattedHexString to shared utils module
* Validate custom RPC chain IDs in network controller
* Update some network controller error messages.
* Add isSafeChainId validation to UI
2021-01-20 15:37:18 -08:00
Erik Marks
7077ee68dc
Add NETWORK_TYPE_RPC constant (#10203)
* Refactor network display props
* Add NETWORK_TYPE_RPC constant
* Consolidate network constants
2021-01-20 08:49:05 -08:00
Erik Marks
90289ec22a
Further improve organization of constants (#10200) 2021-01-20 08:13:14 -08:00
Erik Marks
7159dd6867
Fetch with a timeout everywhere (#10101)
* Use fetchWithTimeout everywhere
* Memoize getFetchWithTimeout
* Require specified timeout
2021-01-19 08:41:57 -08:00
Dan J Miller
2431a5821c
Migration 51: ensure chainId is set in state for default/infura providers (#10170)
* Migration 51: ensure chainId is set in network controller provider state for all infura/default networks

* Clean up

* Migrate incorrect as well as falsy chainIds

Co-authored-by: Erik Marks <rekmarks@protonmail.com>
2021-01-11 11:09:15 -03:30
Mark Stacey
69e883c728
Detect tokens on custom Mainnet RPC endpoints (#10157)
Our automatic token detection was hard-coded to only work on our built-
in Infura Mainnet endpoint. It now works with custom Mainnet RPC
endpoints as well.

Relates to #6992
2021-01-08 10:55:46 -03:30
Erik Marks
4b766fa538
Tighten up loading indication logic (#10103)
Ensures that `hideLoadingIndication` is always called in all actions that call `showLoadingIndication`. It's unclear how many of these actions were failing to hide the loading indication, because other actions superset `hideLoadingIndication`. 

At the very least, `updateTransaction` was probably failing to hide the loading indication in the error case.

This PR also refactors a lot of actions to call `hideLoadingIndication` once in `finally` blocks as opposed to multiple times across `try` and `catch` blocks. We avoided making changes to functions using `Promise` methods, because `Promise.finally` is not supported by Waterfox, and it's not properly transpiled by Babel.
2020-12-17 21:34:43 -08:00
Mark Stacey
bba2b9646d
Update @metamask/controllers to v5.1.0 (#10096)
This update comes with a breaking change to the Approval controller. It
now requires a `defaultApprovalType` parameter.

I don't think we have any use for a default approval type, but I've
added a "NO_TYPE" one for now because it's a strict requirement. We
should consider making this parameter optional in the future, for cases
like this where it's not needed.

This update will hopefully address some caching issues we've been
seeing with our phishing configuration. See here for more details:
https://github.com/MetaMask/controllers/pull/297
2020-12-17 12:06:29 -03:30
Erik Marks
e05be40d92
@metamask/obs-store@5.0.0 (#10092) 2020-12-16 13:14:49 -08:00