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

2301 Commits

Author SHA1 Message Date
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
Jyoti Puri
5dee7904d6
Extracting out title component from confirm-transaction-base (#17991) 2023-03-23 22:21:33 +04:00
Filip Sekulic
0351309227
OpenSea security provider metrics (#17688)
* Added metrics for the OpenSea security provider

* Fixed tests

* Fixed a test

* Fixed metrics

* Code refactor

* Lint fixed

* Removed unnecessary code

* Fix build

* Fix e2e

* Cleanup

* Fix e2e

* Code refactor

* Removed unnecessary code

* rpc middleware: catch securityProviderCheck errors
to not block dapp rpc requests

* Fixed an issue

* Added aditional test

* Applied some changes

* Fixed a test

* Fixed a test

* Code refactor

* Covered more code with tests

* Updated a test

* Fixed an issue

---------

Co-authored-by: Jyoti Puri <jyotipuri@gmail.com>
Co-authored-by: digiwand <20778143+digiwand@users.noreply.github.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-03-23 14:01:51 -03:00
vthomas13
16fa967740
Revert "What's new - OpenSea security provider (#16831)" (#17968)
This reverts commit 932282e638.
2023-03-22 12:51:37 -04:00
Garrett Bear
de4cf0a7e5
Fix/button base ellipsis support (#18205)
* ButtonBase ellipsis update

Update ui/components/multichain/account-picker/index.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

Update ui/components/multichain/account-picker/index.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

Update ui/components/multichain/account-picker/index.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

Update ui/components/multichain/account-picker/index.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* buttonbase updates to fix ellipsis

* multichain support

* remove multichain

* code cleanup

* clean up

* component clean up

* span update

* fix snapshots

* fix snapshot

* Updating ButtonBase to reduce html to a minimum but ensure all functionality still works (#18210)

* fix color and disable

* remove unused css

* Update ui/components/component-library/button-base/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* fix e2e test from button update

* update e2e test from button base update

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-21 19:19:49 -07:00
David Drazic
0847917df4
[FLASK] Update UI related to MetaMask Snaps Platform trademark (#18172)
* Update UI related to MetaMask Snaps Platform trademark

* Remove redundant UI text according to new designs

* Fix lint errors

* Fix e2e test expectation

* Fix lint in test

* Fix e2e test expectation

* Fix some UI parts

* Update CSS for noSnaps message

* Add next design iteration

* Add minor fix

* Update locale message

* Fix learn more text size

* Refactor usage of design system components

---------

Co-authored-by: Erik Marks <rekmarks@protonmail.com>
2023-03-21 16:52:13 +01:00
Mark Stacey
d6b49ae383
Refactor KeyringTypes constant (#17490)
The `HardwareKeyringTypes` constant has been renamed to `KeyringTypes`
and moved to a separate constants module, to reflect that it contains
more than just hardware wallet keyring types. This corrects a mistake
made recently during a TypeScript conversion.
2023-03-21 12:13:22 -02:30
aleksandar-mihajlovic
a854cfdb93
Changed text for review spending cap copy (#18214) 2023-03-21 12:39:36 +01:00
Vladimir Saric
1d5e8a7840
Added fallback copy for when we're not able to retrieve a erc721 or erc1155 name in the setApprovalForAll screen (#17992)
* Added fallback copy for when we're not able to retrieve a erc721 or erc1155 name in the setApprovalForAll screen and added unit tests

* Fixing lint

* Review requested changes

* Modify small copy changes in messages.json

* Fixing nft e2e tests

* Fixing nft e2e tests final

* Added snapshots for tests and removed data-testid

* Modify translation messages and e2e tests
2023-03-20 18:05:48 +01:00
seaona
c940f744a5
[e2e] Using ganache requests to getBalance and getAccounts (#18215)
* Using ganache requests to get balances

* Replace getBalance getAccounts with ganache funcs

* Add secondary ganache server to testsuite
2023-03-20 10:29:18 +01:00
George Marshall
33a25cd6e9
Ignoring all storybook files from coverage check .stories.* (#18225) 2023-03-17 11:51:58 -07:00
Guillaume Roux
d6f58bceb0
[FLASK] snaps-monorepo@0.31.0 (#18142)
* allow SnapController to call `ApprovalController:updateRequestState` action

* combine popups

* show only autorship pill on result

* lint

* update `snaps-monorepo@0.31.0` and regen policies

* dedupe deps and fix fencing

* fix update button text

* fix fencing

* Update a bunch of e2es

* address requested changes

* update policy

* bump key-tree

* fix lint

* Update RPC E2E

* fix locales

* Remove wrong instance of window handle polling

* design changes and address pr comments

* remove unused imports

* fix lint

* fix fencing

* remove unused locales

* fence things

* re-add redirection

* bump test-snaps version

* Fix update e2e

* fix redirecting logic and address requested changes

* force update metamask state on approved

* move force update

---------

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2023-03-17 12:00:05 +01:00
Peter
e1ce248364
e2e test erc20 fixtures (#18154)
* add fixture

* update test

* update test

* wait for ETH balance
2023-03-17 09:55:52 +00:00
mirjanaKukic
2ccc51516b
add e2e test for onboarding flow (#15122)
* add e2e test for onboarding flow

* Add method to test if we create a new wallet

* fix code

* editng code

* Add test if import wrong SRP

* fix test

* add test where we chack if user select diffrent type of SRP

* update test for checking if user select different SRP

* update code

* add test for if user enter wrong password in confirm password field

* add two test to verify if user is on correct page after import wallet

* update cod

* lint fix

* fix code to test pass

* fix code

* improve code

* change completeCreateNewWalletOnboardingFlow function parameters and update code

* delete unnecessary wait

---------

Co-authored-by: dzfjz <120640011+dzfjz@users.noreply.github.com>
Co-authored-by: dzfjz <dzenana.fejzic-ext@consensys.net>
2023-03-16 16:03:03 +01:00
Davide Brocchetto
1482cd1c96
Fixed test instability (#18174) 2023-03-16 11:06:33 +01:00
Bowen Sanders
7a421e05c3
[FLASK] Snaps e2e test stability improvements (#18090)
* waitForSelector and pasteIntoField used now
2023-03-15 10:03:01 -07:00
Mark Stacey
bd23a49013
Revert "Moved subscribe and filter into network controller (#16693)" (#18129)
* Revert "Moved subscribe and filter into network controller (#16693)"

This reverts commit 6f6984fa58. That
commit was an RPC middleware refactor intended to move the subscribe
and filter middleware into the network controller, to simplify the
process of sharing this middleware between clients.

This refactor resulted in `eth_subscribe` notifications being sent on
the wrong connections, causing the UI to break in some cases (the UI
`provider` connection does not support notifications). This happened
because the `setupProviderEngine` function runs per-connection,
whereas the engine setup inside the network controller is global. The
global network client cannot support notifications because it has no
way to route them; they'll need to stay in the per-connection provider
engine.

Closes #17467

* Add e2e test

An e2e test has been added that confirms subscriptions are only
broadcast to the site that registered them. This test fails on
`develop`.
2023-03-15 12:16:31 -02:30
Peter
7215fc25a4
Move nft e2e tests to main e2e test job (#18055)
* NFTs: Remove feature flag for release

* Update security tab jest test

* Fix broken test

* Update snapshot

* Update test

* Fix test

* remove nft build

* move tests to main e2e job

* remove nft scripts

* remove test for nft build

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2023-03-14 15:21:24 +00:00
vthomas13
bfefa35811
Adding NFT autodetection to "What's New" Announcements (#17653)
* adding base what's new for NFT autodetection

* lintfix

* Adding nfts svg image

* adding new notification to fixture builder for e2e

* lint:fix

* Adding new messaging, styling what's new

* styling descriptions, increasing fullscreen height

* applying firstNotification styling to NFT whats new announcement

* adding scrollDown button to whats new popup

* adding Opensea announcement, removing old announcement, moving scrollDown button up to popover component

* verify-locales:fix

* updating icon
2023-03-14 11:07:58 -04:00
seaona
93be4810b9
Fix typo on test file (#18124) 2023-03-14 12:48:14 +01:00
seaona
b8ec3623ff
[e2e] ENS test improvement - with network controller fixture (#18119)
* With network controller fixture

* fix lint
2023-03-14 12:47:54 +01:00
flexa-rob
e7527b65ee
17921 Update TransactionAlerts with BannerAlert (#17940)
* use banner alerts

* update selector for banner alert content

* lintage

* update button click for banner alert structure

* bump global branches coverage target

* removed unnecessary Typography usage

* remove Typography usage

* transaction alerts story

* pending transaction alerts

* created separate stories for each alert scenario
2023-03-13 12:29:10 -07:00
Vladimir Saric
14b1555ee3
Display internet protocol on the domain in SIWE screen (#18052) 2023-03-13 21:40:43 +04:00
Peter
0fca0e3542
Use deployed contracts in fixtures (#18107)
* substitute smart contact address in fixtures

* add smart contract fixtures

* rename fixture

* leverage fixture to import erc1155

* leverage fixture to import erc721

* fix flaky test
2023-03-13 14:31:14 +00:00
chloeYue
11c79dd629
Add e2e tests approval for all for erc1155 token (#18047)
add tests approval for all
2023-03-10 15:04:45 +01:00
David Walsh
d6e61e9d07
Fix #17948 - Allow editing of NFT sends (#17970) 2023-03-09 15:02:08 -06:00
Alex Donesky
23ca4460cf
Migrate network configurations (previously frequentRpcListDetail) from PreferencesController to NetworkController (#17421) 2023-03-09 15:00:28 -06:00
seaona
8e9fe07648
[e2e] Check ENS resolves correctly (#18056)
* ENS resolves correctly

* Fix flaky test on firefox
2023-03-09 14:37:29 +01:00
Jyoti Puri
0ac54e40ee
Extract out confirm-data and confirm-hex-data components from confirm-transaction-base.component.js (#17822) 2023-03-09 10:38:37 +05:30
David Walsh
de83546d6d
Fix #17932 - Ensure NFT last sold price is formatted correctly (#17983)
* Fix #17932 - Ensure NFT last sold price is formatted correctly

* Fix storybook

* Update snapshot to include pricing
2023-03-08 14:39:12 -06:00
Hassan Malik
7086494b72
[FLASK] BREAKING - snaps-monorepo@0.30.0 (#17718)
* updated snap permission to wallet_snap, updated tests and added migration

* updated snap packages

* yarn.lock fix

* fixed errors

* override policy

* update policy

* undo override

* updated localization message descriptions

* updated lavamoat policy

* more policy updates

* update permission controller version

* update policy

* update fixture builder

* updated code to include permission value to satisfy wallet_snap permission description call

* fix import issue

* update test-snaps version

* added missing actions, added snap permission dedupe function

* prettier fix

* fix fencing

* add more fencing

* prettier fix

* fix fencing (again)

* added new action and selector and updated view snap accordingly

* update test snaps website version

* unfence request variable

* add fencing

* add optional chaining to fix type error

* update migration #

* remove old migration

* prettier fix

* fix migration test

* fix fencing

* added missing fencing

* updated code to workaround fencing

* update test-snaps site version and remove snap confirm test

* update snap packages

* update policies

* fix merge marker issue

* update test

* more fixes

* fix permissions

* update test

* fixed test

* Bump test-snaps and iframe-execution-environment

* remove unused snap permission from fixture builder

* update policies

* undo comment removal, update selector implementation

* removed unnecessary function, updated migration, updated caveat action

* remove optional chaining

* fix type issue

* more type fixes

* fix migration test

* remove isFlask check, make migration logic more robust

* update coverage

* Update LavaMoat policies

* Update test/e2e/snaps/enums.js

* add extra bail condition

* Revert "add extra bail condition"

This reverts commit b45c53dcfc6e6e35a5e283d4955d6d6ea9ca5965.

* Revert "Revert "add extra bail condition""

This reverts commit cd2ded677935c9cdab0c02b6af55474c83727f60.

* fix test

* add SnapController entry to state object

* updated permission name and caveat type with hardcoded values

* add extra test for non-flask scenario

* update lavamoat policies

* fix locale messages

* change coverage target

* re-enable rpc snap test

* revert locale message change

* fix el message

* reverted changes

---------

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2023-03-08 13:29:23 -05:00
dzfjz
3a3e34a8c6
Test for transaction security provider (#18000)
* Removed a feature flag

* Add test for transaction security provider

* add rest of the test cases for transaction security provider

* change code

---------

Co-authored-by: Filip Sekulic <filip.sekulic@consensys.net>
2023-03-08 18:48:57 +01:00
witmicko
75801e9502
delay chain validation (#17413) 2023-03-08 16:33:27 +00:00
Danica Shen
b231b091b9
fix(17542): fix fiat currency display in few txn actions (#18011)
* fix(17542): fix fiat currency display in few txn actions

* fix(17542): refactor e2e tests to change to fia via fixture builder
2023-03-08 16:05:55 +00:00
Peter
5c30fee59a
remove extraneous arg from clickElement (#18050) 2023-03-08 13:17:56 +00:00
Thomas Huang
38e2a25690
E2E custom rpc test fix (#17918) 2023-03-07 14:24:01 -08:00
Davide Brocchetto
03732af6f4
Added e2e swap test and fixed mocked API (#17934)
* Added test for submitting second swap without waiting for first one to finish

* Added more test code

* Removed look around Review Swap button

* Added test verification for the transaction details

* Changed mocked API for token import

* Added assert error messages

* Fixed lint errors

* Removed empty lines and improved coding consistency

* Removed empty lines
2023-03-07 16:51:15 +01:00
Thomas Huang
786a74dbbc
Fix nft test state (#17981) 2023-03-07 08:46:02 -06:00
weizman
f46ce9f2bd
Improve downloads tests (#17995) 2023-03-07 02:00:52 +02:00
chloeYue
c8e8db2666
Stabilize nft e2e tests (#18006) 2023-03-06 15:18:09 -06:00
HowardBraham
694773f17a
Upgrading the Import Account modal (#17763)
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: NidhiKJha <nidhi.kumari@consensys.net>
Co-authored-by: montelaidev <monte.lai@consensys.net>
2023-03-06 09:48:28 -08:00
chloeYue
4e807a967a
e2e test view erc1155 details (#17942) 2023-03-06 16:04:53 +01:00
Danica Shen
47d9964a89
fix(17857): show correctly converted account balance in sign&encrypt windows (#17973)
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2023-03-04 12:14:20 +00:00
Erik Marks
90ae4980b3
Update snaps locale messages for casing and content (#17915)
* Update snaps locale messages for casing and content

* Fix non-English locales

* udpate e2e test

---------

Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
2023-02-28 19:21:33 +01:00
chloeYue
9e7bc210a2
Add e2e test remove erc1155 token (#17925)
* add e2e test remove erc1155 token
2023-02-28 15:25:18 +01:00
chloeYue
5419f9414c
Add unhappypath test case for importing ERC1155 (#17923)
* add unhappypath test case for importing ERC1155 token
2023-02-28 15:23:06 +01:00
Bowen Sanders
e015e027b6
[FLASK] Create E2E test for cronjobs (#17365)
* added long test

* Wait for a maximum of 65 seconds, not a hardcoded length

* Fix lint

---------

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2023-02-28 14:07:00 +01:00
Mark Stacey
e223348fb3
Update eth-json-rpc-middleware from v9 to v10 (#17591)
This release only includes one breaking change, which is the renaming
of the package to be under the `@metamask` scope. It includes
improvements to the types that will unblock migrating our network
clients to TypeScript.
2023-02-27 13:19:08 -03:30
Thomas Huang
ddbd158e79
ERC1155 Import & Dapp interaction E2E tests (#17885) 2023-02-27 10:48:41 -06:00
Filip Sekulic
932282e638
What's new - OpenSea security provider (#16831) 2023-02-27 10:20:22 -06:00
Niranjana Binoy
bc19856d5d
Transaction-list-item-details pop up to display the correct token information on token approve item (#17422) 2023-02-24 14:21:55 -05:00
Jyoti Puri
1c0ff8a6e8
Fix state in confirm transaction (#17838) 2023-02-24 22:37:26 +05:30
Mark Stacey
2ccc1977bf
Update the PhishingController to v2 and update phishing warning page (#17835)
The PhishingController has been updated to v2. This release should
dramatically reduce network traffic and double the update speed of the
phishing list.

This was accomplished by combining both of our phishing configurations
into one list (the "stalelist"), then creating a separate list of the
changes just the past few days (the "hotlist"). Now users will download
a smaller list more frequently (every 30 minutes rather than every
hour), whereas the full list is only updated every 4 days.

The combined configuration means that we no longer know which list was
responsible for each block. The phishing warning page has been updated
to dynamically look this information up, to ensure users are still
directed to the correct place to dispute a block. This update to the
phishing warning page also includes the recent redesign.
2023-02-24 11:39:00 -03:30
chloeYue
ababfec767
Add e2e test view nft details (#17852)
* e2e view nft details
2023-02-24 15:34:32 +01:00
chloeYue
a93a3d4966
e2e test remove nft (#17896) 2023-02-24 15:32:50 +01:00
João Tavares
bde74756d3
Add extension desktop UI (#17748)
* feat: add desktop enable button component

This component will be added
to the experimental page. Users
will then be able to initialize
a desktop connection

* feat: add desktop pairing page

* feat: add desktop deep-linking shared lib

* test: add initial entries to render helper

Allow specifying initialEntries for
MemoryRouter. This change will allow
testing pages that use the useParam
hook.

* feat: add desktop error page

Error page for any desktop pairing
related issue

* feat: add desktop routes to route component

* feat: add enable desktop button to experimental tab

* feat: add desktop icon when paired in dev mode

* feat: disable ledger live control when desktop enabled

* feat: register desktop error actions on ui init

* fix: add missing code fencing

* chore: remove enable desktop rpc middleware

Now that we are adding the UI
there's no need for this rpc middleware
(as it was used to test desktop background
code)

* fix: display experimental tab for desktop
2023-02-23 16:39:48 +00:00
Peter
32b9237df3
Capture all Error console.log events (#17710)
* Capture all Error console.log events

* throw early

* Update metamask-ui.spec.js

* Update init-load-stats.js
2023-02-23 14:27:36 +00:00
chloeYue
84aff7c517
Add e2e test sign in with ethereum (#17823)
* add e2e test siwe
2023-02-21 22:55:47 +01:00
David Walsh
1e5f9da592
MenuItem: Fix layout of menu item with subtitle (#17650) 2023-02-21 09:50:54 -06:00
David Walsh
24e0a9030b
UX: Move Portfolio link to its own button (#17722) 2023-02-21 09:32:08 -06:00
Matthew Walsh
cc99a25228
Add desktop support (#17683)
Use DesktopManager in background script to redirect internal and external connections to the desktop app.
Include DesktopController in the MetaMask controller.
Support desktop keyrings in MetaMask controller via the overrides object.
Create middleware handler to connect to the desktop app while UI code is pending.
Add build system support for desktop specific configuration variables.
2023-02-20 17:13:12 +00:00
Nidhi Kumari
33cc8d587a
NFT: Replaced all the instances of collectibles with NFTs (#17741)
* replaced all the instances of collectibles with nfts

* updated actions

* updated e2e seeder

* updated confirm Approve test

* updated test dapp change

* updated test dapp change

* nit fix

* nit fix

* updated casing and snapshots

* updated casinG

* added migrations

* updated ,igration

* updated 078.test

* updated tests for 078 migration

* updated migration

* updated 078 index.js
2023-02-17 00:53:29 +05:30
David Walsh
4dcb639652
UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-02-16 07:26:14 -06:00
Maarten Zuidhoorn
f20d5db1e4
[FLASK] Temporarily disable JSON-RPC snap e2e test (#17778)
* Temporarily disable JSON-RPC snap e2e test

* Update outdated snapshot
2023-02-16 10:35:11 +01:00
David Walsh
fca2a3f97f
UX: Update three-dot icon for settings (#17558) 2023-02-15 08:39:46 -06:00
Thomas Huang
4735978b8d
Removal of enzyme pkge dep (#17261)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-02-14 12:14:00 -06:00
Elliot Winkler
c36438868d
Disable typechecking while running Mocha tests (#17701) 2023-02-12 14:34:35 -07:00
amerkadicE
1ecf241a9f
Rename reset account settings (#17457)
* Rename reset account settings

Fix snapshot

Update snapshots

Fix e2e tests

Fix e2e tests

* Rename reset-account e2e test to clear-activity e2e test
2023-02-10 22:50:12 +01:00
Peter
c00f74e95e
e2e multiple reports (#17715)
* multiple reports

* fix run all

* clean up report
2023-02-10 19:34:01 +00:00
Nidhi Kumari
9b0e71f27f
Updated messages/strings to replace Collectibles with NFTs (#17659)
* updated json files to use NFT

* Update locale strings

* fixed lint errors

* updated json files

* updated removeCollectibleMessage and newNftAddedMessage

* updated test for nfts
2023-02-10 21:06:58 +05:30
Dan J Miller
c3100d8fe4
Ensure simulation failure warning is shown on all networks and accounts (#17458)
* Ensure simulation failure warning is shown on all networks and accounts

* Add e2e test to cover failure warning behaviour on non-eip-1559 network

* Fix new e2e test
2023-02-10 11:45:54 -03:30
seaona
1dbacc2826
e2e Send to Multisig Wallet (#17565)
* e2e Send to Multisig Wallet

* Update test-dapp dependency to 5.4.0

* Added test-dapp update version to yarn lock

* disable ff

---------

Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
2023-02-10 15:35:45 +01:00
Elliot Winkler
7e97ff2be4
Expand network controller unit test coverage (#17498)
The network controller has some tests, but they are incomplete and don't
follow our latest best practices for writing unit tests.

This commit greatly increases the amount of test coverage for the API
that we want to retain in NetworkController, in particular the seemingly
myriad paths that the code takes starting from `initializeProvider`,
`resetConnection`, `setRpcTarget`, `setProviderType`,
`rollbackToPreviousProvider`, and `lookupNetwork`.

There were a couple of pieces of logic I noted which don't seem to have
any effect due to being redundant or unreachable, but they also don't
make our lives more difficult, either, so I opted to leave them in.

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Zachary Belford <belfordz66@gmail.com>
2023-02-08 13:10:04 -07:00
Nidhi Kumari
3be1fc6d0c
converted collectibles files to nfts (#17658)
* converted collectibles files to nfts

* updated relative import for scss

* updated scss for pages
2023-02-08 20:04:56 +05:30
Peter
523c90ade9
E2e test insights (#17535) 2023-02-08 08:34:44 -06:00
Ariella Vu
b5c1de900d
Refactor ConfirmTransaction to Functional Component (#17473)
* ConfirmTransaction: rm unused metricEvent context

* ConfirmTransaction: rm unused mapToProps props:
- unapprovedTxs
- id

* ConfirmTransaction: convert to FC

* ConfirmTransaction: use const ORIGIN_METAMASK

* ConfirmTransaction: rm mapStateToProps

* ConfirmTransaction: mv confirm-transaction ducks

* ConfirmTransaction: mv getContractMethodData duck

* ConfirmTransaction: rm container file

* ConfirmTransaction: use ORIGIN_METAMASK const

* ConfirmationTransaction: add tests

* ConfirmTransaction: update jest mock after merge

* tests: update snapshot after mock-state updates
2023-02-08 18:00:25 +07:00
chloeYue
82983694fe
Add e2e test: send nft (#17638)
* add e2e test send nft
2023-02-07 23:34:04 +01:00
Thomas Huang
14efbf1eea
Collectible Unit Tests (#17632)
* Add ipfs gateway and collectible state to mock-state.json

* Add collectible-default-image test with snapshot and testids

* Add Collectible Details test, snapshot, and test-ids

* Add Collectible Options tests and test-ids

* Add Collectible Items test and test-ids.

* Add more tests to Add Collectible component

* Update Security Tab snapshot with ipfs gateway state value

* Add data-testid to Menu component for menu background

* Lint

* Bump coverage targets

* Remove commented import

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2023-02-07 12:06:37 -06:00
Bowen Sanders
0ffd548ff9
[FLASK] Create E2E test for RPC endowment (#17525)
* create e2e test
2023-02-06 09:54:07 -08:00
Harry
b4ecc4c3f5
Disable eth_sign by default, allow users to toggle it back on (#17308)
* Added translation for eth sign toggle

* Disabled the ability to call eth_sign by default. Added ability within advanced settings to renable support for eth_sign

* Add test case for eth_sign being enabled and disabled

* Modified copy

* Moved rpc method preference to its own object within store

* Complete work on moving rpc method preference into its own object within store

* Fix with prettier

* Fix lint

* Fix a unit test

* Fix test

* Renamed function and object keys to be more intuitive

* Fix e2e test

* Enabled eth_sign through preferences fixture

* Fix lint

* Fix e2e test

Wait for the notification popup to close, leaving 2 window handles the extension and the test dapp

* Fix e2e test

* Fix unit test

Enable eth_sign method

* Lint fix

---------

Co-authored-by: PeterYinusa <peter.yinusa@consensys.net>
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2023-02-06 13:17:50 -03:30
Brad Decker
14f3e16991
decrease coverage threshold that requires bump (#17544) 2023-02-02 16:43:55 -06:00
Danica Shen
f3c00c65d0
fix: fix non-critical warning in tests (#17567) 2023-02-02 20:37:53 +00:00
chloeYue
024ff1e384
Add e2e test: import nft (#17543)
* add e2e test import nft
2023-02-02 20:01:41 +01:00
chloeYue
812b57dcaf
Add e2e test: add custome network during onboarding (#17436)
* e2e test add custome network during onboarding
2023-01-31 13:58:39 +01:00
ryanml
8a7c897a1c
Update copy when revoking setApprovalForAll (#17500) 2023-01-31 04:27:41 -07:00
Peter Yinusa
245c32a99e
Nft build for e2e tests (#17430) 2023-01-27 12:45:35 -06:00
Dan J Miller
7a77c82514
Use network provider state, instead of CurrencyRateController state, to select 'nativeCurrency' (#17450)
* Use network provider state, instead of CurrencyRateController state, select 'nativeCurrency'

* Fix unit tests

* Lint fix

* Only use the network provider ticket for the native currency when useCurrencyRateCheck is false

* Fix unit test

* Fix tests for real
2023-01-27 13:47:47 -03:30
dzfjz
abb2532a3b
[e2e]Add e2e test for deleting custom network (#17254)
* add test for deleting added custom network

* update code because of failing on firefox browser

* changing steps for adding custom network

* chage code for custom network
2023-01-27 16:50:08 +00:00
David Walsh
29d4799f46
Fix #17388 - Remove dismiss button from NFT notification (#17389) 2023-01-25 13:28:15 -06:00
Daniel
a4f968b423
Remove a notification for falling back from STX to regular swaps (#17374) 2023-01-25 20:01:10 +01:00
Niranjana Binoy
129a06cc12
Copy update on Transaction breakdown for ApproveToken (#17296) 2023-01-25 10:15:58 -05:00
weizman
4a57d994c7
Activate LavaMoat scuttling security feature (#17276) 2023-01-24 19:00:35 +02:00
amerkadicE
dd09245ff6
Fix/use etherjs specific imports (#15461)
* replace ethers with submodules

Co-authored-by: Alex <adonesky@gmail.com>
2023-01-24 08:10:36 -06:00
Brad Decker
d2c3abea51
Refactor Errors E2E test to no longer rely upon a real error (#17332)
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
2023-01-23 12:58:35 -06:00
Vladimir Saric
f988dc1c5e
Enable the Token Allowance flow by default for all users (#16740) 2023-01-23 21:49:55 +05:30
Jyoti Puri
3e523e2382
Use PageContainerFooter to render footer on all confirmation pages (#17316) 2023-01-23 20:52:12 +05:30
David Walsh
cb6ee2b3fe
Use async/await instead of Promise.resolve (#16221) 2023-01-20 14:20:18 -06:00
ryanml
a19a5d60d3
Convert shared/constants/hardware-wallets.js -> Typescript (#17310) 2023-01-20 09:14:40 -06:00
Brad Decker
5f6d2ba6b0
Convert Transaction constants to typescript (#17149) 2023-01-18 08:47:29 -06:00
weizman
6d551f10fe
Update LavaMoat (core/lavapack) (#17061) 2023-01-18 14:35:37 +02:00
Thomas Huang
4c3c4eebac
Final conversion of tests from enzyme to @testing-library/react (#16862)
* Add transaction activity log component

* Remove duplicate tx activity log snapshot.

* Convert Advanced Tab to tlr.

* Lint fix

* Change ENS to DNS in mock state data.

* Add test ids for speedup, cancel, rety buttons.

* Convert TransactionListItemDetails component to RTL.

* Convert PageContainerHeader component to RTL.

* Convert TokenInput component to RTL.

* Convert UnitInput component to RTL.

* Convert withModalProps to RTL.

* Convert i18n-helper to RTL.

* Convert ConfirmSeedPhrase component to TLR.

* Convert AddRecipient component to RTL.

* Set process.env metamask build type to 'main' for test

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
2023-01-17 07:51:35 -08:00
Niranjana Binoy
a0bb4a6c5a
Toggle option to enable/disable balance and Token rate checking for using third-party API (#16772) 2023-01-17 10:23:04 -05:00
David Walsh
7760f4d658
Remove ONBOARDING_V2 flag for release (#16865)
* Remove ONBOARDING_V2 flag for release

* Remove new usage

* Update e2e tests

* Update incremental-security.spec.js

* Fix lint

Co-authored-by: PeterYinusa <peter.yinusa@consensys.net>
2023-01-13 10:25:01 -06:00
Frederik Bolding
f6f691190d
Fix Snaps E2E test flake (#17174) 2023-01-13 15:10:47 +01:00
Bowen Sanders
4c8faaba48
[FLASK] Create E2E test for snap_dialog (#17111)
* added dialog e2e test
2023-01-12 09:25:46 -08:00
Brad Decker
312f24fddc
allow importing of typescript in E2E test suite (#17141) 2023-01-12 08:38:12 -06:00
Bowen Sanders
1b62a773b4
[E2E] Change to replace confirm snap to dialog snap (#17146) 2023-01-12 15:29:29 +01:00
Brad Decker
64839b6bf7
split unit tests (#16455)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-01-11 12:23:38 -06:00
Bowen Sanders
f2da79f563
[E2E] Fixes to try to deflake Snaps E2E tests (#17123)
* added delays in several places

* fix to update test
2023-01-10 11:11:15 -08:00
Filip Sekulic
e6038d542a
Update UI for transaction security check in settings (#16830) 2023-01-04 15:59:48 -06:00
weizman
3cf5ef642f
Revert "Integrate new LavaMoat scuttling protection feature (#16994)" (#17043) 2022-12-22 17:26:53 +02:00
chloeYue
d66db28ae6
Add e2e test for reset account (#16996)
* add test for reset account
2022-12-22 14:16:09 +01:00
weizman
5d320ceec6
Integrate new LavaMoat scuttling protection feature (#16994)
Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: kumavis <aaron@kumavis.me>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-12-21 12:54:30 -06:00
Frederik Bolding
7e7a0f1f72
[FLASK] Use custom UI for transaction insights (#16912)
* Allow custom UI for transaction insights

* Fix margin

* Small fixes to CSS and selectors

* Rename property

* Fix E2E locally

* Bump test-snaps

* Bump test-snaps
2022-12-20 11:44:49 +01:00
Olusegun Akintayo
13de51e748
Security and Privacy Settings Re-org (#16756) 2022-12-19 18:46:36 +01:00
mirjanaKukic
0992dd5437
added new test for adding custom network (#15484)
add custom network and switch to network

lint fix

add custom network and not switch the network

add wait for selector

lint fix

fix

add waitforselector

fix

yarn lock

added delay

added comments

lint fix

added rpc networks in mock-e2e.js

lint fix

fix

yarn lock

alphabetic order of the array in mock-e2e

fix

lint fix

fix

removed unnecessary networks

changed blacklistedHosts

added fixture builder

changed to Arbitrum One network
2022-12-19 16:46:07 +00:00
legobeat
7bdb91c089
test/e2e: increase timeout 60s -> 80s (#16592) 2022-12-19 09:27:47 -06:00
Dan J Miller
074c2934fe
remove warning on revoke approval for all nfts (#16953)
Co-authored-by: EresDev <eresdev@hotmail.com>
2022-12-16 22:37:18 +05:30
Dan J Miller
0792e4ebbc
Recipient name passed to confirm-page-container component should be u… (#16961)
* Recipient name passed to confirm-page-container component should be used if pet name exists for the to address

* Ensure recipient edit/add popup is shown for non-owned accounts

* Ensure contract name is rendered if it exists for recipient address

* Ensure that shortened address is last fallback after account, addressbook, token and ens names
2022-12-15 13:03:59 -03:30
Mark Stacey
5857b85225
Add e2e debugging logs (#16937)
A `debug` flag has been added to our e2e test runner scripts, enabling
e2e debug logs. When this flag is enabled, all driver interactions will
be logged to the console. This is extremely useful when debugging e2e
tests, because it lets you known how far the test had progressed before
failing.

This flag should work with all existing e2e test scripts, including
both `test:e2e:single` and all of the test commands that run entire
test suites.

The README has been updated to reference this flag in the section
regarding how to run a single e2e test. To ensure this wasn't totally
missed for the other scripts, I added a line suggesting that users use
`--help` to see all supported options.
2022-12-13 16:00:47 -03:30
Daniel
c7ceb91d00
Update an E2E test with a mock (#16935) 2022-12-13 10:31:32 -03:30
Bowen Sanders
720c7e7d16
initial deflakery (#16894) 2022-12-12 12:14:23 -08:00
Bowen Sanders
7e7be2769d
[FLASK] Create E2E test for tx-insights (#16785)
* Created an E2E test for tx-insights.

Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
2022-12-08 12:15:59 -08:00
Jyoti Puri
8125473dc5
Removing flag for EIP1559 V2 support (#16446) 2022-12-09 00:07:06 +05:30
ryanml
a759d427f0
Remove new address alert (#14811)
* Removing new address alert

* remove unused copy

* fix broken e2e test

* rework layout nesting

* satisfy lint

* change layout to fix firefox tests

* change selector specificity on e2e test

* revert test change after fix has been merged from develop

* fix linting

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
2022-12-08 14:20:24 +00:00
Peter Yinusa
c9b42fc966
force background exceptions to show (#16860)
* force background exceptions to show

* fix type
2022-12-08 12:58:34 +00:00
amerkadicE
8885c54f13
NFT setApprovalForAll warning popover (#16195)
* NFT setApprovalForAll  warning popover
2022-12-06 14:24:07 -06:00
Thomas Huang
8fde322907
Continue converting tests from enzyme to @testing-library/react (#16753) 2022-12-06 10:49:08 -06:00
Vladimir Saric
9ede85c9ac
Updated secondary copy and removed the address component from SetApprovalForAll and NFT Approve screens (#16292) 2022-12-05 10:59:15 -06:00
Alex Donesky
05ab94fd1c
Add security & privacy "What's New" message (#16783) 2022-12-02 17:59:41 -06:00
amerkadicE
80e4a1fef4
Update signature request screens (#15776)
Fix e2e test

Update siteicon for v4 signature type

Code refactor

Code refactor

Remove origin and address in signatrue request

Update e2e tests

Use getNetworkName function

Move header component inline jsx

Update snaps
2022-11-30 19:11:36 +01:00
amerkadicE
dd0844e200
Add signature request warning modal (#16225)
* Add signature request warning modal

Fix e2e tests

Fix e2e tests

Remove warning message from eth sign request

Remove unused locales

Fix e2e test

Fix e2e test

* Run pipeline

* Fix locales:
?

* Add unit tests
2022-11-30 16:34:50 +01:00
HowardBraham
b1fd7f7796
Fixes 'yarn start' on Windows - LavaPack is not defined (#13318) (#16550)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2022-11-30 09:19:45 -06:00
Bowen Sanders
0e1c385cd0
[FLASK] Create E2E test for snap management (#16628)
* added management test

* added id and dismiss alert function

* changed xwindow handling

* fixed linting
2022-11-30 14:12:09 +01:00
Frederik Bolding
dfb6210910
[FLASK] snaps-monorepo@0.25.0 (#16673)
* snaps-monorepo@0.25.0

* Regen LavaMoat policies

* Bump test-snaps

* [FLASK] Add Snaps JSON-RPC handler permission (#16670)

* Add Snaps JSON-RPC handler permission

* Add copy and icon

* Fix test

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
2022-11-30 13:19:33 +01:00
Thomas Huang
119219b5d2
Continue converting tests from enzyme to @testing-library/react (#16458)
* Add transaction activity log component

* Remove duplicate tx activity log snapshot.

* Convert Advanced Tab to tlr.

* Lint fix

* Convert Settings Tab test to tlr.

* Convert Send Amount Row test to tlr.

* Convert Send Row Error Message test to tlr.

* Add Mock Send State json file.

* Lint fix

* Use proper testid for jazz icon for settings e2e

* Update Send Amount Row snapshot
2022-11-29 07:42:59 -08:00
dragana8
2680340e27
Unable to proceed with tx bc of inaccurate/overly aggressive "Insufficient funds for gas" warning #13087 (#14634)
Co-authored-by: VSaric <vladimir.saric@consensys.net>
2022-11-28 10:41:42 -06:00
seaona
f44af06f9b
[e2e] Setup MV3 specific test folder and add 1 simple testcase introducing Service Worker re-start (#16606)
* First e2e mv3 specific dapp testcase

* Fix testpath for snaps

* Update `it` description

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* e2e test paths improvement

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2022-11-25 12:06:48 +01:00
seaona
6c00785271
Mitigate flaky test with the use of new function (#16655) 2022-11-24 19:10:07 +01:00
seaona
6dddd246d1
[e2e] [MV3] Fix Add Account e2e flaky test for MV3 build (#16603)
* Wait until element is not present

* Wait for non empty element on add account test

* Wait for non empty element for all instances of get account text

* Point to account value directly

* Add accounts as const
2022-11-24 19:09:54 +01:00
David Walsh
266d7d93d5
Fix #15050 - MV3: Keep the user logged in when service worker restarts (#15558) 2022-11-23 18:49:24 -06:00
Frederik Bolding
dd20281372
Fix E2E chunking (#16653)
* Fix E2E chunking algo

* Use different algo
2022-11-23 15:21:19 +01:00
George Marshall
5ee7da6afe
Adding FormTextField component (#16497)
* Adding FormTextField component

* Adding to index.js

* Adding id, label and helptext stories

* Removing unneeded htmlFor and fixing accessibility on helpText story

* Fixing issues with review suggestions

* Fixing lint issue

* Adding snapshot test
2022-11-22 13:04:27 -08:00
Frederik Bolding
de955f3faa
[FLASK] snaps-monorepo@0.24.1 (#16525)
* snaps-monorepo@0.24.0

* Fix imports and regen LavaMoat policies

* Bump iframe-execution-environment

* Fix tests

* Add permissions

* Bump patch

* Bump test-snaps

* [FLASK] Fix update e2e test to catch snaps with caveats (#16546)

* changed snap to update to bip32

* small changes to test

* Fix lint

* Fix E2E

* Update copy

* Update icon

Co-authored-by: Bowen Sanders <bowensanders@gmail.com>
2022-11-22 13:07:08 +01:00
seaona
ff25d44d98
[e2e] [MV3] Fix Custom RPC e2e test failures for MV3 build (#16599)
* Wait until element is not present

* Change selector network ticker

* Wait for loading overlay to disappear
2022-11-21 20:04:03 +01:00
Filip Sekulic
c87a4f5968
Replace the address in SignTypedData_v4 signatures with a 'Verify contract details' link (#16191) 2022-11-21 11:19:49 -06:00
David Walsh
9530797a7a
Create constants for all keyring types (#16575) 2022-11-21 08:23:35 -06:00