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

17773 Commits

Author SHA1 Message Date
Dan J Miller
75377cf890
Update CHANGELOG.md
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2023-08-01 19:52:18 -02:30
Brad Decker
038eb63eb0
Upgrade to yarn 4 (#20249) 2023-08-01 17:19:19 -05:00
Pritam Dhara
5b5ca4599e
Replaces SEVERITIES const with Severity enum in BannerAlert (#20200)
* Replaces SEVERITIES const with Severity enum in BannerAlert

* Replaced SEVERITIES with Severity in banner-alert.constants.js

* Used BANNER_ALERT_SEVERITIES instead of SEVERITIES in banner-alert.stories.js

* Updated README for usage of Severity instead of SEVERITIES

* Updates to stories and docs link

---------

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-08-01 14:41:30 -07:00
jainex
d879f08763
Update ModalOverlay to use TS Box version (#20203)
* Update ModalOverlay to use TS Box version

* fix jest error

* lint error fix

* Fix lint errors and improve ModalOverlay's TypeScript typings

* Some small updates to story and docs

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-08-01 14:39:08 -07:00
Dhruv
d375dc550d
Part of #18714: Replacing deprecated constants (#19843)
* replacing constants

* updating ButtonLink component

* Updates to responsive typography

* lint fixes

* snapshot updates

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-08-01 14:37:16 -07:00
Pritam Dhara
067d385012
Replaced ActionableMessage Instances in edit-gas (#20196)
* Replaced ActionableMessage Instances in edit-gas

* Updated BannerAlert className

* Changed errorKey to errorMessage

* Removing CSS and restoring local key

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-08-01 14:21:42 -07:00
Dhruv
9b55791af7
fix/migrate AvatarAccount to TS (#20208)
* migrating AvatarAccount to TS

* updates

* reverting changes to diameter

* suggested changes

* adding explicit types for AvatarAccountDiameter

* updating documentation

* Some small updates to types

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-08-01 14:19:32 -07:00
Ashis Kumar Pradhan
512fdcae56
Replaced with new checkbox in ConnectedAccountsPermissions (#20228)
* Replaced with new checkbox in ConnectedAccountsPermissions

* removed a typo

* fixed linting issue

* Small updates to styles

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-08-01 14:17:19 -07:00
Brad Decker
4e083017d6
fix weird lockfile irregularities (#20333)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2023-08-01 16:10:52 -05:00
Gauthier Petetin
ee48d8f0b7
Fix/check pr labels (#20353)
* fix(action): default branch is develop, not main

* fix(action): add missing documentation
2023-08-01 18:06:59 -03:00
David Walsh
034626a57d
Fix ipfs-ens-resolution.spec.js E2E intermittent failure (#20311)
* Fix ipfs-ens-resolution.spec.js E2E intermittent failure

* Wait for URL change instead of large delay
2023-08-01 13:26:42 -05:00
Nidhi Kumari
4c37448c97
Added IPFS toggle (#20172)
* added ipfs toggle

* added placeholder valur

* fixed snapshot

* updated tests

* updated spec file

* hide input if toggle is disabled

* updated e2e tests for nft image

* fixed view-ercc-1155 spec

* updated e2e tests for nfts

* added ipfs toggle modal

* updated UI for ipfs

* updated tests

* updated classname

* added placeholder image

* lint fix

* removed prop ipfsEnabled and used with selector

* fixed ui for ipfs toggle

* updated test

* updated  test to handle cases

* nit fix

* ensure default image height match nft image
2023-08-01 23:51:51 +05:30
David Walsh
e27a9e4344
UX: Update Batch Account Setting Description (#20269) 2023-08-01 13:17:58 -05:00
David Walsh
7ca418de1f
UX: Cleanup of NetworkListMenu properties (#20304) 2023-08-01 13:17:48 -05:00
Daniel
24ca518315
Reset price ack if price diff in % changed, insufficient gas event, log a page load event once (#19961) 2023-08-01 18:18:14 +02:00
infiniteflower
10ffc1ec84
Chore/refactor smart swap modal (#20239)
* Add story for smart tx popover

* Use tsx for smart tx popover story and add btn to open it

* Refactor smart tx popover component to tsx and style

* Fix modal not triggering

* Remove bold from bullet points

* Adjust margins
2023-08-01 15:31:53 +02:00
Daniel
2ad2827bab
Redirect to homepage from Swaps asap without waiting for state cleanup (#20236) 2023-08-01 15:28:11 +02:00
Jyoti Puri
4e52fe2494
Adding metrics events for blockaid (#20091) 2023-08-01 16:59:41 +05:30
António Regadas
2b5c112a02
[MMI] swap button redirect when account is Custody (#20234)
* wip

* adds test

* add value to constants

* clean up
2023-08-01 11:17:36 +01:00
António Regadas
c92f3b32b2
hides the CancelSpeedupPopover (#20180) 2023-08-01 11:16:49 +01:00
witmicko
d11ef07ae1
solves 1114 (#20307)
* fixes 207
2023-08-01 07:04:23 +01:00
Thomas Huang
b9f647f478 [skip-e2e] Update changelog for v10.34.2 (#20238) 2023-08-01 00:17:20 -02:30
Mark Stacey
1ed8f99fdf Remove fallback phishing warning configuration (#20327)
* Remove fallback phishing warning configuration

The package `@metamask/phishing-controller` has been updated from v4
v6. The only breaking changes are a minimum Node.js version bump, and
the removal of the fallback phishing configuration.

The fallback phishing configuration was resulting in MetaMask being
incorrectly flagged as malware, and the stale config was causing
problems for sites that had been blocked in the past but have since
been unblocked. This should substantially reduce the bundle size as
well.

* Update LavaMoat policies

* Update test state to include example blocked site

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2023-08-01 00:17:07 -02:30
Mark Stacey
990dc33fc6
Remove fallback phishing warning configuration (#20327)
* Remove fallback phishing warning configuration

The package `@metamask/phishing-controller` has been updated from v4
v6. The only breaking changes are a minimum Node.js version bump, and
the removal of the fallback phishing configuration.

The fallback phishing configuration was resulting in MetaMask being
incorrectly flagged as malware, and the stale config was causing
problems for sites that had been blocked in the past but have since
been unblocked. This should substantially reduce the bundle size as
well.

* Update LavaMoat policies

* Update test state to include example blocked site

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2023-07-31 22:26:40 -02:30
Mark Stacey
36b1991b44
Fix prep-deps CI step (#20312)
The CI job `prep-deps` was broken in #20096 for forks and non-PR builds
(e.g. the `develop` branch builds). Non-PR builds were broken because
of the `set -u` flag, which complained about a PR-specific environment
variable being unset. Fork builds were broken because the draft check
relied upon secrets (which aren't included in CI runs on forks).

The script is now tolerant of missing environment variables, and skips
the draft check for forks.
2023-07-31 20:36:14 -02:30
Dan J Miller
6f0caf4d3f
Capture Sentry errors prior to initialization (#20265) (#20330)
* Capture Sentry errors prior to initialization

Sentry errors captured before/during the wallet initialization are
currently not captured because we don't have the controller state yet
to determine whether the user has consented.

The Sentry setup has been updated to check the persisted state for
whether the user has consented, as a fallback in case the controller
state hasn't been initialized yet. This ensures that we capture errors
during initialization if the user has opted in.

* Always await async check for whether the user has opted in

* Remove unused import

* Update JSDoc return type

* Remove unused driver method

* Fix metametrics controller unit tests

* Fix e2e tests

* Fix e2e test on Firefox

* Start session upon install rather than toggle

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2023-07-31 20:35:50 -02:30
Dan J Miller
d09f375b2c Fix migration 77 (#20276)
* Handle the case where tokensChainsCache data is undefined in migration 77

* Delete parts of state that should have been removed in migrations 82,84,86 and 88

* Create 077-supplements.md

* Update 077-supplements.md

* Update 077-supplements/*.js code comments

* Fix types and jsdoc

* Type/lint fix

* Cleanup

* Add 'should set data to an empty object if it is null' test case to 077.test.js

* Update app/scripts/migrations/077.test.js

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

* Modify deletion criteria so that all decimal chain id proprties are deleted in migration 88 supplement

* Readme.md

* Update app/scripts/migrations/077.test.js

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

* Update app/scripts/migrations/077.test.js

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

* Update app/scripts/migrations/077.test.js

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

* Lint fix

* Only delete decimal chain id keyed-entries in migration 88 supplement if there are hexadecimal keyed entries as well

* Remove redundant test

* Add 'does not delete' cases for nftcontroller related tests in 077.test.js

---------

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2023-07-31 20:01:15 -02:30
Dan J Miller
3b0d37c3bf
Fix migration 77 (#20276)
* Handle the case where tokensChainsCache data is undefined in migration 77

* Delete parts of state that should have been removed in migrations 82,84,86 and 88

* Create 077-supplements.md

* Update 077-supplements.md

* Update 077-supplements/*.js code comments

* Fix types and jsdoc

* Type/lint fix

* Cleanup

* Add 'should set data to an empty object if it is null' test case to 077.test.js

* Update app/scripts/migrations/077.test.js

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

* Modify deletion criteria so that all decimal chain id proprties are deleted in migration 88 supplement

* Readme.md

* Update app/scripts/migrations/077.test.js

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

* Update app/scripts/migrations/077.test.js

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

* Update app/scripts/migrations/077.test.js

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

* Lint fix

* Only delete decimal chain id keyed-entries in migration 88 supplement if there are hexadecimal keyed entries as well

* Remove redundant test

* Add 'does not delete' cases for nftcontroller related tests in 077.test.js

---------

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2023-07-31 19:43:51 -02:30
Mark Stacey
507c2cb475
Capture Sentry errors prior to initialization (#20265)
* Capture Sentry errors prior to initialization

Sentry errors captured before/during the wallet initialization are
currently not captured because we don't have the controller state yet
to determine whether the user has consented.

The Sentry setup has been updated to check the persisted state for
whether the user has consented, as a fallback in case the controller
state hasn't been initialized yet. This ensures that we capture errors
during initialization if the user has opted in.

* Always await async check for whether the user has opted in

* Remove unused import

* Update JSDoc return type

* Remove unused driver method

* Fix metametrics controller unit tests

* Fix e2e tests

* Fix e2e test on Firefox

* Start session upon install rather than toggle
2023-07-31 18:49:32 -02:30
Nicholas Ellul
db92bef002 Update @metamask/phishing-controller to v4.0.0 (#18840)
* Update phishing controller to v4.0.0

* Move phishing e2e test utilities into its own helper.js

* Update phishing detection e2e test

* Update MetaMask Controller test mocks

* Update mv3 phishing tests

* Fix test for 500 error on warning page

* Allow for directories in test folder

* Update migration number

* Linting fixes

* Remove fail on console error

* Separate mocks from helpers

* Have migration delete PhishingController state entirely

* Remove phishing detection directory

* Only delete the listState in migration

* Bump migration version
2023-07-31 17:55:48 -02:30
Peter
523b3145b2
[skip e2e] document transaction flows (#20259) 2023-07-31 19:10:50 -01:00
Peter
2daf002245
[skip e2e] document token flows (#20260) 2023-07-31 18:56:14 -01:00
Peter
2d412c21bb
[skip e2e] document phishing flows (#20264) 2023-07-31 18:55:33 -01:00
Brad Decker
e2e1a5fe07
Use node 18 (#20308)
* use node v18
2023-07-31 14:51:39 -05:00
cryptodev-2s
5df6a71cea
Use getKeyringsByType from core KeyringController (#20210) 2023-07-31 16:45:20 +01:00
Peter
d3236b3b42
[skip e2e] document ens flows (#20261) 2023-07-31 15:32:30 +01:00
Nicholas Ellul
b76875ac69
Update @metamask/phishing-controller to v4.0.0 (#18840)
* Update phishing controller to v4.0.0

* Move phishing e2e test utilities into its own helper.js

* Update phishing detection e2e test

* Update MetaMask Controller test mocks

* Update mv3 phishing tests

* Fix test for 500 error on warning page

* Allow for directories in test folder

* Update migration number

* Linting fixes

* Remove fail on console error

* Separate mocks from helpers

* Have migration delete PhishingController state entirely

* Remove phishing detection directory

* Only delete the listState in migration

* Bump migration version
2023-07-31 10:18:48 -02:30
Vinicius Stevam
252c7c1d6d
Remove unnecessary log from accept approval (#20233) 2023-07-31 11:06:18 +01:00
David Walsh
e6a4c63d51
Fix #19950 - Use removable property to determine if network should be removable (#20220) 2023-07-29 14:59:24 -05:00
Harsh Shukla
96e4b7bb9f
Replacing deprecated code in favor of component-library components (#20137) 2023-07-29 06:25:34 -07:00
David Walsh
f1af52cbdf Fix #20162 - Add Whats New for Global Menu (#20244) 2023-07-28 20:48:40 -02:30
David Walsh
0129ea913f
Fix #20162 - Add Whats New for Global Menu (#20244) 2023-07-28 20:48:22 -02:30
jainex
6546aad334
Replacing deprecated Popover with Modal (#19784)
* Replacing deprecated Popover with Modal

* Fix Jest error
2023-07-28 14:03:27 -07:00
cryptodev-2s
b576c5245c
Use getKeyringForAccount from core KeyringController (#20202) 2023-07-28 20:09:14 +01:00
Pedro Figueiredo
537f1c7aee
feat: implement swap event metric e2e test (#20129)
* implement swap event metric e2e test

* fix lint error

* clean up initial balance helpers

* fix eslint warnings

* Fix `token_to_amount` format to address firefox bug and refactor tests
2023-07-28 19:57:06 +01:00
Ashis Kumar Pradhan
280fd5f7ef
added deprecation message and comment in ui/check-box (#20226)
* added deprecation message and comment in ui/check-box

* Small adjustments to component name and story docs

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-07-28 11:26:16 -07:00
Gauthier Petetin
0c2519397d
feat: github action to check if PR has requested labels before being merged (#19984)
* feat(action): check if pr includes requested labels

* fix(action): add missing QA label

* fix(action): check if no label prevents merging

* fix(action): remove QA label check

* fix(action): add missing reopened condition

* fix(action): increase list of labels which prevent merges
2023-07-28 15:15:18 -03:00
Sylva Elendu
1a218714a6
Update transaction status to not be considered anonymous (#20049)
* update transaction status to not be considered anonymous

* fix failing e2e

* revert status changes in txn spec file

* Fix e2e by adding status

---------

Co-authored-by: Olusegun Akintayo <akintayo.segun@gmail.com>
2023-07-28 15:08:59 -03:00
David Walsh
0efc63784d
UX: Autofocus the Address field in Import NFT modal (#20225) 2023-07-28 12:29:39 -05:00
Peter
c741222f43
[skip e2e] document onboarding flows (#20262) 2023-07-28 17:28:10 +01:00