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

9175 Commits

Author SHA1 Message Date
Whymarrh Whitby
f0218bdbbb
Rename accountManager usages (#6790)
Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
2019-07-10 16:31:48 -02:30
Whymarrh Whitby
564818d236
Delete unused ui/example.js file (#6831) 2019-07-10 16:01:27 -02:30
filmendless
45534d9908 [ImgBot] Optimize images (#1) (#6829)
*Total -- 5,450.78kb -> 4,473.66kb (17.93%)

/images/404.png -- 38.48kb -> 11.19kb (70.91%)
/images/deadface.png -- 8.14kb -> 4.50kb (44.67%)
/images/cancel.png -- 10.67kb -> 6.04kb (43.38%)
/app/images/key-32.png -- 1.08kb -> 0.68kb (37.66%)
/app/images/coinswitch_logo.png -- 3.06kb -> 1.94kb (36.43%)
/images/info-logo.png -- 31.80kb -> 20.43kb (35.77%)
/docs/transaction-flow.png -- 137.82kb -> 91.38kb (33.7%)
/ui/design/metamask-logo-eyes.png -- 142.65kb -> 94.94kb (33.45%)
/images/coinbase logo.png -- 9.55kb -> 6.43kb (32.64%)
/ui/design/chromeStorePics/screen_dao_accounts.png -- 505.47kb -> 347.03kb (31.34%)
/docs/architecture.png -- 136.94kb -> 94.15kb (31.25%)
/ui/design/chromeStorePics/screen_dao_locked.png -- 280.38kb -> 199.54kb (28.83%)
/app/images/logo.png -- 6.43kb -> 4.58kb (28.81%)
/ui/design/chromeStorePics/screen_wei_account.png -- 638.31kb -> 469.17kb (26.5%)
/images/pw-128x128.png -- 92.76kb -> 69.18kb (25.42%)
/app/images/pw128x128.png -- 92.76kb -> 69.18kb (25.42%)
/app/images/shapeshift logo.png -- 17.13kb -> 13.54kb (20.92%)
/ui/design/02b-metamask-AccDetails-Send.jpg -- 107.56kb -> 92.00kb (14.46%)
/images/icon-128.png -- 5.63kb -> 4.82kb (14.45%)
/ui/design/chromeStorePics/icon-128.png -- 5.63kb -> 4.82kb (14.45%)
/ui/design/02a-metamask-AccDetails.jpg -- 114.81kb -> 99.73kb (13.14%)
/ui/design/02a-metamask-AccDetails-OverTransaction.jpg -- 119.21kb -> 103.65kb (13.06%)
/ui/design/02a-metamask-AccDetails-OverToken.jpg -- 118.99kb -> 103.62kb (12.92%)
/ui/design/wireframes/metamask_wfs_jan_13.png -- 409.24kb -> 357.28kb (12.7%)
/ui/design/chromeStorePics/screen_dao_notification.png -- 289.55kb -> 254.49kb (12.11%)
/ui/design/05-metamask-Menu.jpg -- 127.21kb -> 111.93kb (12.01%)
/app/images/ethereum-metamask-chrome.png -- 58.62kb -> 51.86kb (11.52%)
/ui/design/chromeStorePics/final_screen_dao_accounts.png -- 243.86kb -> 217.46kb (10.82%)
/ui/design/chromeStorePics/promo1400560.png -- 255.51kb -> 228.52kb (10.56%)
/images/icon-512.png -- 41.09kb -> 36.95kb (10.08%)
/ui/design/chromeStorePics/promo920680.png -- 201.87kb -> 181.88kb (9.9%)
/ui/design/chromeStorePics/final_screen_wei_account.png -- 247.44kb -> 223.83kb (9.54%)
/ui/design/chromeStorePics/final_screen_dao_locked.png -- 215.13kb -> 196.06kb (8.87%)
/ui/design/chromeStorePics/final_screen_dao_notification.png -- 209.38kb -> 192.76kb (7.94%)
/ui/design/00-metamask-SignIn.jpg -- 56.49kb -> 53.22kb (5.79%)
/ui/design/03-metamask-Qr.jpg -- 64.50kb -> 60.89kb (5.6%)
/ui/design/01-metamask-SelectAcc.jpg -- 74.28kb -> 70.34kb (5.3%)
/ui/design/02-metamask-AccDetails.jpg -- 74.00kb -> 70.15kb (5.21%)
/ui/design/chromeStorePics/promo440280.png -- 56.12kb -> 53.92kb (3.93%)
/app/images/icon-64.png -- 3.49kb -> 3.40kb (2.66%)
/ui/design/chromeStorePics/icon-64.png -- 3.49kb -> 3.40kb (2.66%)
/images/pw-48x48.png -- 3.20kb -> 3.16kb (1.34%)
/ui/design/chromeStorePics/final_screen_wei_notification.png -- 189.32kb -> 187.93kb (0.73%)
/images/icon-32.png -- 1.69kb -> 1.68kb (0.46%)
2019-07-10 11:37:20 -03:00
Brian Soule
fabba27b78 Capitalized speed up label to match rest of UI (#6828) 2019-07-10 09:26:20 -03:00
ryanml
daccb06a60 Create MetaFoxLogo component (#6819) 2019-07-09 14:47:58 -02:30
Whymarrh Whitby
caa40912ac
Replace deprecated shell-parallel with concurrently (#6807)
* Replace shell-parallel with concurrently

* Update ganache-cli
2019-07-09 14:09:31 -02:30
Whymarrh Whitby
b7f3f26ebf
Remove job-screens CI job (#6823)
* Remove job-screens CI job
* Remove unused dependencies, now that job-screens is gone
2019-07-08 17:02:15 -02:30
Dan J Miller
32a3f5ad7b
Address various UI styling issues (#6744)
* Add loading spinner to pending tx status label.

* Add border around account icon in top right

* Change style of settings toggle buttons; wrap with local components

* Eliminate large space after settings labels when no description

* Remove network form from advanced tab of settings

* Keep new account container height to contents when in full screen
2019-07-08 15:28:35 -02:30
Mark Stacey
6df65069a2
Replace react-addons-css-transition-group (#6816)
This package is deprecated, and is incompatible with React v16. It has
been replaced by `react-test-renderer`, which has a drop-in replacement
for `react-addons-css-transition-group`.

Strangely, `react-test-renderer` was already listed as a dependency
despite not being used. I had to downgrade it, as the version already
listed was for React v16, and we're still using React v15.
2019-07-08 10:12:00 -03:00
Mark Stacey
7b2997dbc5
Remove husky from lockfile (#6815)
This must have been removed as a dependency at some point, but left in
the lockfile. I noticed it would install itself whenever I reinstalled
all packages.
2019-07-05 18:57:47 -03:00
Mark Stacey
47544110a2
Remove unused babel-polyfill dependency (#6814)
The lockfile hasn't changed because this package is a dependency of
`fetch-mock`.
2019-07-05 18:57:19 -03:00
Mark Stacey
7f7517b9e6
Remove unused Babel transformations (#6811)
The `stage-0` Babel preset has been replaced with the specific Babel
plugins that we depend upon. We don't use most of `stage-0`, so this
allowed us to remove many unnecessary transformations. We had to remove
this preset soon anyway, because all of the stage presets are
deprecated in Babel 7.

The `stage-0` preset consisted of these plugins:
```
"transform-do-expressions"
"transform-function-bind"
"transform-class-constructor-call"
"transform-export-extensions"
"transform-class-properties"
"transform-decorators"
"syntax-dynamic-import"
"syntax-trailing-function-commas"
"transform-async-generator-functions"
"transform-async-to-generator"
"transform-exponentiation-operator"
"transform-object-rest-spread"
```

Of that list, only 'transform-class-properties', 'transform-object-
rest-spread', and 'transform-async-to-generator' were being used.
2019-07-05 16:08:11 -03:00
Mark Stacey
7a5d0f7e7f
Remove unused gulp-uglify dependency (#6810)
The switch was made to `gulp-uglify-es` some time ago, but `gulp-uglify`
was never removed.
2019-07-05 15:30:08 -03:00
Mark Stacey
95f198550e
Declare variables before use (#6806)
While working on #6805, I noticed that many variables were being used
before they were declared. Technically this worked fine in practice
because we were using the `transform-es2015-block-scoping` Babel plugin,
which transforms `let` and `const` to `var`, which is hoisted. However,
after removing that Babel transformation, many things broke.

All instances of variables or classes being used before declared have
been fixed.

The `no-use-before-define` eslint rule has been added to catch these
cases going forward. The rule is disabled for function declarations for
the moment, because those are always hoisted. We could disable that too
if we want to, but it's purely stylistic and would require a lot more
changes.
2019-07-05 14:01:34 -03:00
Mark O'Sullivan
0311f2d28c Added visual documentation of the account menu component (#6775)
* Added visual documentation of the menu bar component

* updated CHANGELOG.md

* renamed to account menu which is the component highlighted in the screenshot

* updated contributions document
2019-07-05 10:24:30 -02:30
Mark Stacey
ec40b2a325
Check for invalid gas estimates from local storage (#6800)
* Remove unused state 'gas.basicPriceAndTimeEstimates'

* Check for invalid estimates from local storage

Gas estimates were being cached in local storage then later retrieved,
but the retrieved values were not being checked. If the data failed to
save, failed to load, or was cleared since being saved, it would result
in the gas estimates being set to undefined.

The estimates retrieved from local storage are now checked before they
are used. If they are falsy, the estimates are retrieved from the
network instead.

This should fix this Sentry issue:
[METAMASK-6W0T](https://sentry.io/share/issue/cfe470314a5741768b19050815322aa4/)

A few additional changes were made to the gas-duck tests to accommodate
the use of `sinon.restore`. `restore` is strongly recommended by the
`sinon` team, as neglecting to use it can result in memory leaks. It has
the additional benefit of ensuring you create fresh stubs/spies for each
test, which means they no longer need to be reset between tests.
2019-07-04 16:18:12 -03:00
Mark Stacey
c7608e6fe9
Remove disc (#6801)
The `disc` gulp command no longer works. I wasn't able to fix this
easily, so instead it has been removed. We can probably find something
better to replace it with.
2019-07-04 11:54:10 -03:00
Mark Stacey
cc7bb306e2
Increase CircleCI addons-linter memory (#6802)
`addons-linter` will occasionally run out of heap space. This provides 3
GB of heap for that script rather than the default ~1.5 GB. The CircleCI
containers have 4GB of memory, so this should leave plenty of extra
space for non-heap memory.
2019-07-04 11:53:02 -03:00
Whymarrh Whitby
df17853502
Remove UiMigrationAnnouncement and associated state (#6794) 2019-07-04 12:21:21 -02:30
Mark Stacey
714cf72fc3
Omit integration tests from default test script (#6803)
The integration tests are slow, and rather inconvenient to run in
development on a regular basis (they break if you move the mouse). They
have been removed from the `test` script, to make running `test`
frequently during development less painful.
2019-07-04 11:50:24 -03:00
Dan Finlay
797f0c6ced
Reduce time to show tx "speed up" buttons to 5 seconds. (#6797) 2019-07-03 22:10:17 -07:00
Mark Stacey
a44f38e640
Fix PropType warning (#6792) 2019-07-03 22:48:22 -03:00
Dan Finlay
91cda027c9 Add Mark Stacey (Kyokan) to UI CodeOwners (#6798) 2019-07-03 22:34:44 -02:30
Whymarrh Whitby
5737df249d
Move e2e tests out of beta dir (#6785) 2019-07-02 23:19:59 -02:30
Whymarrh Whitby
8b5ef5b45e
Update eth-contract-metadata to use published registry version (#6784) 2019-07-02 22:48:23 -02:30
Mark Stacey
865321d269
Update asmcrypto.js to latest version (#6767)
This silences a warning message that was printed to the console whenever
this module was loaded during tests.

The API changes between these two versions were reviewed carefully for
differences. The only difference made was to `PBKDF2_HMAC_SHA256.bytes`,
which was replaced by `Pbkdf2HmacSha256`.

The length argument no longer has a default value, so it has been set
to match what the default value was in the previous version we used,
which is 32 (the SHA256 hash size).
2019-07-02 22:16:20 -03:00
Akshit Kr Nagpal
687984a938 Added Confirmation Modal for Delete Network (#6776) 2019-07-02 09:43:02 -02:30
Mark Stacey
9fd8a3d46e
Move Browserify transforms to gulpfile (#6768)
The flat tests also rely upon these transformations, yet invoke
browserify from the command line rather than using the gulpfile. The
transformations have been specified on the command line for those
instead.

Of course it's not ideal to have the same transformations listed in two
different places, but the plan is to delete the flat tests soon anyway,
so this should suffice until then.

Closes #4538
2019-07-01 21:26:24 -03:00
Dan Finlay
448720327b
Merge pull request #6765 from MetaMask/master
Using admin privilege to bypass code owner review because it has already [been reviewed](https://github.com/MetaMask/metamask-extension/pull/6763) and those code owners are out today.
2019-07-01 10:58:25 -07:00
Dan Finlay
743afd4e9d Fix whitespace 2019-07-01 10:32:51 -07:00
Dan Finlay
c623a8be76 Re-enable sourcemaps publishing 2019-07-01 10:30:08 -07:00
Dan Finlay
a6efa7ae8d
Merge pull request #6778 from MetaMask/DisableReleaseScript
Disable release script from CircleCI
2019-07-01 10:12:50 -07:00
Dan Finlay
07f55bc390 Disable release script from CircleCI
The MetaMask bot is currently failing to publish docs updates, and it is
[blocking our ability to release new
versions](https://github.com/MetaMask/metamask-extension/pull/6765).

While we should pursue a proper fix, I think it's worth disabling in the
meanwhile so this glitch doesn't interfere with our regular release
cadence further.
2019-07-01 09:54:49 -07:00
Akshit Kr Nagpal
d16d6f483c Validate txParams in TransactionStateManager.addTx (#6713)
* Normalize and Validate txParams in TransactionStateManager.addTx too

* Added Tests

* Updated normalizeAndValidateParams to return the new txParams
2019-06-29 00:51:51 +02:00
Dan Finlay
27a572d15a
Merge pull request #6764 from MetaMask/Version-6.7.1
Version 6.7.1
2019-06-27 22:37:36 -07:00
Mark Stacey
56088d8370 Version 6.7.1 2019-06-28 02:08:18 -03:00
Dan Miller
789fc8b8ad Fixes display of confirm screen token decimals by not relying on confirmTransaction state. 2019-06-28 01:51:33 -03:00
Dan Miller
0e108db3cc Adds e2e tests that fail when token decimals are displaying incorrectly. 2019-06-28 01:51:33 -03:00
Dan Finlay
90eb5c4440
Merge pull request #6759 from Gudahtt/node-v10
Update to Node.js v10
2019-06-27 10:45:55 -07:00
Whymarrh Whitby
d566543bf5
Handle invalid strings during seed phrase import (#6743)
* Add tests for ImportWithSeedPhrase#parseSeedPhrase

* Handle importing whitespace-only seed phrases

Fixes #6694

This changeset fixes our parsing of seed phrases during import to handle the
case where a user tries to import a seed phrase that consists solely of whitespace.
We no longer produce an error and instead treat it as an incorrect seed phrase.

* Handle importing more invalid seed phrases
2019-06-27 14:44:41 -02:30
Mark Stacey
a6bfc6f441
Fix seed phrase import back button (#6758)
The back button on the import seed phrase page leaves the Redux store
with `appState.forgottenPassword` set to true, which prevents the user
from logging in. That flag is now unset when the user leaves the page.

Fixes #6740
2019-06-27 12:26:25 -03:00
Mark Stacey
6d191f2617
Refactor account-details-modal (#6751)
Refactor the AccountDetailsModal to follow newer conventions. Changes
include:
- Create a directory for the component with separate files for the
  component, the container, and the entrypoint.
- Use jsx rather than hyperscript

Fixes #6741
2019-06-27 12:03:18 -03:00
Mark Stacey
9ed64568f4 Update to Node.js v10
The only package that needed to be updated was `sha3`. It has been
updated to v1.2.3, which is a maintenance release that supports up to
Node.js v12.
2019-06-27 11:46:13 -03:00
Mark Stacey
b9f69b535f
Generate complete source maps (#6756)
The source maps generated previously were mapping the bundled files to
the post-Babel files - they weren't showing mapping to the source files
as written.

It looks like this was a result of `reactify` being used in addition to
babel - that transformation must have dropped the source maps.

`reactify` still needs to be listed as a dependency because it is
an unlisted requirement of the `boron` package, which we use. We don't
need to use it to create our bundles though, as Babel already performs
the transformations we need.
2019-06-27 11:28:29 -03:00
ryanml
59d3a3d312 Fixes #6760, correct PropTypes for nextRoute (#6761) 2019-06-27 10:41:16 -02:30
Dan Finlay
99209095d1
Merge pull request #6749 from MetaMask/v6.7.0
V6.7.0
2019-06-26 10:26:08 -07:00
Mark Stacey
3f8c9126fd
Use inline source maps in development (#6754)
There is currently a bug in chrome that prevents reading source maps
from a local file [0]. This was preventing Chrome DevTools from using
our JavaScript source maps, where were saved as `.map` files. To work
around this problem the source maps are now generated inline, which
seems to work fine.

The only other browser I tested this with was Firefox, which works both
before and after this change.

[0]: https://bugs.chromium.org/p/chromium/issues/detail?id=931675
2019-06-26 14:05:57 -03:00
Dan Finlay
76e7c3bd1f
Merge pull request #6589 from MetaMask/DocumentHotfixProtocol
Document hotfix protocol
2019-06-25 15:00:40 -07:00
Thomas
84c28896a6 Version 6.7.0 2019-06-25 12:43:38 -07:00
Thomas
a37a5acbe1 Add simulation failure to tx confirmation when transaction simulationFails 2019-06-25 12:42:35 -07:00