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

1555 Commits

Author SHA1 Message Date
Dan J Miller
e84138e2bc
Add resolution for engine.io, a nested dependency of 3box (#13589) 2022-02-10 13:54:36 -03:30
Thomas Huang
080e30377e Merge remote-tracking branch 'origin/develop' into master-sync 2022-02-09 09:43:22 -08:00
Brad Decker
d45cb6c12e
update test-dapp to 5.0.0 (#13503)
* update test-dapp to 5.0.0

* Update edit-gas-fee.spec.js

* Lint

* Update send-eth.spec.js

* Update signature-request.spec.js

* typo

Co-authored-by: PeterYinusa <peter.yinusa@consensys.net>
Co-authored-by: Alex Donesky <adonesky@gmail.com>
2022-02-09 13:57:05 +00:00
MetaMask Bot
a7eaf1bd7f Version v10.9.2 2022-02-08 01:59:41 +00:00
PeterYinusa
2b010710ae
update chromedriver to v97 (#13502) 2022-02-03 15:02:56 +00:00
ryanml
58777d9057 Merge remote-tracking branch 'origin/develop' into master-sync 2022-02-02 12:32:47 -07:00
Brad Decker
3dde05dbce add resolution for simple-get (#13471) 2022-02-01 20:30:58 -07:00
MetaMask Bot
7c9e17f598 Version v10.9.1 2022-02-02 03:16:53 +00:00
Brad Decker
5889d0ac45
add resolution for simple-get (#13471) 2022-01-31 08:46:25 -06:00
kumavis
3729e15c0c
lavamoat - @lavamoat/allow-scripts v2 (#13428) 2022-01-28 10:02:49 -10:00
ryanml
241ee2f1d9 Fix policies 2022-01-27 15:50:42 -07:00
ryanml
4901164e5c Merge remote-tracking branch 'origin/develop' into master-sync 2022-01-27 15:46:54 -07:00
Erik Marks
30852f76f3 Add resolution for follow-redirects (#13301)
Adds a resolution for `follow-redirects` to resolve https://github.com/advisories/GHSA-74fj-2j2h-c42q. The dependency graph is `analytics-node#axios#follow-redirects`, and neither parent package has published a fix for this vulnerability.
2022-01-26 10:26:02 -07:00
Brad Decker
ca5c4b7839 fix node-forge vulnerability (#13389) 2022-01-26 09:40:11 -07:00
Brad Decker
ec8a9384c9
fix node-forge vulnerability (#13389) 2022-01-25 12:49:58 -03:30
PeterYinusa
e2a8886a05
Upgrade ganache - continued (#13354)
* remove ganache-core

* use ganache v7

* convert to hex

* lint
2022-01-20 16:56:52 +00:00
dragana8
a67a5efca3
Incorrect Rounding Down of Balance #10167 (#13337) 2022-01-19 13:04:33 -06:00
Alex Donesky
f7849a0b7c
Add error that redirects users to Import NFT page when they attempt to add an NFT on the Import Token page (#13271)
* Add error that redirects users to Import NFT page when they attempt to add an NFT on the Import Token page
2022-01-19 08:38:33 -06:00
Jyoti Puri
9a3c917a48
Adding support for EIP-1559 in E2E tests (#13282) 2022-01-19 04:38:41 +05:30
Mark Stacey
48d9ca19cc
Remove unnecessary Yarn resolution (#13305)
This resolution was used to force a transitive dependency to be updated
to a specific version. But this target version was within the range
that was already requested, so a resolution is not needed. Yarn
resolutions are used for forcing a package to update to something
_outside_ of the requested range. For in-range updates, a Yarn lockfile
update is all we need, and it leaves us with less of a maintenance
burden (the resolution can clobber future updates).
2022-01-13 13:19:35 -03:30
Erik Marks
d4b6e95f89
Add resolution for follow-redirects (#13301)
Adds a resolution for `follow-redirects` to resolve https://github.com/advisories/GHSA-74fj-2j2h-c42q. The dependency graph is `analytics-node#axios#follow-redirects`, and neither parent package has published a fix for this vulnerability.
2022-01-12 21:37:40 -08:00
MetaMask Bot
54ad3857be Version v10.9.0 2022-01-11 19:26:26 +00:00
Alex Donesky
4826c8c95e
Feat/collectibles send flow (#13048)
* Add collectibles send flow
2022-01-10 10:23:53 -06:00
Mark Stacey
3732c5f71e
Add JSDoc ESLint rules (#12112)
ESLint rules have been added to enforce our JSDoc conventions. These
rules were introduced by updating `@metamask/eslint-config` to v9.

Some of the rules have been disabled because the effort to fix all lint
errors was too high. It might be easiest to enable these rules one
directory at a time, or one rule at a time.

Most of the changes in this PR were a result of running
`yarn lint:fix`. There were a handful of manual changes that seemed
obvious and simple to make. Anything beyond that and the rule was left
disabled.
2022-01-07 12:27:33 -03:30
Mark Stacey
139a67fca4
Include style lints in lint:fix script (#13217)
The `lint:fix` script now also calls `yarn stylelint --fix`. This step
was omitted previously, despite `stylelint` being part of the `lint`
npm script.
2022-01-05 13:38:51 -03:30
Alex Donesky
c266d4e6af
Feat/check update collectible ownership (#13110)
* Use method to check and update collectible ownership
2022-01-03 14:39:41 -06:00
Mark Stacey
ae57d69c42 Merge remote-tracking branch 'origin/develop' into sync-master
* origin/develop: (106 commits)
  Add more missing `appName` messages (#13140)
  Add missing `appName` localized messages for Flask and Beta (#13138)
  EIP-1559 V2: Adding default settings to advanced gas modal (#12911)
  EIP-1559 V2: Advanced gas fee modal - base fee and priority fee trends (#13025)
  Wire up priority fee range in new gas modal (#13044)
  EIP-1559 V2: Advanced gas fee modal - getting 12 hour ranges of base fee and priority fee (#12996)
  Switch Flask horizontal logos (#13113)
  Update `@babel/runtime` patch to fix lockdown error (#13109)
  Use promisified background in setUseNonceField (#13107)
  Fix account name duplicates (#12867)
  Choose accounts refactor (#13039)
  Fix permissions-connect-footer "learn more" link (#13092)
  Feat/collectibles the return (#12970)
  Subject metadata cleanup (#13090)
  Fix merge conflict typo
  Bump just-safe-set from 2.1.0 to 2.2.3 (#13049)
  Fix typo in German translation (#13040)
  Using EIP-1559 V2 for swaps (#12966)
  Make restore vault a form so an user can submit via keyboard (#12989)
  Remove legacy node parent detection (#12814)
  ...
2021-12-22 09:22:32 -03:30
MetaMask Bot
719cee5499 Version v10.8.2 2021-12-21 20:52:06 +00:00
Mark Stacey
0c18366a87 Merge remote-tracking branch 'origin/develop' into master-sync
* origin/develop: (100 commits)
  Switch Flask horizontal logos (#13113)
  Update `@babel/runtime` patch to fix lockdown error (#13109)
  Use promisified background in setUseNonceField (#13107)
  Fix account name duplicates (#12867)
  Choose accounts refactor (#13039)
  Fix permissions-connect-footer "learn more" link (#13092)
  Feat/collectibles the return (#12970)
  Subject metadata cleanup (#13090)
  Fix merge conflict typo
  Bump just-safe-set from 2.1.0 to 2.2.3 (#13049)
  Fix typo in German translation (#13040)
  Using EIP-1559 V2 for swaps (#12966)
  Make restore vault a form so an user can submit via keyboard (#12989)
  Remove legacy node parent detection (#12814)
  Add stories for Home notification component (#13035)
  Update Redux DevTools README instructions (#13038)
  Jestify app/scripts/controller/network/**/*.test.js (#12985)
  Fix order of account list (#12999)
  Changes in gas loading animation in EIP-1559 V2 (#13016)
  Add crowdin configuration and github action (#12552)
  ...
2021-12-17 09:49:45 -03:30
MetaMask Bot
db98618b62 Version v10.8.1 2021-12-16 17:17:00 +00:00
Mark Stacey
2a39f609f9
Merge pull request #13088 from MetaMask/master-sync
Master <> Develop Sync (post-v10.8.0)
2021-12-14 10:30:48 -03:30
Alex Donesky
1b6e58c417
Feat/collectibles the return (#12970)
* Wire collectibles frontend UI with controller data
2021-12-13 17:41:10 -06:00
Dan Miller
460f08f008 Merge branch 'develop' into master-sync 2021-12-13 13:49:04 -03:30
Mark Stacey
ba54a3d83b
Update ESLint config to v8 (#12886)
The ESLint config has been updated to v8. The breaking changes are:

* The Prettier rule `quoteProps` has been changed from `consistent` to
`as-needed`, meaning that if one key requires quoting, only that key is
quoted rather than all keys.
* The ESLint rule `no-shadow` has been made more strict. It now
prevents globals from being shadowed as well.

Most of these changes were applied with `yarn lint:fix`. Only the
shadowing changes required manual fixing (shadowing variable names were
either replaced with destructuring or renamed).

The dependency `globalThis` was added to the list of dynamic
dependencies in the build system, where it should have been already.
This was causing `depcheck` to fail because the new lint rules required
removing the one place where `globalThis` had been erroneously imported
previously.

A rule requiring a newline between multiline blocks and expressions has
been disabled temporarily to make this PR smaller and to avoid
introducing conflicts with other PRs.
2021-12-09 15:36:24 -03:30
Mark Stacey
670bed4c61
Add @metamask/rpc-methods package (#13027)
The `selectHooks` function has been replaced with the equivalent
function from the `@metamask/rpc-methods` package, which is
functionally equivalent.

The function was included in that package so that it could be used
elsewhere in the `snaps-skunkworks` repo. Eventually the goal is to
migrate much of our RPC logic into this package so that it can be
shared across products, and by our libraries as needed.
2021-12-09 11:22:53 -03:30
Dan J Miller
c73c2d8a9f Support EIP-1559 on Trezor Model One (#13023)
* Support EIP-1559 on Trezor Model One

* Update unit tests

* Fix unit test

* Run yarn lavamoat:auto
2021-12-08 23:19:24 -03:30
Dan J Miller
e45560859c
Support EIP-1559 on Trezor Model One (#13023)
* Support EIP-1559 on Trezor Model One

* Update unit tests

* Fix unit test

* Run yarn lavamoat:auto
2021-12-08 23:16:54 -03:30
Dan J Miller
a34f88e375 Dispose the trezor connect iframe upon lock (#13018)
* Dispose the trezor connect iframe upon lock

* Use KEYRING_TYPES.TREZOR

* Update eth-trezor-keyring version
2021-12-08 13:55:58 -03:30
Dan J Miller
c9768df149
Dispose the trezor connect iframe upon lock (#13018)
* Dispose the trezor connect iframe upon lock

* Use KEYRING_TYPES.TREZOR

* Update eth-trezor-keyring version
2021-12-08 13:55:27 -03:30
Thomas Huang
5002b341ce Merge remote-tracking branch 'origin/develop' into master-sync 2021-12-07 15:08:05 -06:00
MetaMask Bot
ed6880f5ce Version v10.7.1 2021-12-07 19:19:23 +00:00
Erik Marks
31cf7c10a4
Permission System 2.0 (#12243)
# Permission System 2.0

## Background

This PR migrates the extension permission system to [the new `PermissionController`](https://github.com/MetaMask/snaps-skunkworks/tree/main/packages/controllers/src/permissions).
The original permission system, based on [`rpc-cap`](https://github.com/MetaMask/rpc-cap), introduced [`ZCAP-LD`](https://w3c-ccg.github.io/zcap-ld/)-like permissions to our JSON-RPC stack.
We used it to [implement](https://github.com/MetaMask/metamask-extension/pull/7004) what we called "LoginPerSite" in [version 7.7.0](https://github.com/MetaMask/metamask-extension/releases/tag/v7.7.0) of the extension, which enabled the user to choose which accounts, if any, should be exposed to each dapp.
While that was a worthwhile feature in and of itself, we wanted a permission _system_ in order to enable everything we are going to with Snaps.
Unfortunately, the original permission system was difficult to use, and necessitated the creation of the original `PermissionsController` (note the "s"), which was more or less a wrapper for `rpc-cap`.

With this PR, we shake off the yoke of the original permission system, in favor of the modular, self-contained, ergonomic, and more mature permission system 2.0.

Note that [the `PermissionController` readme](https://github.com/MetaMask/snaps-skunkworks/tree/main/packages/controllers/src/permissions/README.md) explains how the new permission system works.

The `PermissionController` and `SubjectMetadataController` are currently shipped via `@metamask/snap-controllers`. This is a temporary state of affairs, and we'll move them to `@metamask/controllers` once they've landed in prod.

## Changes in Detail

First, the changes in this PR are not as big as they seem. Roughly half of the additions in this PR are fixtures in the test for the new migration (number 68), and a significant portion of the remaining ~2500 lines are due to find-and-replace changes in other test fixtures and UI files.

- The extension `PermissionsController` has been deleted, and completely replaced with the new `PermissionController` from [`@metamask/snap-controllers`](https://www.npmjs.com/package/@metamask/snap-controllers).
- The original `PermissionsController` "domain metadata" functionality is now managed by the new `SubjectMetadataController`, also from [`@metamask/snap-controllers`](https://www.npmjs.com/package/@metamask/snap-controllers).
- The permission activity and history log controller has been renamed `PermissionLogController` and has its own top-level state key, but is otherwise functionally equivalent to the existing implementation.
- Migration number 68 has been added to account for the new state changes.
- The tests in `app/scripts/controllers/permissions` have been migrated from `mocha` to `jest`.

Reviewers should focus their attention on the following files:

- `app/scripts/`
  - `metamask-controller.js`
    - This is where most of the integration work for the new `PermissionController` occurs.
      Some functions that were internal to the original controller were moved here.
  - `controllers/permissions/`
    - `selectors.js`
      - These selectors are for `ControllerMessenger` selector subscriptions. The actual subscriptions occur in `metamask-controller.js`. See the `ControllerMessenger` implementation for details.
    - `specifications.js`
      - The caveat and permission specifications are required by the new `PermissionController`, and are used to specify the `eth_accounts` permission and its JSON-RPC method implementation.
        See the `PermissionController` readme for details.
  - `migrations/068.js`
    - The new state should be cross-referenced with the controllers that manage it.
      The accompanying tests should also be thoroughly reviewed.

Some files may appear new but have just moved and/or been renamed:

- `app/scripts/lib/rpc-method-middleware/handlers/request-accounts.js`
  - This was previously implemented in `controllers/permissions/permissionsMethodMiddleware.js`.
- `test/mocks/permissions.js`
  - A truncated version of `test/mocks/permission-controller.js`.

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-12-06 19:16:49 -08:00
Thomas Huang
d78cfebd43
Jestify app/scripts/lib/**/*.test.js (#12890)
* Jestify app/scripts/lib/*.test.js

* Mocha config on mocha test script

* Add app/scripts/lib to include subdirs
2021-12-06 10:40:39 -06:00
ruleking
7c59fd035e
Update package.json + yarn.lock with contract-metadata version 1.31.0 (#12947)
* Update package.json: contract-metadata to newest release 1.31.0

* update lock file

* Fix: yarn-deduplicate lock file
2021-12-06 11:24:00 -03:30
kumavis
3fb5fcdb23
Lavamoat Devx - update lavamoat-browserify for policy reload on change (#12940)
* deps - update lavamoat-browserify for policy reload

* lavamoat/build-system - add missing policy for lavamoat-browserify
2021-12-02 14:04:02 -10:00
PeterYinusa
bb312c2818
update selenium-webdriver to v4.1.0 (#12922)
* update selenium-webdriver to v4.1.0

* fix tests
2021-12-02 18:28:24 +00:00
Alex Donesky
3cff801b8e Revert "Feat/collectibles display (#12873)" (#12934)
This reverts commit 81ea24f08a.
2021-12-01 22:19:54 -03:30
Alex Donesky
9e2935dd55
Revert "Feat/collectibles display (#12873)" (#12934)
This reverts commit 81ea24f08a.
2021-12-01 17:46:26 -06:00
George Marshall
eb4f051b23
Adding SnapSettingsCard ui component (#12655)
* parent d89e5336a6
author georgewrmarshall <george.marshall@consensys.net> 1636692862 -0800
committer hmalik88 <hassan.malik@consensys.net> 1637342043 -0500

Initial SnapSettingsCard component

Updates to styles but having specificity issues so increased specificity

Updates to styles but having specificity issues so increased specificity

added overflow fix and added tests

lockfile update

prettier fix

added stylelint ignore

yarn.lock fixed

* merge conflict fix

* package/yarn fix

* fixed package.json

* updated lockfile...

* removed comment

* removed unnecessary key/val for chip status indicator color

* bumped lattice to 0.4.0 in package json, fixed yarn lock

* removed dupe entry in yarn lock

* ran yarn setup to update lock file

* updated chip label prop

* parent d89e5336a6
author georgewrmarshall <george.marshall@consensys.net> 1636692862 -0800
committer hmalik88 <hassan.malik@consensys.net> 1637342043 -0500

Initial SnapSettingsCard component

Updates to styles but having specificity issues so increased specificity

Updates to styles but having specificity issues so increased specificity

added overflow fix and added tests

lockfile update

prettier fix

added stylelint ignore

yarn.lock fixed

* merge conflict fix

* package/yarn fix

* fixed package.json

* updated lockfile...

* removed comment

* bumped lattice to 0.4.0 in package json, fixed yarn lock

* removed dupe entry in yarn lock

* ran yarn setup to update lock file

* Using IconWithFallback instead of SiteIcon, fixing icon prop, and adding status story and docs page

* Updating to follow storybook folder convention

* Updates to styles

* Adding localization

* added todo comment

Co-authored-by: hmalik88 <hassan.malik@consensys.net>
2021-12-01 16:10:51 -05:00
MetaMask Bot
9262670dfe Version v10.8.0 2021-12-01 19:13:15 +00:00