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

17027 Commits

Author SHA1 Message Date
Bernardo Garces Chapero
67555fc879
accept approval request first (#19409) 2023-06-02 11:07:08 +01:00
Suryansh Anand
20fe6fcad4
Fix/storybook console cleanup (#19244)
* Fix: Fix storybook console error of networkList not being found when passed to createStore

* Fix: Remove unused testData imports
2023-06-01 14:40:39 -07:00
David Walsh
b89630fdd2
Release MultiChain 0.5 (#18903)
* Show portfolio icon in ETH overview

* Show new copy button in QR code modal

* Show address copy button in wallet overview

* Update connected status component

* Remove legacy MenuBar

* Remove legacy ImportTokenLink

* Remove AssetListItem

* Remove DetectedTokensLink

* Remove legacy AppHeader

* Remove MULTICHAIN flag from builds.yml

* Remove legacy AccountMenu

* FIX: Token cell snapshot

* Add data-testid for Account Picker

* Remove multichain check in LoadingNetworkScreen

* Remove MULTICHAIN check for AccountDetailsModal

* Remove MULTICHAIN check for AssetList

* Update QR dimensions

* Remove MULTICHAIN declaration from metamaskrc.dist

* Implement PickerNetwork and NetworkListMenu in onboarding

* Remove legacy NetworkDropdown and Dropdown

* Remove documentation about legacy account menu

* FIX: Fixes route tests for missing data-testid=network-display

* Fix account-menu-icon data-testid

* Fix TokenCell test

* FIX Onboarding Flow tests

* Remove unused locales from AccountMenu removal

* E2E: Fix Import Secret Recovery Phrase: logs out of the vault

* E2E: Fix Show account details: should show the QR code for the account

* E2E: Fix add-account.spec.js

* E2E: Fix state-logs.spec.js

* E2E: Fix lock-account.spec.js

* E2E: Fix settings-general.spec.js

* E2E: Fix advanced-settings.spec.js

* E2E: Fix auto-lock.spec.js

* E2E: Fix backup-restore.spec.js

* E2E: Fix clear-activity.spec.js

* E2E: Fix settings-search.spec.js

* E2E: Fix encrypt-decrypt.spec.js

* E2E: Fix dapp-interactions.spec.js

* E2E: Fix test-snap-management.spec.js

* E2E: Fix add-custom-network.spec.js

* E2E: Fix from-import-ui.spec.js

* E2E: Fix provider-api.spec.js

* E2E: Fix chain-interactions.spec.js

* E2E: Fix custom-rpc-history.spec.js

* Remove network icon from overview components

* E2E: Fix user-actions-benchmark.js

* E2E: Fix benchmark.js

* E2E: Fix add-hide-token.spec.js

* E2E: Fix address-book.spec.js

* E2E: Fix custom-token-add-approve.spec.js

* E2E: Fix incremental-security.spec.js

* E2E: Fix metamask-responsive-ui.spec.js

* E2E: Onboarding.spec.js

* E2E: Fix permissions.spec.js

* E2E: Fix send-hex-address.spec.js

* E2E: Fix send-to-contract.spec.js

* Remove dead AccountOptionsMenu test

* E2E: Fix token-details.spec.js

* E2E: Fix switch-custom-network.spec.js

* E2E: Fix metamask-ui.spec.js

* Revert "UX Multichain: updated border top for activity list (#19176)"

This reverts commit 15598f2a23.

* E2Es: Fix test-snap-management.spec.js and test-snap-notification.spec.js

* E2Es: Fix add-account.spec.js after flaky test fixes

* e2e flaky test

* adds back the mmi options

* scss fix

* test fix

* removes unnecessary double quotes

* Prevent double logos on login screen

* Update ui/components/ui/list-item/index.scss

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

---------

Co-authored-by: seaona <mariona@gmx.es>
Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-06-01 16:14:38 -05:00
rohit kerkar
2a227c4646
Part of #18714: Replacing deprecated constants in Avatar-Favicon folder (#19332)
* sda

* sad

* replacing depricated constants

---------

Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-06-01 10:09:08 -07:00
Ariella Vu
d5dd4fa881
ConfirmTxPage: rm redundant unapprovedTxs const (#19275)
* fix typo: uncofirmedTransactions -> unconfirmedTransactions

* txHelper: reorganize lines and improve test

* ConfirmTx: rn unconfirmedTxs->unconfirmedTxsSorted

* ConfirmTx: rn unconfirmedMessages-> unconfirmedTxs

* ConfirmTxPage: rm redundant unapprovedTxs const

* lint: rm unused getUnapprovedTransactions
2023-06-01 18:42:19 +02:00
rohit kerkar
ee9f7949f9
Replacing Deprecated Constants (#19333) 2023-06-01 09:33:11 -07:00
Binij Shrestha
33cd2c7c18
added deprecation message above SiteIcon (#19256)
* added deprecation message above SiteIcon

* fix eslint

* Some small updates to show correct code formatting and removing params

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-06-01 09:32:10 -07:00
Brad Decker
c146023598
ci: temporarily disable codecov status checks (#19354) 2023-06-01 10:11:22 -05:00
Ariella Vu
ea4270babf
ConfirmApprove: fix space occurring after footer (#19276) 2023-06-01 16:12:09 +02:00
Ariella Vu
8d79e28560
Clean ConfirmTransaction page related code (#19208)
* fix typo: uncofirmedTransactions -> unconfirmedTransactions

* txHelper: reorganize lines and improve test

* ConfirmTx: rn unconfirmedTxs->unconfirmedTxsSorted

* ConfirmTx: rn unconfirmedMessages-> unconfirmedTxs
2023-06-01 16:10:26 +02:00
OGPoyraz
d99aecc164
deep clone signature tx in order to avoid state mutation bug on development (#19179) 2023-06-01 11:48:07 +02:00
Mark Stacey
20f028bf6f
Update @metamask/approval-controller to v3 (#19365)
The `@metamask/approval-controller` package has been updated to v3.
This version was part of the [core monorepo v53](MetaMask/core#1385)
release. The remaining packages released as part of v53 will be updated
in later PRs.

The only breaking change in this release was to update the minimum
supported Node.js version to v16.

Note that this will temporarily introduce peer dependency warnings
because of the major version bump. These are safe to avoid for now
because nothing is affected by the Node.js minimum version bump.

A resolution has been added to force v3 to be used throughout the
dependency tree so that this bump doesn't unnecessarily bloat our
dependencies. In practice this is only being used in one place, the
other references are just for types.

The resolution can be removed once the last package using this
controller has been updated, which will happen as part of #19271. The
peer dependency warnings will be resolved once #19271 is completed as
well.

Relates to #19271
2023-05-31 20:10:20 -02:30
Mark Stacey
81dbb27c73
Update @metamask/notification-controller to v3 (#19364)
The `@metamask/notification-controller` package has been updated to v3.
This version was part of the [core monorepo v53](MetaMask/core#1385)
release. The remaining packages released as part of v53 will be updated
in later PRs.

The only breaking change in this release was to update the minimum
supported Node.js version to v16.

Relates to #19271
2023-05-31 20:10:05 -02:30
Soralit
63b810f0db
fix: keystone sign request break (#19349) 2023-05-31 19:36:20 -02:30
Mark Stacey
58c0ac8b53
Update @metamask/address-book-controller to v3 (#19345)
The `@metamask/address-book-controller` package has been updated to v3.
This version was part of the [core monorepo v53](https://github.com/MetaMask/core/pull/1385)
release. The remaining packages released as part of v53 will be updated
in later PRs.

This release included a number of breaking changes relating to the
`chainId` format change from `string` to `Hex`. However these changes
don't affect the extension because it was already using `Hex` chain IDs
for all address book interactions.

Relates to #19271
2023-05-31 19:32:08 -02:30
Mark Stacey
000c1f2ef4
Update @metamask/controller-utils to v4 (#19344)
The package `@metamask/controller-utils` has been updated to v4. This
version was part of the core monorepo v53 release. The remaining
packages released as part of v53 will be updated in later PRs.

This release included a variety of breaking changes, but most of them
did not affect the extension's usage of this library. The one that did
have an impact was the removal of the `Json` type, which was identical
to the `Json` type in `@metamask/utils`. We're now using the
`@metamask/utils` version of this type exclusively.

Relates to #19271

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-05-31 18:33:29 -02:30
legobeat
bdf32199d1
devDeps: yargs@7.1.1->7.1.2 (#19057)
CVE-2020-7608 / GHSA-p9pc-299p-vxgp
2023-06-01 05:45:21 +09:00
legobeat
dc580c1cf1
devDeps: squirrelly@^8.0.8->^9.0.0 (#19113)
CVE-2021-32819 / GHSA-q8j6-pwqx-pm96
2023-06-01 05:21:42 +09:00
Dan J Miller
bb605f7e97
Update mv3 minimum version to chrome v88 (#19358) 2023-05-31 17:43:26 -02:30
Elliot Winkler
fbcd2a1113
Ensure custom provider configs have chain ID and RPC URL (#19296)
Update NetworkController so that when it is creating the network client
based on configuration for a custom RPC endpoint, it verifies that the
configuration object contains both a chain ID and RPC URL. This check is
already present on the core side; bringing it over makes the tests more
consistent so we can compare them more easily.
2023-05-31 11:52:04 -06:00
Elliot Winkler
1fc4b39dc7
Update INFURA_NETWORKS in NC tests to ostensibly use dec #'s (#19316)
This is a tiny change in order to make the NetworkController tests
between core and this repo more consistent and easier to compare.
2023-05-31 11:51:46 -06:00
Elliot Winkler
206e4537d1
NetworkController tests: Sync withController helper (#19313)
This reduces the diff in the NetworkController tests between this repo
and core in order to make them easier to merge.
2023-05-31 11:50:32 -06:00
Elliot Winkler
84cb4a7b62
NetworkController tests: Remove commented line (#19315)
This line was accidentally left in a previous PR that swapped Nock in
the NetworkController tests for a fake provider. It does not show up in
the core version of these tests.
2023-05-31 11:16:48 -06:00
rohit kerkar
80de5ceed4
Part of #18714: Replacing deprecated constants in Modal-Header folder (#19339)
* replacing deprecated

* replacing deprecated

---------

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-05-31 10:12:21 -07:00
Mark Stacey
d09c8bd492
Update @metamask/announcement-controller to v4 (#19348)
The `@metamask/announcement-controller` has been updated to v4, which
is the version released in the core monorepo v53 release. The remaining
packages released as part of v53 will be updated in later PRs.

The only breaking change is that the minimum Node.js version was
updated to v16.

Relates to #19271
2023-05-31 13:19:34 -02:30
Erik Nilsson
d7301fb811
Update README.md (#19350)
Clarify that `.metamaskrc` doesn't exist before you create it
2023-05-31 10:49:17 -05:00
Elliot Winkler
3e0d717b97
NetworkController: Improve test for destroy (#19314)
This test for the `destroy` method in NetworkController uses `toBe` on
the core side because the use of `toBeTruthy` produces a lint warning
there. It doesn't here, but it's good to be consistent anyway so that
comparing the differences in NetworkController tests between this
extension and core is easier.
2023-05-31 09:30:17 -06:00
Elliot Winkler
cc2e18b16a
Add getProviderConfig action to NetworkController (#19317)
This controller action exists within the core version of
NetworkController. Although there are no plans to make use of this
action within the extension, it has accompanying tests. So ultimately,
the goal of this commit (like others) is to make it easier to compare
differences in the NetworkController tests between this repo and core
by adding a test for the `getProviderConfig` action.
2023-05-31 09:29:59 -06:00
Elliot Winkler
84d22e122c
Sync NetworkController constructor tests with core (#19311)
This makes it easier to compare the NetworkController unit tests between
extension and core.
2023-05-31 09:29:29 -06:00
Mark Stacey
7f82ea231c
Update @metamask/base-controller to v3 (#19343)
The `@metamask/base-controller` has been updated to v3, which is the
version released in the core monorepo v53 release. The other packages
released as part of v53 will be updated in later PRs.

Relates to #19271
2023-05-31 12:38:07 -02:30
David Drazic
f788121c3b
[FLASK] Add Snaps privacy warning on snap install (#18835)
* Add Snaps privacy warning on snap install

Add snap install warning status to storage

Add storybook

Add test for snap-privacy-warning

Resolve button type issue

Fix popup display logic

Update fixture

Update popup information and read more handling

Replace deprecated button

Update unit test

* Update buttons and add cancel flow

* Refactoring (review 1)

* Add more unit tests
2023-05-31 14:43:39 +02:00
Danica Shen
49f8052b15
feature(17901): fix failing network error and remove duplicated e2e for mv3 (#19292)
* feature(17901): fix failing network error e2e for mv3

* feature(17901): remove dapp interaction for duplication

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-05-30 14:48:43 +01:00
Danica Shen
8dc6bf1111
feature(17901): fix address-book Sends to an address book entry e2e against MV3 build (#19330)
* feature(17901): fix address-book `Sends to an address book entry` e2e against MV3 build

* feature(17901): add balance guide for send-eth e2e as well

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-05-30 13:44:56 +01:00
legobeat
dfafdbb6bd
Revert "[MMI] Add confirm-transaction-base code fences (#18795)" (#19328)
This reverts commit 97a9834182.

Co-authored-by: António Regadas <apregadas@gmail.com>
2023-05-30 21:39:38 +09:00
António Regadas
f2356b29a5
updates values (#19336) 2023-05-30 13:08:07 +01:00
Dhruv
cdaa21b3cb
Changes to Popover folder (#19245) 2023-05-29 16:16:11 -07:00
Albert Olivé
97a9834182
[MMI] Add confirm-transaction-base code fences (#18795)
* Added code fences

* Continue working on this ticket

* Fixed policies

* Added compliance-row component

* Fixed tests and css

* Fixed invalid locale

* Fixing linting

* Add optional check

* Fixing issues

* Fixed storybook

* Added missing dependency

* ran lavamoat auto

* ran dedupe and lavamoat

* lint

* Removed compliance row

* Removed unneeded package

* Removed unneeded proptyes

* updates mmi packages

* updating lavamoat

* formatting main

* Fixed conflicts

* updates lock file

* Moved code fences to have them all in the same place

* Updated yarn.lock and lavamoat

* remove linebreak

* Improved logic in order to not have many code fences and improve readability

* Fixing proptypes issues with eslint

* runs lavamoat auto

* Testing fixes issue e2e tests

* Testing issues

* Reverting code fences container

* Fixing issue with binding

* Added code fences in proptypes

* Reverting code fences

---------

Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
Co-authored-by: António Regadas <apregadas@gmail.com>
2023-05-29 16:50:56 +01:00
António Regadas
edf2cc41cb
[MMI] adds mmi code fences to mm controller (#18279)
* adds code fencing

* MMI adds mmi-controller

* MMI prettier

* chore: create keyring builder for CustodyKeyrings

* updates code fence to build-mmi

* adds dependencies

* fix import and prettier

* lint

* clean up

* clean up

* removes old methods and adds new

* comment for now

* adds two missing methods

* runs yarn dedupe

* adds missing import

* bump target values

* lavamoat policy update

* bump values in coverage targets

* prettier import order

* coverage report update

* clean up

* yarn update

* yarn dedupe

* ran lavamoat:auto

* adds zlib entry to storybook/main.js

* adds browserify-zlib

* clean up

* clean up

* prettier

* prettier

* eslint fix

* fix paths

* fix prettier

* fix file name for mocha

* adds to config

* rename

* adds file to configs

* test lavamoat clean up

* run dedupe

* sets value in storybook main.js as false

* runs lavamoat auto

* updates mmi packages to lighter versions

* updates mmi packages

* lavamoat auto

* adds finalized tx status

* lavamoat auto

* yarn dedupe

* clean up

* moving stuff into mmi controller

* clean up

* updates tresholds

* yarn lock review

* updates the mmi controller

---------

Co-authored-by: Shane Terence Odlum <shane.odlum@consensys.net>
2023-05-29 16:38:28 +01:00
Mark Stacey
d9c48cc4c0
Merge pull request #19309 from MetaMask/master-sync
Master sync follow v10.31.0
2023-05-26 15:44:28 -02:30
Dan J Miller
e5a9dc8dcf Merge remote-tracking branch 'origin/develop' into master-sync 2023-05-26 15:08:25 -02:30
Elliot Winkler
c2bbbb1dbc
NetworkController: Simplify event types (#19252)
In the `core` version of this controller, event types are not held in an
enum but are specified directly as strings instead.

Simplifying the event types will make it easier to compare the
NetworkController unit tests between extension and core.
2023-05-26 10:35:52 -06:00
Elliot Winkler
b387a6e795
Reset all Jest mocks in NetworkController tests (#19295)
This makes it possible to test that mock functions are called the
correct amount of times (otherwise Jest will think that a mock function
has been called for as many tests as exist in the NetworkController unit
test suite).
2023-05-26 09:55:19 -06:00
Mark Stacey
edf3307f6e
Merge pull request #19032 from MetaMask/Version-v10.31.0
Version v10.31.0 RC
2023-05-26 11:29:36 -02:30
Danica Shen
7753364958
feature(17901): disable hardware wallet test with trezor in mv3 (#19287) 2023-05-26 14:05:34 +01:00
Thomas Huang
00db93763b Update Changelog 2023-05-25 16:00:56 -07:00
Dhruv
744dfc9e38
Part of #18714: Replacing deprecated constants in Icon folder (#19250)
* Replacing deprecated constants in Icon folder

* Requested changes

---------

Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-05-25 13:53:31 -07:00
Daniel
a62de72aaa Styling fix and content update for Swaps (#19284) 2023-05-25 11:43:21 -07:00
Daniel
c42d3920f8 Show the right "balance needed" value if we fallback from STX to regular Swaps (#19230)
* Show the right balance needed value if we fallback from STX to regular Swaps
* Fix usage of StxErrorTypes
2023-05-25 11:43:21 -07:00
Elliot Winkler
b7ef99847a
Refactor NC initializeProvider tests (#19253)
On the `core` side, the tests for `NetworkController.initializeProvider`
use the `lookupNetworkTests` to automatically test the `lookupNetwork`
behavior that `initializeProvider` initiates. This commit makes use of
the helper to bring the tests closer to the `core` version.
2023-05-25 11:47:36 -06:00
Elliot Winkler
5b85e9b73b
Refactor tests for refreshNetwork behavior (#19238)
The NetworkController tests in the `core` repo use a `refreshNetwork`
test helper to exercise the behavior performed by various methods
when switching the network. This commit brings over this test helper and
refactors tests for those methods to use it.
2023-05-25 11:36:38 -06:00