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

10019 Commits

Author SHA1 Message Date
Erik Marks
f5f6f7b2d5
Require migration tests from 33 on (#8121) 2020-02-26 20:49:59 -08:00
Whymarrh Whitby
cf85f56989
Use sinon@9.0.0 (#8123) 2020-02-27 00:33:50 -03:30
Whymarrh Whitby
f5317e5ab6
Use json-rpc-engine@5.1.8 (#8124) 2020-02-27 00:33:33 -03:30
Mark Stacey
53d25d01a6
Add stories for Identicon component (#8113)
One main configurable story has been added, plus a few distinct other
examples. All props are covered except `className`, which seems safe to
ignore.

Default props have been added to `Identicon` to make more explicit what
defaults were expected; there is no functional change.
2020-02-26 22:08:58 -04:00
Mark Stacey
b6487f08b7
Allow changing Storybook preview backgrounds (#8111)
The `@storybook/addon-backgrounds' addon has been added, which allows
changing the component preview background. By default no background
colors are defined, though there is a helpful grid button. A "light"
and "dark" background option has been added globally. Additional
story-specific backgrounds or global backgrounds can be added later if
necessary.
2020-02-26 13:40:53 -04:00
Mark Stacey
2d74fbc75c
Fix superagent peer dependency warning (#8116)
This warning was resolved by updating `pubnub`, which is the dependency
that uses `superagent-proxy` which is causing this warning. The
resolution we added to address a security advisory is also no longer
required.
2020-02-26 13:40:29 -04:00
Erik Marks
5d1f3c1436
Delete shapeshift functionality; retain state and display (#8118)
* delete shapeshift functionality; retain state and display
2020-02-26 09:34:46 -08:00
Mark Stacey
cf8875c57b
Update Storybook dependencies to v5.3.14 (#8115)
This was primarily done to make explicit that we're using v5.3.x. Our
manifest listed `^5.2.x` but we had already updated to `v5.3.9` in the
lockfile. v5.3.0 lays much of the groundwork for the planned v6.0
release, and includes many changes.

The changes between v5.3.9 and v5.3.14 include various bug fixes, none
of which affect us as far as I know.

Peer dependencies required by Storybook have also been added. These
were already in our dependencies indirectly either way.
2020-02-26 10:40:34 -04:00
Mark Stacey
7a9f53c99d
Use Component Story Format for stories (#8108)
The recommended way of writing stories changed in Storybook v5.2 to
the Component Story Format (CSF). Instead of using `storiesOf` and
running everything upon module import, the new story format is a
declarative description of each component that uses ES6 import
semantics.
2020-02-26 10:13:56 -04:00
Mark Stacey
cb995d66da
Re-render jazzicon component when diameter changes (#8114)
Previously when the `diameter` prop of the `jazzicon` component was
changed, the new diameter would be ignored. The jazzicon is now
redrawn upon each change, as you would expect.

I don't think it's possible for this bug to manifest itself in the
extension. This was discovered through tinkering with the Storybook
for this component.
2020-02-26 09:42:33 -04:00
Mark Stacey
2be8bf0b0b
Rename Storybook modules (#8112)
The names for Storybook modules have changed in v5.3.0. `config.js` was
renamed to `preview.js`, and addon registration has been moved to
`main.js`.

See here for details: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#from-version-52x-to-53x
2020-02-26 09:34:59 -04:00
Mark Stacey
0a0040842c
Fix display of identicon on Connect page (#8107)
The identicon was showing as a white circle on the connect page. This
was a CSS error introduced when `jazzicon` was updated in #7898.

The white circle shown was the white border around the identicon. This
circle is an adjacent `div` in the DOM, and was rendered _underneath_
the identicon itself because it was placed first in the DOM.
Unfortunately the new version of `jazzicon` is no longer explicitly
positioned (it used to have `position: relative` set internally), so
now it's lower in the stack order regardless of DOM position.

Rather than placing the border adjacent and relying upon both elements
being positioned, the border has been changed into a wrapping `div`
instead. Now the stack order is more explicit.
2020-02-26 09:34:39 -04:00
Mark Stacey
35941f34dd
Move default white background from body to root element (#8110)
In our base stylesheets we set the `body` background color to white.
This unfortunately also affected the preview area of Storybook. The
Storybook preview only renders isolated components, but it does
include all styles.

To avoid this problem, the white background color has been moved to
the `#app-content` div instead. All of our UI is inside this div.
2020-02-26 09:33:58 -04:00
Erik Marks
83da3db37b
Remove selected address history (#8104)
* remove selected address history, account switching; fix perm selectors, bugs

Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
2020-02-25 14:39:38 -08:00
Whymarrh Whitby
8d0a757ab5
Use end-of-stream@1.4.4 (#8098) 2020-02-25 09:12:09 -03:30
Whymarrh Whitby
5eb95625ca
Remove react-tooltip-component (#8099) 2020-02-25 09:11:56 -03:30
Whymarrh Whitby
169ab8adc9
Remove recompose (#8097) 2020-02-24 19:28:26 -03:30
ricky
54f0830324
Use destructuring assignment (#8093)
* Use destructuring assignment

* remove `state` const

* Use defaultProps
2020-02-24 14:38:41 -05:00
Whymarrh Whitby
fcd404015b
Use gulp-replace@1.0.0 (#8095) 2020-02-24 15:58:49 -03:30
Whymarrh Whitby
81d8237654
Use eslint-plugin-react@7.18.3 (#8085) 2020-02-24 15:24:35 -03:30
Whymarrh Whitby
ec1227fded
Use lockfile-lint@4.0.0 (#8088) 2020-02-24 14:41:28 -03:30
Whymarrh Whitby
e8dc8abd5c
Use concurrently@5.1.0 (#8087) 2020-02-24 14:40:57 -03:30
Whymarrh Whitby
6c9b7fc8c7
Use gulp-babel@8.0.0 (#8086) 2020-02-24 14:40:38 -03:30
Whymarrh Whitby
ef8ea9b188
Remove eslint-plugin-chai (#8089) 2020-02-24 14:39:55 -03:30
Dan J Miller
1d2c57a2f3
Assign tabId to middleware request, if provided (#7695)
The `tabId` of the message sender is now added to the middleware
request object. This step is omitted if the `tabId` is not provided.
This is done early in the middleware stack, so the `tabId` should be
available for any subsequent middleware to use.

The Onboarding Middleware has also been modified to get the `tabId`
from the request object, rather than expecting it as a parameter upon
creation.

This refactor will enable further uses of the `tabId`.
2020-02-20 18:39:00 -04:00
Mark Stacey
ef98e876a7
Remove unused container prop (#8076)
The `activeTab` prop being passed in from the container was never used.
2020-02-20 11:52:10 -04:00
Konstantin
6f47fece56
Implementation encrypt/decrypt feature (#7831)
Implement `eth_decrypt` and `eth_getEncryptionPublicKey`. This allows decryption backed by the user's private key. The message decryption uses a confirmation flow similar to the messaging signing flow, where the message to be decrypted is also able to be decrypted inline for the user to read directly before confirming.
2020-02-19 14:24:16 -04:00
Whymarrh Whitby
cab2f1b769
Use react-redux@7.2.0 (#8069) 2020-02-18 14:54:24 -03:30
Whymarrh Whitby
8f26f5a021
Remove redux-test-utils dependency (#8070)
* Remove usages of redux-test-utils
* Remove redux-test-utils dependency
2020-02-18 14:54:03 -03:30
ricky
1f9e3b89d4
Add optional chaining (#8052)
* Add plugin-proposal-optional-chaining

* Use optional chaining to provide error fallback
2020-02-18 10:11:52 -05:00
Whymarrh Whitby
9c45ae0552
Use http-server@0.12.1 (#8066) 2020-02-18 08:58:06 -03:30
Whymarrh Whitby
b5cdbcb581
Update redux-related dependencies (#8068) 2020-02-18 08:56:54 -03:30
Jenny Pollack
fd170ef8c0
Merge pull request #8062 from whymarrh/no-mixed-operators
Enable core ESLint no-mixed-operators rule
2020-02-17 21:08:06 -07:00
Whymarrh Whitby
8a04642cd3
Update dependencies to resolve security advisories (#8064) 2020-02-17 22:16:17 -04:00
Mark Stacey
a71f56e5da
Remove unused sinon sandboxes (#8063)
These sandboxes were created, then not utilized at all.
2020-02-17 21:31:09 -04:00
Mark Stacey
c6db54cc6d
Attempt ENS resolution on any valid domain name (#8059)
ENS currently supports a variety of tlds in addition to `.eth`, and
more will be supported in the future. Rather than hard-code a list of
supported ENS tlds, all valid domain names will now be interpreted as
potential ENS addresses in our address input component.

Closes #7978
2020-02-17 21:20:01 -04:00
Whymarrh Whitby
126457dee6
Update transactions CODEOWNERS (#8058) 2020-02-17 21:38:31 -03:30
Whymarrh Whitby
da0300d3b1 Enable core ESLint no-mixed-operators rule 2020-02-17 21:06:36 -03:30
Mark Stacey
f26f52560d
Update packages to address security advisory (#8061)
Update packages to address the following security advisories:
* https://www.npmjs.com/advisories/1474
* https://www.npmjs.com/advisories/1475
* https://www.npmjs.com/advisories/1476
* https://www.npmjs.com/advisories/1480
* https://www.npmjs.com/advisories/1482
2020-02-17 20:33:01 -04:00
Jenny Pollack
befd580ab2
add parens to arrow function parameters (#8060) 2020-02-17 19:12:48 -04:00
Jenny Pollack
c1453c7528
Merge pull request #8056 from whymarrh/arrow-parens
Enable arrow-parens ESLint rule
2020-02-17 15:26:43 -07:00
Whymarrh Whitby
a78cf0ef3a Enable arrow-parens ESLint rule 2020-02-15 17:04:21 -03:30
Mark Stacey
62c5ea4f80
Update Wyre ETH purchase url (#8051)
* Revert "Revert "Update Wyre ETH purchase url" (#7631)"

This reverts commit bc67d1eeca.

* Restrict widget to just debit card payments

Apple Pay apparently only works on Safari.
2020-02-14 14:07:24 -08:00
Dan Finlay
eb57763056
Add warning to watchAsset API when editing a known token (#8049)
* Add warning when editing a known token with watchAsset API

* Add warning when watchAsset attempts to reuse token symbol

* Linted
2020-02-14 12:32:56 -08:00
Dan Finlay
cfcccd266a
Inline the source text not the binary encoding for inpage script (#8053) 2020-02-14 15:27:12 -04:00
Vodopyanov Egor
b63b848ed4
add title to transaction action component (#8050) 2020-02-14 12:31:44 -04:00
Mark Stacey
dcc7d29511
Refactor QR scanner to move all error handling within component (#7885)
The QR scanner component error handling would sometimes redirect the
user to the wrong page. It was also confusingly handled in two places;
the action used to open the QR scanner, and the scanner component.
The error handling has now been corrected, simplified, and integrated
into the QR scanner component itself.

The old way of handling an error within the component was to close the
modal, then call the action to open it all over again. This action took
a route parameter, which instructed the action on which route to open
if the fullscreen UI needed to be opened (as the fullscreen UI is the
only one where the browser will show the camera permission prompt).

This redirection worked just fine for handling the initial opening
of the QR scanner modal. But for any subsequent errors the same action
was used with a _default route_, meaning the user could click "try
again" and find themselves on a completely different screen.

Instead, errors now trigger a state change instead of closing and re-
opening the modal. The permission checks in the action have been
integrated into the component as well.

One functional change is that the scenario where you have an invalid
QR code has been made an error. Previously this just showed the error
message below the video preview, but left the user with no way to try
again. There error page has a "Try again" button, so it seemed better
suited as an error. Also the message literally started with "Error:".

Another functional change is that _all_ errors during initialization
will result in the error UI being shown. Previously there was one error
case that would instead log to the console and leave the user stuck.
2020-02-13 16:07:50 -04:00
Dan Finlay
9c8fd38db4
Merge pull request #8048 from MetaMask/null-check
Fix faulty null checks
2020-02-12 12:03:28 -08:00
Erik Marks
9376c47dd1
update packages 2020-02-12 10:39:47 -08:00
Whymarrh Whitby
85430746ad
Update mocha version (#8028)
* Use mocha@7.0.1
* Remove bad async test
2020-02-12 14:47:36 -03:30