1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00
Commit Graph

9493 Commits

Author SHA1 Message Date
Erik Marks
478d6563f2
Freeze Promise global on boot (#7309)
* freeze background and UI Promise globals on boot

* add new tests

* remove tape
2019-10-24 06:54:32 -07:00
Sirius Tsou
5f4cce13f0 correct the zh-TW translation (#7306) 2019-10-24 08:49:48 -03:00
Thomas Huang
41ec11da0b
Merge pull request #7310 from MetaMask/signedTypedData-test-adjustment
Stub signTypedMessage
2019-10-23 13:12:17 -07:00
Thomas
5f53e4b67e Remove async 2019-10-23 12:43:22 -07:00
Thomas
94a4b4d7db Stub signTypedMessage 2019-10-23 12:09:27 -07:00
Mark Stacey
adb50d1357
Fix flaky e2e tests (#7307)
* Add a delay after connecting

This addresses an intermittent test failure where the MetaMask
Notification window cannot be found. It appears to be caused by the
Send button being clicked too soon after connecting to a dapp, before
the background has had a chance to process the approval. The premature
send is ignored and the window never appears.

This delay (2 seconds) should be sufficient time for the connection to
be processed. A later 5-second delay was also reduced to 2 seconds.

* Select onboarding buttons by button text

The onboarding buttons were being selected using the classname, which
was common to all onboarding buttons. This resulting in buttons being
selected just before a page transition, leading to an error about
the element reference being stale when a click was attempted.

The CSS class selectors have been replaced by text selectors, which
are more specific and shouldn't be at risk of resolving early. They're
also easier to read.

* Remove retypeSeedPhrase function

This function was used to re-type the seed phrase in the event that a
failure occurred when confirming the seed phrase. I'm not sure what
failure this was meant to address exactly, but this contingency hasn't
been needed for some time. We can tell that it hasn't been used because
it wasn't updated for the incremental account security changes, so it
couldn't have worked since then (it would have clicked the wrong
button).
2019-10-23 14:00:16 -03:00
Dan Finlay
5c8048fcc1
Merge pull request #7304 from MetaMask/routeTypedSignaturesToKeyrings
Move signTypedData signing out to keyrings
2019-10-23 09:43:57 -07:00
Mark Stacey
ba25d52670
Use AdvancedGasInputs in AdvancedTabContent (#7186)
* Use `AdvancedGasInputs` in `AdvancedTabContent`

The `AdvancedGasInputs` component was originally extracted from the
`AdvancedTabContent` component, duplicating much of the rendering
logic. They have since evolved separately, with bugs being fixed in one
place but not the other.

The inputs and outputs expected weren't exactly the same, as the
`AdvancedGasInputs` component converts the input custom gas price and
limit, and it converts them both in the setter methods as well.
The `GasModalPageContainer` had to be adjusted to avoid converting
these values multiple times.

Both components dealt with input debouncing separately, both in less
than ideal ways. `AdvancedTabContent` didn't debounce either field, but
it did debounce the check for whether the gas limit field was below the
minimum value. So if a less-than-minimum value was set, it would be
propogated upwards and could be saved if the user clicked 'Save'
quickly enough. After a second delay it would snap back to the minimum
value. The `AdvancedGasInputs` component debounced both fields, but
it would replace any gas limit below the minimum with the minimum
value. This led to a problem where a brief pause during typing would
reset the field to 21000.

The `AdvancedGasInputs` approach was chosen, except that it was
updated to no longer change the gas limit if it was below the minimum.
Instead it displays an error. Parent components were checked to ensure
they would detect the error case of the gas limit being set too low,
and prevent the form submission in those cases. Of the three parents,
one had already dealt with it correctly, one needed to convert the
gas limit from hex first, and another needed the gas limit check added.

Closes #6872

* Cleanup send components

Empty README files have been removed, and a mistake in the index file
for the send page has been corrected. The Gas Slider component class
name was updated as well; it looks like it was originally created from
`AdvancedTabContent`, so it still had that class name.
2019-10-23 09:23:15 -03:00
Thomas Huang
3acd1db0be
Merge pull request #7222 from MetaMask/background-controller-tests
Background / Controller tests.
2019-10-22 18:12:48 -07:00
Thomas Huang
aecc859981
Merge pull request #7303 from MetaMask/master
Sync develop with master
2019-10-22 17:51:55 -07:00
Thomas
4d6ce8ceeb Use async/await 2019-10-22 17:23:18 -07:00
Dan Finlay
25076da9cb
Remove unused dependency 2019-10-23 08:59:20 +09:00
Dan Finlay
3eee9a2458
Linted 2019-10-23 08:47:15 +09:00
Dan Finlay
d26a8e7f82 Allow non strigified typed data params 2019-10-22 14:53:25 -07:00
Dan Finlay
a8aca0a326 Merge remote-tracking branch 'upstream/develop' into routeTypedSignaturesToKeyrings 2019-10-22 14:51:21 -07:00
Mark Stacey
27d67558fc
Update superagent-proxy to address security advisory (#7301)
Security advisory: https://www.npmjs.com/advisories/1184

This advisory was already addressed in #7289 but subsequent releases
have made this simpler resolution possible.
2019-10-22 16:29:21 -03:00
Dan Finlay
4b4bee77c7 Move signTypedData signing out to keyrings
This simplifies the logic of signing and improves security:
- Private keys are never moved to the base controller.
- Hardware wallets are abstracted in the same way as local keys.

This also paves the way for allowing even more modular accounts,
provided by plugins:
https://github.com/MetaMask/metamask-plugin-beta/pull/63

Fixes #7075.
2019-10-22 11:37:04 -07:00
Dan Finlay
06dc3b260a
Merge pull request #7299 from MetaMask/Version-v7.3.1
Version v7.3.1 RC
2019-10-22 10:08:46 -07:00
Dan J Miller
55bc9936c6 Turn off full screen vs popup a/b test (#7298) 2019-10-21 20:59:02 -03:00
MetaMask Bot
6bdf6e07db Version v7.3.1 2019-10-21 23:10:57 +00:00
Dan Miller
225b6a98e0 Update changelog for v7.3.1 2019-10-21 20:40:03 -02:30
Dan Miller
51cc2faf56 Turn off full screen vs popup a/b test 2019-10-21 20:38:55 -02:30
tmashuang
2a81083f14 MM controller additions, balance controller, typedMessageManager, and addtional actions tests 2019-10-21 12:47:36 -07:00
Dan Finlay
4f9ea17185
Merge pull request #7295 from MetaMask/master
Sync develop with master
2019-10-22 03:08:55 +09:00
Dan Finlay
32f20587ac
Merge pull request #7223 from MetaMask/Version-v7.3.0
Version v7.3.0 RC
2019-10-22 01:57:53 +09:00
Dan J Miller
994a8a3167
Add metrics events for clicking and saving tx speed ups (#7275) 2019-10-21 14:23:26 -02:30
Mark Stacey
ebc876454e Update v7.3.0 changelog 2019-10-21 09:22:32 -03:00
MetaMask Bot
a5035d49fc Version v7.3.0 2019-10-21 09:21:27 -03:00
Mark Stacey
4d4126d470 Update https-proxy-agent as per security advisory (#7289)
Security advisory: https://www.npmjs.com/advisories/1184

The package `pac-proxy-agent` (which we use via `pubnub`) hasn't
released an update yet, so we're forced to use a resolution for the
time being. The updated version appears to be compatible.
2019-10-21 09:21:27 -03:00
Mark Stacey
4ad42d8374
Update https-proxy-agent as per security advisory (#7289)
Security advisory: https://www.npmjs.com/advisories/1184

The package `pac-proxy-agent` (which we use via `pubnub`) hasn't
released an update yet, so we're forced to use a resolution for the
time being. The updated version appears to be compatible.
2019-10-21 09:16:21 -03:00
Whymarrh Whitby
06536b1d0f
Fix phishing detect script (#7287) 2019-10-18 13:35:32 -02:30
Thomas Huang
a646bfb506 Lessen the length of ENS validation to 3 (#7285) 2019-10-17 13:03:14 -03:00
Thomas Huang
9d9f3685bb Prevent Logout Timer that's longer than a week. (#7253) 2019-10-17 12:25:37 -03:00
Whymarrh Whitby
3d1f214cb0
Remove trailing commas from JSON files (#7284) 2019-10-16 22:01:19 -02:30
Dan J Miller
f1c774d8f3 Handle empty fetch response (#7111) 2019-10-09 11:41:18 -03:00
Mark O'Sullivan
ee913edf9f fix issue of xyz ens not resolving (#7266) 2019-10-09 09:30:48 -03:00
Mark Stacey
4a7292ad54
Merge pull request #7269 from MetaMask/master-parity
Master => develop
2019-10-08 21:15:37 -03:00
Mark Stacey
08a7308b04 Merge branch 'master' into develop
* master: (34 commits)
  Update changelog for v7.2.3
  Fix e2e tests and gas default (#7267)
  Do not transate on seed phrases
  test:integration - fix renamed test data file
  lint fix
  test:e2e - fix bail condition
  test:e2e - fix responsie argument
  test:e2e - refactor missed spec file
  test:e2e - only overwrite window.fetch once per session
  test:e2e - rework fetch-mocks
  test:e2e - add extra delay before closing popups
  test:e2e - factor out prepareExtensionForTesting
  test - e2e - dedupe fetchMocking + compose script as fn
  Ensure correct tx category when sending to contracts without tx data (#7252)
  Version v7.2.3
  Add v7.2.2 to changelog
  Update minimum Firefox verison to 56.0 (#7213)
  Version v7.2.2
  Update changelog for v7.2.1, v7.2.0, and v7.1.1
  Add `appName` message to each locale
  ...
2019-10-08 20:26:21 -03:00
Dan Finlay
bafcbc90af
Merge pull request #7251 from MetaMask/Version-v7.2.3
Version v7.2.3 RC
2019-10-09 07:43:45 +09:00
Dan Miller
a8bd527d72 Update changelog for v7.2.3 2019-10-08 14:17:51 -03:00
Dan J Miller
4ed452e6ed Fix e2e tests and gas default (#7267)
* Add extra delay after second send3eth.click() in the 'adds multiple transactions' test

* Remove use of ARBITRARY_HIGH_BLOCK_GAS_LIMIT as fallback
2019-10-08 14:16:23 -03:00
Thomas
e7bf250eab Do not transate on seed phrases 2019-10-08 14:16:23 -03:00
kumavis
4a7c7dcda6 test:integration - fix renamed test data file 2019-10-08 14:16:23 -03:00
kumavis
e6b4f88d17 lint fix 2019-10-08 14:16:23 -03:00
kumavis
e283ff181e test:e2e - fix bail condition 2019-10-08 14:16:23 -03:00
kumavis
cd62cc1901 test:e2e - fix responsie argument 2019-10-08 14:16:23 -03:00
kumavis
7e3f1263f2 test:e2e - refactor missed spec file 2019-10-08 14:16:23 -03:00
kumavis
133ba76785 test:e2e - only overwrite window.fetch once per session 2019-10-08 14:16:23 -03:00
kumavis
11e1c3b95d test:e2e - rework fetch-mocks 2019-10-08 14:16:23 -03:00
kumavis
56dae017a9 test:e2e - add extra delay before closing popups 2019-10-08 14:16:23 -03:00