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

2252 Commits

Author SHA1 Message Date
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
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