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

2247 Commits

Author SHA1 Message Date
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
Brad Decker
c146023598
ci: temporarily disable codecov status checks (#19354) 2023-06-01 10:11:22 -05:00
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
Danica Shen
7753364958
feature(17901): disable hardware wallet test with trezor in mv3 (#19287) 2023-05-26 14:05:34 +01:00
Danica Shen
9ea6f8ee12
feature(17901): fix test/e2e/tests/add-account.spec.js (#19280) 2023-05-24 12:50:31 -05:00
Bowen Sanders
290dbd77ce
[FLASK] Create E2E test for snaps network_access endowment (#19213)
* create networkaccess e2e

* final changes

* fixed enums

* requested changes

* fixed result test
2023-05-23 11:54:31 +02:00
George Marshall
8437d0491f
Deprecated Icon and ButtonIcon clean up (#19220)
* Updating all deprecated instances of Icon and ButtonIcon

* Removing unused deprecated components and scripts
2023-05-19 10:33:02 -07:00
Danica Shen
fd8b81def0
feature(16691): mv3 e2e test for phishing warning page when sw restarts (#19196)
* feature(16691): mv3 e2e test for phishing warning page when sw restarts

* feature(16691): code review feedback to remove console and extract helper
2023-05-19 11:17:53 +01:00
Bowen Sanders
52109a1829
[FLASK] Create E2E test for ethereum_provider endowment (#19191) 2023-05-18 08:34:24 -07:00
David Walsh
577e4cba0b
UX: Multichain: Don't filter out custom mainnet RPCs (#19150) 2023-05-17 12:26:15 -05:00
Nidhi Kumari
ac6fb3bb09
UX Multichain: updated assets to tokens in home page (#19144)
* updated assets to tokens in home page

* lint fix

* lint fix

* updated tests and spec files

* lint fix
2023-05-17 08:30:47 +05:30
Frederik Bolding
125021e425
[FLASK] snaps-monorepo@0.33.1-flask.1 (#18913)
* snaps-monorepo@0.33.0-flask.1

* Add browser-passworder

* Patch babel/core

* Fix PermissionController messenger allowlist

* Update test-snaps

* Use latest patch

* Update LavaMoat policies

* Re-enable RPC E2E

* Make snaps iframe URL be a env variable and bump it

* Add new env variable to test env

* Add iframe URL to desktop build
2023-05-15 19:36:24 +02:00
Bowen Sanders
be8d832426
[FLASK] Create E2E test for snap_GetEntropy (#18998) 2023-05-11 12:43:08 -07:00
Danica Shen
395ac34bed
chore: refactor connect to dapp action in e2e (#19015)
* chore: refactor connect to dapp action in e2e

* chore: refactor 2nd dapp connection

* chore: rename to openDapp
2023-05-05 14:56:08 +01:00
Danica Shen
c49fd49b1d
feature(17946): implement mv3 e2e for popup consistency after service worker restarted (#19010)
* feature(17946): implement mv3 e2e for popup consistency after service worker restarts

* feature(17946): fix typo

---------

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2023-05-04 20:58:39 +01:00
Jyoti Puri
9c63dfca89
Changes in blockaid texts (#19001) 2023-05-04 23:51:46 +05:30
Frederik Bolding
1646ab110e
[FLASK] Disable RPC test (#19011)
* Disable RPC test

* Fix lint
2023-05-04 19:09:37 +02:00
Pedro Figueiredo
bfbe10ba28
e2e test for action metrics (#18347)
* e2e test for action metrics

* add tests to implementing sw restart delay tracking

* wip

* wip

* wip

* wip

* remove unneeded code

* remove scuttling changes contemplated in #18989
2023-05-04 10:38:09 +04:00
Mark Stacey
d1cea85f33
Rename provider to providerConfig (#18907)
* Rename `provider` to `providerConfig`

The network controller `provider` state has been renamed to
 `providerConfig`. This better reflects what this state is, and makes
this controller more closely aligned with the core network controller.

All references to the provider configuration have been updated to
prefer `providerConfig` over `provider`, to make the distinction clear
between a provider and provider config.

Closes #18902

* Add migration
2023-05-02 13:23:20 -02:30
Frederik Bolding
55d974d7b2
Bump Circle CI docker image (#18914)
* Bump Circle CI docker image

* Stop removing FF since it doesn't exist

* Use Circle CI browser tools

* Fix config name

* Fix browser tools args

* Fix Chrome version

* Use script for chrome

* Try update

* Try FF without browser-tools2

* Fix FF binary path

* Force enable e2e debug

* Add some logs

* More logs

* Disable XSET check for now

* Delete x-server logic

* remove another usage of the x-server logic
2023-05-02 17:10:53 +02:00
Peter
a9243077b4
Terms of use e2e (#18861)
* use substitution

* add test
2023-04-28 14:37:06 +01:00
legobeat
576eee7adf
devDeps: eslint@8.14.0,8.20.0->8.36.0 (#18748)
* devDeps: eslint@8.14.0,8.20.0->8.36.0

- CVE-2021-4279 / CVE-2021-4279
- consolidate eslint into single version
  - port patches

* add eslintignore directive

* lavamoat: update build policy overrides
2023-04-28 07:45:15 +09:00
David Walsh
e339afce7a
UX: Multichain: Analytics (#18674) 2023-04-27 09:28:08 -05:00
Andrew Peters
bbb35dbe8d
update ses@0.18.4 (#17521)
* update ses import directory
* agoric references removed
* domainTaming set to unsafe

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-27 21:31:52 +09:00
seaona
6e4de3bee8
[e2e] test-dapp update to v6.0.0 (#18844)
* Test dapp update to v6.0.0 and tweak initial token amounts to adjust to the new contract

* Update gas estimates for new TST contract

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-27 13:01:17 +02:00
Olaf Tomalka
95c37e1ba3
feat: add yaml feature management (#18125)
* feat: add yaml feature management

Add yaml feature file per build type.
Also add method to parse yaml and set
enabled features env to true. The build
process will then replace any process.env[feature]
that exists on the config by its value

* chore: add example for desktop

* Added initial draft of build features

* [TMP] Sync between computers

* Is able to succesfully build stable extension with snaps feature

* Removing var context from builds.yml

* Add asssets to builds.yml

* Minor bug fixes and removing debug logs

* [WIP] Test changes

* Removed TODOs

* Fix regession bug

Also
* remove debug logs
* merge Variables.set and Variables.setMany with an overload

* Fix build, lint and a bunch of issues

* Update LavaMoat policies

* Re-add desktop build type

* Fix some tests

* Fix desktop build

* Define some env variables used by MV3

* Fix lint

* Fix remove-fenced-code tests

* Fix README typo

* Move new code

* Fix missing asset copy

* Move Jest env setup

* Fix path for test after rebase

* Fix code fences

* Fix fencing and LavaMoat policies

* Fix MMI code-fencing after rebase

* Fix MMI code fencing after merge

* Fix more MMI code fencing

---------

Co-authored-by: cryptotavares <joao.tavares@consensys.net>
Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-25 16:32:51 +02:00
David Drazic
ff96836871
[FLASK] Add updated version of the Snaps settings UI (#18438)
* Add updated version of the Snaps list UI

Add more changes to match the designs of snaps list

Add next design iteration for snaps list

Update icons, sizes and pointer behaviour

Add redesign for snap settings page

Refactor and improve designs

Fix unit tests and refactor code

Fix e2e test

Fix lint

Update margin values

Add CSS override for connected sites list and update margins

Update paddings as requested

Fix vertical alignment of links

Fix tooltip position on the enable button

Add usage of getSnapName function for displaying snap names

Fix e2e tests and update date format for snap install date

Improve unit test for snap-settings-card

Change installation info logic

Update mocked state for snap

Add tests for ViewSnap component, refactor and update mocked state

Add check for version info

Change Snaps icon in Settings

Refactor Snaps list to use selector

Add handling in case of missing version history

* Fix icon ref

* Remove console logs

* Remove onClick from selector

* Add code fencing for imports in selectors.js
2023-04-24 12:21:37 +02:00
Bowen Sanders
dc69ff017b
added new snaps wasm test (#18696) 2023-04-21 05:27:48 -07:00
Peter
02e8e9c679
Avoid resetting the mock server (#18661) 2023-04-19 15:36:23 +01:00
Peter
1cc709af41
wait for gas estimate to update (#18658) 2023-04-19 13:36:24 +01:00
Jyoti Puri
5892acab81
Update gas limit on token allowance change (#18524)
* Update gas limit on token allowance change

* Fix unit test case

* lint: remove unused var txParams

* fix

* fix

* fix e2e

* fix e2e

* fix e2e

* fix e2e

* fix e2e

* fix build

* fix build

* fix build

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: legobt <6wbvkn0j@anonaddy.me>
2023-04-18 20:53:45 -02:30
vthomas13
40e4a3653f
Updating Terms of Use, Adding popover and onboarding flow check (#18221)
* WIP commit

* Moving copy out of messages.json, styling changes

* handling scroll button click and disable logic

* moving scrollButton up to popover component, adding logic for accepting terms of use in popover and onboarding flows

* adding terms of use to e2e wallet creation/import

* adjusting failing unit test

* fixing QR code e2e

* updating welcome test

* setting app state in fixtures

* Update app/scripts/controllers/app-state.js

removing console log

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

* Update ui/components/app/terms-of-use-popup/terms-of-use-popup.stories.js

adding args to ToU popup storybook

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

* Update ui/components/app/terms-of-use-popup/terms-of-use-popup.js

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

* updating DS components in terms of use

* popover styling changes

* adding metametrics tracking

* editing scrollbutton behavior

* adding unit test

* code fencing

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-04-14 12:51:13 -04:00
legobeat
17147b3817
test: increase timeout for failing tests (#18189) 2023-04-14 16:59:51 +09:00
Niranjana Binoy
643a89f24d
Disabling network and account changes after the send flow is initiated (#18086) 2023-04-13 12:51:20 -04:00
Mark Stacey
7f6bdf0178
Fix e2e test for NFT interactions (#18540)
The test `should transfer a single ERC721 NFT from one account to another`
has been failing intermittently. It seems to be failing due to a race
condition; the first render shows "Send Token" but later renders show
"Send TDC". The test only passes if it runs fast enough to read the
first render of the list item component.

The test has been updated to look for the text "Send TDC", which is
what the component shows from the second render onward.
2023-04-12 09:21:33 -02:30
Matthew Walsh
bb0dff9443
Trigger transaction popup using ApprovalController (#18400) 2023-04-11 14:18:43 +01:00
Filip Sekulic
54aeb1b791
Replace contract with third party within the token allowance flow (#18101) 2023-04-11 08:49:42 +05:30
vthomas13
c6cd3c9ff2
Bumping notification id's to 18 & 19 (#18460)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2023-04-06 12:38:11 -02:30
Dan J Miller
afa09ddf6c
Fix switch-ethereum-chain handler by passing configuration id to setA… (#18483)
* Fix switch-ethereum-chain handler by passing configuration id to setActiveNetwork

* fix e2e test

* Fix e2e tests

* Update test/e2e/tests/switch-custom-network.spec.js

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>

* Revert "Update test/e2e/tests/switch-custom-network.spec.js"

This reverts commit be533ff7f25e1fd42e951d9b817b8438035ae256.

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-06 12:37:34 -02:30
Bowen Sanders
90f4e47326
[FLASK] More Snaps E2E Optimization and Delay Reductions (#18245)
* bip32 delay reduction

* asserts changed to waitFors in 32/44

* scrollTo change

* replaced delay for firefox flake

* more reduced delays

* more delay reductions and changes

* raise paralellism to 4 for snaps tests

* additional delay changes

* fixed update code

* removed comment

* removed another comment
2023-04-06 10:57:11 -04:00
Pedro Figueiredo
fbd68d4a3f
Introduce action metrics for mv3 service worker restart (#18346)
* fix dapp interaction e2e test

* wip

* add sentry post request mock

* fix console errors

* fix scripting console error and remove e2e test unnecessary check

* clean up

* remove e2e test

* stop skipping  test

* fixing build mv3 job

* fixing unit tests

* fixing unit tests

* fixing unit tests

* update coverages

* revert skip mv3 e2e test

* remove IN_TEST on the npm script

* remove console.log

* revert aria label changes

* revert aria label changes

* revert permission changes

* revert permission changes

* implement sw restart delay tracking

* fix rebase
2023-03-31 14:22:33 +01:00
David Walsh
e895ff33f9
NFTs: Use Unknown Collection instead of first NFT name (#18388)
* NFTs: Use Unknown Collection instead of first NFT name

* Use localization in hook

* Get localization for previously owned

* Fix tests

---------

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2023-03-31 06:41:07 -02:30
Danica Shen
26fed9e8da
fix(18194): Redirect to extension expanded view when click back to sa… (#18376)
* fix(18194): Redirect to extension expanded view when click back to safety button

* Bump phishing warning version

---------

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2023-03-31 10:00:44 +01:00
Elliot Winkler
ed3cc404f2
NetworkController: Split network into networkId and networkStatus (#17556)
The `network` store of the network controller crams two types of data
into one place. It roughly tracks whether we have enough information to
make requests to the network and whether the network is capable of
receiving requests, but it also stores the ID of the network (as
obtained via `net_version`).

Generally we shouldn't be using the network ID for anything, as it has
been completely replaced by chain ID, which all custom RPC endpoints
have been required to support for over a year now. However, as the
network ID is used in various places within the extension codebase,
removing it entirely would be a non-trivial effort. So, minimally, this
commit splits `network` into two stores: `networkId` and
`networkStatus`. But it also expands the concept of network status.

Previously, the network was in one of two states: "loading" and
"not-loading". But now it can be in one of four states:

- `available`: The network is able to receive and respond to requests.
- `unavailable`: The network is not able to receive and respond to
  requests for unknown reasons.
- `blocked`: The network is actively blocking requests based on the
  user's geolocation. (This is specific to Infura.)
- `unknown`: We don't know whether the network can receive and respond
  to requests, either because we haven't checked or we tried to check
  and were unsuccessful.

This commit also changes how the network status is determined —
specifically, how many requests are used to determine that status, when
they occur, and whether they are awaited. Previously, the network
controller would make 2 to 3 requests during the course of running
`lookupNetwork`.

* First, if it was an Infura network, it would make a request for
  `eth_blockNumber` to determine whether Infura was blocking requests or
  not, then emit an appropriate event. This operation was not awaited.
* Then, regardless of the network, it would fetch the network ID via
  `net_version`. This operation was awaited.
* Finally, regardless of the network, it would fetch the latest block
  via `eth_getBlockByNumber`, then use the result to determine whether
  the network supported EIP-1559. This operation was awaited.

Now:

* One fewer request is made, specifically `eth_blockNumber`, as we don't
  need to make an extra request to determine whether Infura is blocking
  requests; we can reuse `eth_getBlockByNumber`;
* All requests are awaited, which makes `lookupNetwork` run fully
  in-band instead of partially out-of-band; and
* Both requests for `net_version` and `eth_getBlockByNumber` are
  performed in parallel to make `lookupNetwork` run slightly faster.
2023-03-30 16:49:12 -06:00
Frederik Bolding
a53b9fb489
[FLASK] snaps-monorepo@0.32.2 (#18371)
* snaps-monorepo@0.32.0

* Update LavaMoat policies

* Add JsonSnapRegistry

* Fix lint

* [FLASK] Handle side-effects changes in metamask-controller (#18373)

* Update PermissionController

* Fix lint

* Update iframe-execution-environment

* snaps-monorepo@0.32.1

* Bump test-snaps

* Update version assertion

* Update URLs

* Fix lint

* snaps-monorepo@0.32.2

---------

Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
2023-03-30 23:57:28 +02:00
Jyoti Puri
a28256ace4
Change api used for opensea validation (#18383)
* Change api used for opensea validation

* fix build
2023-03-30 17:33:35 -02:30
Hassan Malik
c2b2f2685e
[FLASK] Redesign key management modal (#18263)
* added the rest of the sev1 warnings to getSnapInstallWarnings

* added and updated translations

* Updated getSnapInstallWarnings to include warnings for all weight-1 permissions

* Updated snap install warning and css according to designs

* fix snaps tests

* fixed alignment/spacing

* updated e2e tests to click through the newly displayed public key access warning

* lint fix

* fixed update snap test

* refactored getSnapInstallWarnings, moved logic to PERMISSION_DESCRIPTIONS

* fix logic to account for objects & arrays

* update function description

* add missing properties to ethereum provider description

* moved id and message to baseDescription to fix error

* add optional chaining to fix undefined error

* more optional chaining

* more optional chaining
2023-03-29 15:17:57 -04:00
seaona
d4f04815c2
Remove timeouts without effect (#18342) 2023-03-28 14:59:41 +02:00