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

6908 Commits

Author SHA1 Message Date
Monte Lai
af2c87d777
[FLASK] Add Snaps Keyring (#19710)
* flask - add restricted snap_manageAccounts

* snap keyring: use local snap keyring instead of package

* mvp snap-keyring

* fixed the easier lint errors

* fix missing permission text

* add removal function

* update snap keyring

* update dep

* update git link

* update messages and remove snap keyring from lib

* set snapprovider as soon as possible

* chore: update snap keyring dependency

* chore: pass SnapController to SnapKeyring constructor

* chore: update deps and comment line (wip)

* fix latest update for snaps and remove setController

* update yarn lock

* add routes

* add messages

* add message

* add snap account detail page

* add snap account card

* add snap account page

* update route

* add background

* use css grid

* update snap text styling

* fix lint

* remove unused import

* change manage link to go to snap

* add types for react-router-dom

* add link to settings

* add breadcrumb to header

* add popover

* add prop types

* add link to propTypes

* fix icon in header and tag

* update popover

* update yarn.lock

* add link to account list menu

* update from deprecated

* add add-snap-popup

* use popoverheader

* fix lint

* update to use modal instead of popup

* add install snap

* remove export of DeferredPromise

* change snap keyring to its own enum

* update imports and fences

* fix snapId and route

* fix header and button for snapCard

* hide app header on AddSnapAccountPage

* update icon

* match path to SnapAccountDetail

* set getting started button to close modal

* fix key prop warning

* add By Metamask message

* fix label

* add fence to snapkeyringtype

* update yarn.lock

* refactor removeAccount and static snap list

* update removeSnap

* feat: remove associated accounts when snap is removed

* add get snaps installed to snaps page

* fix updateAvailable

* add tests to ui components

* update test

* update scss

* udpate config snap popup style

* fixed https://www.notion.so/Show-pop-up-only-once-c6aa8494486a4ece8a5c5e35fea56ab5

* update accountListMenu click to open tab or push depending on environment

* update yark.lock

* remove unused uuid

* update lock

* update eth-snap-keyring

* udpate install from snap page

* update to install to use popup

* use release versino of eth-snap-keyring

* chore: bump snaps-utils version to `0.34.1-flask.1`

* update configure snap

* chore: update eth-snap-keyring

* chore: update policies

* fix: remove unused

* fix: fix snap-account-detail-page test

* fix: fix styles

* chore: remove swappable-obj-proxy

* fix: fix duplicate entry

* fix: disable export private key for snaps account

* feat: shuffle snap lists on every reload

* fix: configure not popping up

* refactor: snapsAddSnapAccountModalDismissal into action and selector

* fix: E2BIG when running prettier

* fix: lint default export or add-snap-account-modal

* fix: lint, remove vendor prefix

* fix: fix snapCreatedByMetamask to snapCreatedByMetaMask

* Add `manageAccounts` RPC method (#19724)

* Update dependencies

* Remove snap-keyring-permissions

* Update dependencies

* Update dependencies

* Update imports

* removed portfolio link from wallet view (#19716)

* removed portfolio link from wallet view

* removed unused code

* updated test

* updated spec file

* updated test

* Validate LavaMoat policies on each PR (#19703)

* Validate LavaMoat policies on each PR

The LavaMoat policies are now validated on every PR. This makes it
easier to validate policy changes, as they should always correspond
with the changes made in the PR (unlike today, when they could be due
to a change in platform or a previous PR).

Closes #19680

* Update LavaMoat policies

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>

* fix(action): add required permissions to remove labels (#19728)

* Fix dependencies

* signature approved metrics e2e test (#19628)

* Update dependencies

* Integrate Snow with LavaMoat scuttling protection (#17969)

* Update lavamoat policies

* Security Provider cleanup (#19694)

* security-prov: isFlaggedSecurityProviderResponse

* security-prov: create shared/modules/util

* security prov: rn isFlagged -> isSuspcious
- util fn returns true if response is not verified and flagged

* security prov: add util test
and support undefined param

* security prov: reorg util fn
- no logic changes

* Update LavaMoat policies (#19744)

Update LavaMoat policies to match what CI expects.

* Replacing deprecated constants & creating stories (#19686)

* Replacing deprecated constants & creating stories

* updating snapshot

* fix: fix imports

* chore: update policy.json

* fix: move SmartTransactionController out of snaps code fence

* fix: yarn.lock dedupe

* fix: lavamoat policy

* fix: update test

* fix: remove snapshot, the list of snaps are always randomized.

* fix: resole snaps-controller to use flask

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
Co-authored-by: Gauthier Petetin <gauthierpetetin@hotmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: weizman <weizmangal@gmail.com>
Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
Co-authored-by: Dhruv <79097544+dhruvv173@users.noreply.github.com>
Co-authored-by: Monte Lai <monte.lai@consensys.net>

* Update LavaMoat policies

* chore: fix webapp policy.json

* feat: add snap label test

* feat: test to disable export private key for snap accounts

* feat: add snap account link test in account-list-menu

* fix: add fence for setSnapsAddSnapAccountModalDismissed

* fix: remove comments

* fix: move routes into snaps fence

* feat: use snap registry

* fix: account snap identification

* chore: add `keyring-snaps` feature flag

* fix: remove unneeded spread

* Disable warn logs in content-script (#19754)

* Use Yarn caching in GitHub Actions (#19662)

GitHub actions that install dependencies will now also cache those
dependencies using the standard strategy for Yarn (which is to hash the
lockfile).

This matches the module template (see https://github.com/MetaMask/metamask-module-template/pull/145
for details).

This should have no functional impact except that this action will run
faster when dependencies are unchanged.

* Fixing misspelling in 10.28.0 changelog notes (#19756)

* Add `tokenId` type validation in `wallet_watchAsset` middleware (#19738)

* Remove unused GitHub Action workflow (#19660)

This GitHub action workflow was disabled, but was still running setup
steps. It has now been removed entirely. We can re-introduce it again
later once the problem that led to it being disabled has been fixed.

The associated npm script and JavaScript module have been removed as
well.

* Fix #847 - Don't show account address on token pages (#19740)

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

* Deprecating FormField and fixing console error (#19739)

* Deprecating FormField and fixing console error

* Updating snapshots

* updated linea image for token and badge (#19717)

* updated linea image for token and badge

* replaced hardcoded string with constant

* UI updates for contacts Page (#19646)

* updated contacts flow update

* json file updates

* updated contacts edit and view list

* keep contacts tab selected

* lint fix

* replaced hardcoded strings with constant

* updated padding in box

* Replacing deprecated components and fixing prop errors (#19745)

* Use `snaps@0.35.2-flask.1` and `snaps@1.0.0-prerelease.1` (#19734)

* snaps@0.35.0-flask.1

* Update LavaMoat policies

* Update stable snaps packages to 1.0.0-prerelease.1

* Update LavaMoat policies

* Fix lint

* snaps@0.35.2

* Exclude snap_manageAccounts

* Code fencing

* Revert removing endowment:keyring exclusion

* Bump iframe URLs

* UX: Ensure multichain native token name is always shown (#19705)

* UX: Ensure multichain native token name is always shown

* Fix lint

* UX Multichain: fixed padding for edit screen (#19707)

* fixed padding for edit screen

* Use network picker for header trigger

* Fix swaps display

* updated snapshot

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>

* Bump @metamask/providers to v11.1.0 (#19762)

* Bump @metamask/providers to v11.1.0

---------

Co-authored-by: Alex <adonesky@gmail.com>

* Fix fallback gas estimation (#19746)

* Fix fallback gas estimation

Our fallback gas estimation was failing due to a bug in the
`@metamask/controller-utils` package. This was causing gas estimation
to fail completely on certain networks (those not supported by our gas
estimation APIs and non EIP-1559 compatibile), and it was causing the
fallback gas estimation operation (in case our API was down) to fail
across all networks.

Fixes https://github.com/MetaMask/metamask-extension/issues/19735

* Add e2e tests

E2E tests have been added to capture gas estimation. Cases are added
for our API, for the fallback estimate, and for non-EIP-1559 estimates.

As part of this work, the legacy gas API had to be disabled. This was
being used in e2e tests but was dead code in production. It needed to
be disabled to ensure the code under test was reachable.

* Fix gas API referenced in e2e test

* Update unit test snapshots

* Update Label component font weight from bold to medium (#19731)

* Update Label component font weight from bold to medium

* update snapshot

* fix snapshots

* fix snapshots 2

* Removeing deprecated constants for enums

---------

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

* Part of #17670: Replace Typography with Text component in CancelSpeedupPopover (#18638)

* create story

* replace Typography with Text component

* review changes

* replace CSS with props styling
* use `Button` from `component-library`
* tooltip HTML refactor with `component-library` components
* remove whitespace in story

* strong tag support within Text component

* addresses #18651
* taken from #18752 as suggested in https://github.com/MetaMask/metamask-extension/pull/18638#discussion_r1176334805

* replace `strong` with new `Text as="strong"`

* remove unneccessary css from fa564e3f036f1439f9f220cca23595b508760614

* add text variant definition

* Updating text variant of button

* restrore proper spacing between elements

* Quick fix for test

* Adding key

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Issue 17670 replace typography with text (#19433)

* Replace Typograph with Text component in numeric-input-component.js

* Replace Typography with Text component in signature-request-message.js

* Replace Typography with Text component in signature-request.component.js

* Replacing deprecating constants and fixing some signature story warnings

* Updating snapshot

* Fixing import

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Part of #18714: Replacing deprecated constants in `confirm-subtitle` folder (#19699)

* repalcing deprecated constants

* resolve issue

* lint fixes

---------

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

* Part of #17670: Replace Typography with Text component in: callout.js (#18912)

* Part of #17670: Replace Typography with Text component in: callout.js

* Update ui/components/ui/callout/callout.js

Co-authored-by: Danica Shen <zhaodanica@gmail.com>

* Update callout.js

* Updating snapshot and deprecating component

* Updating snapshot and deprecating component

---------

Co-authored-by: Danica Shen <zhaodanica@gmail.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* [MMI] Added code fences in whats new popup (#19581)

* added code fences in whats new popup

* Improved code

* Added missing prop

* Update LavaMoat policies

* updated functions by using an options object for the rendering functions in order to bypass possible typsecript issues

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>

* Updated action list in token, NFTs and activity view (#19702)

* updated ui for nft import button

* updated no nft image found in the center

* updated footer for all screens in tabs

* removed no nft state from nft tab

* updated snapshot

* lint fix

* fixed e2e tests

* fixed prep build error

* removed no nfts yet test

* updated tabs

* fixed prod error

* updated no nft screen

* changed button size to md

* fix: change 'M' to '?'

* fix: update fence to keyring-snaps

* chore: rename folder

* fix: typo

* chore: remove logs

* feat: add metamask developer constant

* fix: sass keyring-snap path

* chore: update yarn.lock

* fix: remove alias

* feat: add KEYRING_SNAPS_REGISTRY_URL env

* fix: nested fence

* feat: add snap manageAccount e2e (#19777)

* feat: add snap manageAccount e2e

* feat: update link

* fix: lint

* fix: get values of restrictedMethodPermissionBuilders

* fix: add fence to perferences

* fix: stop shuffle

* fix: remove KEYRING_SNAPS_REGISTRY_URL from metamaskRc

* fix: use permissions to determine account snaps

* fix: remove shuffle

* fix: add comments to fences in excluded snap permission.

* chore: fix policy.json

* fix: fix snap-account-detail test

* fix: lint

* fix: snap accoutn detail page test

* Update LavaMoat policies

* Update ui/pages/keyring-snaps/snap-account-detail-page/snap-account-detail-page.test.tsx

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>

* Update ui/pages/keyring-snaps/snap-account-detail-page/snap-account-detail-page.test.tsx

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>

* fix: remove fence from isAbleToExportAccount

* chore: remove comment line

* fix: dismiss snap modal

* fix: try catch for scroll

* fix: icon for manageAccount

* fix: update `handleSnapRequest` to make `params` optional and add `id`

* fix: lint for uuid

* fix: remove arg in saveSnapKeyring

* fix: add fence for uuidV4

* chore: bump dep

* fix: permission_manageAccounts message and icon

* chore: update registry link

* chore: convert address to lowercase

* fix: change icon

* chore: bump eth-snap-keyring

* chore: update webapp policy.json

* Update ui/pages/keyring-snaps/new-snap-account-page/new-snap-account-page.test.tsx

Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com>

* fix: update fences

* fix: nested fence

* Update app/_locales/en/messages.json

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>

* Update app/_locales/en/messages.json

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>

* Update app/_locales/en/messages.json

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>

* Update app/_locales/en/messages.json

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>

* Update ui/components/multichain/account-details/account-details-display.js

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>

* Update ui/pages/keyring-snaps/snap-account-detail-page/header.tsx

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>

* Update ui/pages/keyring-snaps/snap-account-detail-page/snap-account-detail-page.tsx

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>

* fix: rename and added jsdoc

* fix: add fence to snap label

* fix: remove comment

* fix: change pixel to int and remove unused class

* fix: lint

* fix: create two tests for main and flask restricted methods

* fix: remove fence in test

* fix: lint header

* feat: allow `metamask.github.io` in manifest

* fix: remove comment

* fix: rename isAbleToExportAccount

* chore: use a more restrictive registry URL

* fix: change to && not ||

* fix: remove unused

* fix: move keyring snaps URL to Flask's base manifest

* fix: use fetch instead of fetchWithCache

* fix: lint

---------

Co-authored-by: kumavis <aaron@kumavis.me>
Co-authored-by: Howard Braham <howrad@gmail.com>
Co-authored-by: Daniel Rocha <68558152+danroc@users.noreply.github.com>
Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com>
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
Co-authored-by: Gauthier Petetin <gauthierpetetin@hotmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: weizman <weizmangal@gmail.com>
Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
Co-authored-by: Dhruv <79097544+dhruvv173@users.noreply.github.com>
Co-authored-by: ryanml <ryanlanese@gmail.com>
Co-authored-by: Alex Donesky <adonesky@gmail.com>
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Co-authored-by: jiexi <jiexiluan@gmail.com>
Co-authored-by: jainex <jainexp017@gmail.com>
Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
Co-authored-by: Garrett Bear <gwhisten@gmail.com>
Co-authored-by: Ujwal Kumar <ujwalkumar95@gmail.com>
Co-authored-by: rohit kerkar <129620973+rohiiittttt@users.noreply.github.com>
Co-authored-by: Harsh Shukla <125105825+PrgrmrHarshShukla@users.noreply.github.com>
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
Co-authored-by: Albert Olivé <albertolivecorbella@gmail.com>
Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
2023-06-29 09:24:08 -04:00
Nidhi Kumari
a7d9c9cc11 removed margin for popup view (#19804) 2023-06-28 16:22:27 -02:30
Alex Donesky
3e9680c0d5 fix issue where non-standard NFT watchAsset requests result in notification with home screen view (#19788) 2023-06-28 16:18:17 -02:30
Alex Donesky
230c0c6fa1
fix issue where non-standard NFT watchAsset requests result in notification with home screen view (#19788) 2023-06-28 13:01:38 -05:00
Nidhi Kumari
b9bca5feca
removed margin for popup view (#19804) 2023-06-28 20:41:19 +05:30
David Walsh
7e7b4f018c
UX: Multichain: Update deprecated variables (#19795) 2023-06-28 10:03:50 -05:00
David Walsh
fd20f48e2c
UX: Multichain: Make imports consistent (#19793) 2023-06-28 08:37:03 -05:00
Frederik Bolding
c8f26d8c24
Fix design inconsistencies in the connect flow (#19800) 2023-06-28 14:36:20 +02:00
Daniel
a9b3c8bfaf Only show a Swaps notification on a supported chain (#19673) 2023-06-27 14:37:55 -02:30
David Walsh
626edb8b82 UX: Ensure multichain native token name is always shown (#19705)
* UX: Ensure multichain native token name is always shown

* Fix lint
2023-06-27 14:37:55 -02:30
Mark Stacey
28093b0c59 Fix fallback gas estimation (#19746)
* Fix fallback gas estimation

Our fallback gas estimation was failing due to a bug in the
`@metamask/controller-utils` package. This was causing gas estimation
to fail completely on certain networks (those not supported by our gas
estimation APIs and non EIP-1559 compatibile), and it was causing the
fallback gas estimation operation (in case our API was down) to fail
across all networks.

Fixes https://github.com/MetaMask/metamask-extension/issues/19735

* Add e2e tests

E2E tests have been added to capture gas estimation. Cases are added
for our API, for the fallback estimate, and for non-EIP-1559 estimates.

As part of this work, the legacy gas API had to be disabled. This was
being used in e2e tests but was dead code in production. It needed to
be disabled to ensure the code under test was reachable.

* Fix gas API referenced in e2e test

* Update unit test snapshots
2023-06-27 14:37:54 -02:30
David Walsh
53edffe279 Fix #847 - Don't show account address on token pages (#19740)
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-06-27 14:33:30 -02:30
Nidhi Kumari
e8e6d7cd35 UX Multichain: fixed padding for edit screen (#19707)
* fixed padding for edit screen

* Use network picker for header trigger

* Fix swaps display

* updated snapshot

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2023-06-27 14:33:30 -02:30
Nidhi Kumari
5512e2921f removed portfolio link from wallet view (#19716)
* removed portfolio link from wallet view

* removed unused code

* updated test

* updated spec file

* updated test
2023-06-27 14:33:30 -02:30
Nidhi Kumari
0f330e21e5 added extra margin for unlocked state in full view in header (#19701)
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
2023-06-27 14:33:30 -02:30
Albert Olivé
9271cfd7bf
[MMI] The add custody token view needs a styles tweak (#19779)
* fixing styles

* Fixing styles and snapshots

* fixed eslint rule

* Removed unnecessary test
2023-06-27 15:49:15 +02:00
Nidhi Kumari
af56e34d5f
Updated action list in token, NFTs and activity view (#19702)
* updated ui for nft import button

* updated no nft image found in the center

* updated footer for all screens in tabs

* removed no nft state from nft tab

* updated snapshot

* lint fix

* fixed e2e tests

* fixed prep build error

* removed no nfts yet test

* updated tabs

* fixed prod error

* updated no nft screen

* changed button size to md
2023-06-27 12:05:31 +05:30
Albert Olivé
1e56fdbf66
[MMI] Added code fences in whats new popup (#19581)
* added code fences in whats new popup

* Improved code

* Added missing prop

* Update LavaMoat policies

* updated functions by using an options object for the rendering functions in order to bypass possible typsecript issues

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2023-06-27 08:30:42 +02:00
Harsh Shukla
ec4c4050e6
Part of #17670: Replace Typography with Text component in: callout.js (#18912)
* Part of #17670: Replace Typography with Text component in: callout.js

* Update ui/components/ui/callout/callout.js

Co-authored-by: Danica Shen <zhaodanica@gmail.com>

* Update callout.js

* Updating snapshot and deprecating component

* Updating snapshot and deprecating component

---------

Co-authored-by: Danica Shen <zhaodanica@gmail.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-06-26 19:36:01 -07:00
rohit kerkar
deabc3ed5f
Part of #18714: Replacing deprecated constants in confirm-subtitle folder (#19699)
* repalcing deprecated constants

* resolve issue

* lint fixes

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-06-26 19:35:45 -07:00
Ujwal Kumar
04839a250d
Issue 17670 replace typography with text (#19433)
* Replace Typograph with Text component in numeric-input-component.js

* Replace Typography with Text component in signature-request-message.js

* Replace Typography with Text component in signature-request.component.js

* Replacing deprecating constants and fixing some signature story warnings

* Updating snapshot

* Fixing import

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-06-26 15:50:08 -07:00
113fdc189c
Part of #17670: Replace Typography with Text component in CancelSpeedupPopover (#18638)
* create story

* replace Typography with Text component

* review changes

* replace CSS with props styling
* use `Button` from `component-library`
* tooltip HTML refactor with `component-library` components
* remove whitespace in story

* strong tag support within Text component

* addresses #18651
* taken from #18752 as suggested in https://github.com/MetaMask/metamask-extension/pull/18638#discussion_r1176334805

* replace `strong` with new `Text as="strong"`

* remove unneccessary css from fa564e3f036f1439f9f220cca23595b508760614

* add text variant definition

* Updating text variant of button

* restrore proper spacing between elements

* Quick fix for test

* Adding key

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-06-26 13:52:54 -07:00
jainex
c1c6c8237a
Update Label component font weight from bold to medium (#19731)
* Update Label component font weight from bold to medium

* update snapshot

* fix snapshots

* fix snapshots 2

* Removeing deprecated constants for enums

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-06-27 01:29:04 +05:30
Mark Stacey
ec7e7fdf6d
Fix fallback gas estimation (#19746)
* Fix fallback gas estimation

Our fallback gas estimation was failing due to a bug in the
`@metamask/controller-utils` package. This was causing gas estimation
to fail completely on certain networks (those not supported by our gas
estimation APIs and non EIP-1559 compatibile), and it was causing the
fallback gas estimation operation (in case our API was down) to fail
across all networks.

Fixes https://github.com/MetaMask/metamask-extension/issues/19735

* Add e2e tests

E2E tests have been added to capture gas estimation. Cases are added
for our API, for the fallback estimate, and for non-EIP-1559 estimates.

As part of this work, the legacy gas API had to be disabled. This was
being used in e2e tests but was dead code in production. It needed to
be disabled to ensure the code under test was reachable.

* Fix gas API referenced in e2e test

* Update unit test snapshots
2023-06-26 16:13:16 -02:30
Nidhi Kumari
eb506a5694
UX Multichain: fixed padding for edit screen (#19707)
* fixed padding for edit screen

* Use network picker for header trigger

* Fix swaps display

* updated snapshot

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2023-06-26 23:27:56 +05:30
David Walsh
9a9625d96c
UX: Ensure multichain native token name is always shown (#19705)
* UX: Ensure multichain native token name is always shown

* Fix lint
2023-06-26 12:54:32 -05:00
Frederik Bolding
3df690b852
Use snaps@0.35.2-flask.1 and snaps@1.0.0-prerelease.1 (#19734)
* snaps@0.35.0-flask.1

* Update LavaMoat policies

* Update stable snaps packages to 1.0.0-prerelease.1

* Update LavaMoat policies

* Fix lint

* snaps@0.35.2

* Exclude snap_manageAccounts

* Code fencing

* Revert removing endowment:keyring exclusion

* Bump iframe URLs
2023-06-26 19:41:59 +02:00
George Marshall
f2d039f6cb
Replacing deprecated components and fixing prop errors (#19745) 2023-06-26 10:29:02 -07:00
Nidhi Kumari
1cc78fa0b1
UI updates for contacts Page (#19646)
* updated contacts flow update

* json file updates

* updated contacts edit and view list

* keep contacts tab selected

* lint fix

* replaced hardcoded strings with constant

* updated padding in box
2023-06-26 22:38:42 +05:30
Nidhi Kumari
e9423be894
updated linea image for token and badge (#19717)
* updated linea image for token and badge

* replaced hardcoded string with constant
2023-06-26 22:07:20 +05:30
George Marshall
48f61dcf61
Deprecating FormField and fixing console error (#19739)
* Deprecating FormField and fixing console error

* Updating snapshots
2023-06-26 09:29:33 -07:00
David Walsh
e37e570b2e
Fix #847 - Don't show account address on token pages (#19740)
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-06-26 11:13:26 -05:00
Dhruv
1c7c89abcb
Replacing deprecated constants & creating stories (#19686)
* Replacing deprecated constants & creating stories

* updating snapshot
2023-06-23 14:38:40 -07:00
Ariella Vu
34375a57e5
Security Provider cleanup (#19694)
* security-prov: isFlaggedSecurityProviderResponse

* security-prov: create shared/modules/util

* security prov: rn isFlagged -> isSuspcious
- util fn returns true if response is not verified and flagged

* security prov: add util test
and support undefined param

* security prov: reorg util fn
- no logic changes
2023-06-23 20:08:22 +02:00
Nidhi Kumari
dfb830e862
removed portfolio link from wallet view (#19716)
* removed portfolio link from wallet view

* removed unused code

* updated test

* updated spec file

* updated test
2023-06-23 17:28:41 +05:30
António Regadas
80bfb5b501
[MMI] rearrange mmi account menu options (#19635)
* adds the portfolio dashboard option and compliance to the global menu

* undo change
2023-06-23 11:55:31 +02:00
António Regadas
93704a8479
fixes the stake a portfolio icons not showing (#19633) 2023-06-23 11:54:59 +02:00
António Regadas
adc02dd534
adds MMI blue fox svg (#19632) 2023-06-23 11:54:04 +02:00
Elliot Winkler
bd12ea733a
Fix autolock field to accept decimals in Firefox (#19653)
The autolock field on the Settings screen — the field that allows users
to set the duration that MetaMask will wait for until automatically
locking — does not always accept decimal numbers. This breaks the e2e
test for this feature as it attempts to set this field to "0.1".

More specifically, the React component responsible for this field passes
whatever the user inputs through the `Number` function immediately and
then uses this to repopulate the input. Therefore, if the user enters
"3" followed by a ".", `Number("3.")` will be called. This evaluates to
the number 3, and "3" becomes the new value of the field. As a result,
the "." can never be typed.

Curiously, this behavior only happens in Firefox; Chrome seems to
keep the "." in the input field when it's typed. This happens because
`onChange` event doesn't seem to get fired until a number is typed
*after* the ".". This may be due to underlying differences in the DOM
between Chrome and Firefox.

Regardless, always passing the input through `Number` creates other odd
behavior, such as the fact that the input can never be cleared (because
`Number("")` evaluates to 0).

This commit solves these problems by saving the "raw" version of the
user's input as well as the normalized version. The raw version is
always used to populate the input, whereas the normalized version is
saved in state.
2023-06-22 10:29:24 -06:00
David Walsh
329e4b75ed
Fix #19608 - Make account name validation more strict (#19616) 2023-06-22 09:07:56 -05:00
David Walsh
7949ec9cd4
Fix #18423 - Ensure token details stay within dropdown (#19626)
* Fix #18423 - Ensure token details stay within dropdown

* Ellipsize the token id

* Add tooltip, fix tests
2023-06-21 16:28:53 -05:00
Nidhi Kumari
76cafe0a83
added extra margin for unlocked state in full view in header (#19701)
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
2023-06-21 19:32:25 +05:30
Dhruv
bc1a15a0a3
Creating stories for LoadingHeartBeat and LoadingIndicator (#19495)
* Creating stories

* lint fix

* Updating LoadingHeartbeat story

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-06-20 15:16:19 -07:00
Dhruv
ab0374d48a
Part of #18714: Replacing deprecated constants with enums (#19516)
* replacing deprecated constants with enums

* Removing redundant properties
2023-06-20 15:14:45 -07:00
Ujwal Kumar
84135f5d4c
Replace deprecated Display constant with enum in slippage-buttons.js (#19560) 2023-06-20 13:56:05 -07:00
rohit kerkar
639de748fb
Adding story for CancelButton (#19566)
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-06-20 13:44:54 -07:00
rohit kerkar
4a8a4aa01b
creating story for multilayer-fee-message & nft-options (#19567)
* creating story for multilayer fee message

* add story for nftoptions

* lint fixed

* suggestion

* Updating function props to actions in storybook

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-06-20 13:43:27 -07:00
Howard Braham
9acd4b4ea1
feat(srp): add a quiz to the SRP reveal (#19283)
* feat(srp): add a quiz to the SRP reveal

* fixed the popover header centering

* lint fixes

* converted from `ui/components/ui/popover` to `ui/components/component-library/modal`

* responded to @darkwing review

* added unit tests

* renamed the folder to 'srp-quiz-modal'

* responded to Monte's review

* using i18n-helper in the test suite

* small improvement to JSXDict comments

* wrote a new webdriver.holdMouseDownOnElement() to assist with testing the "Hold to reveal SRP" button

* Updating layout and some storybook naming and migrating to tsx

* Apply suggestions from @georgewrmarshall

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

* Unit test searches by data-testid instead of by text

* new layout and copy for the Settings->Security page

* now with 100% test coverage for /ui/pages/settings/security-tab
fixes #16871
fixes #18140

* e2e tests to reveal SRP after quiz

* e2e- Fix lint, remove unneeded extras

* @coreyjanssen and @georgewrmarshall compromise

Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Corey Janssen <corey.janssen@consensys.net>

* trying isRequired again

* transparent background on PNG

* [e2e] moving functions to helpers and adding testid for SRP reveal quiz (#19481)

* moving functions to helpers and adding testid

* fix lint error

* took out the IPFS gateway fixes

* lint fix

* translations of SRP Reveal Quiz

* new Spanish translation from Guto

* Update describe for e2e tests

* Apply suggestion from @georgewrmarshall

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

* fixed the Tab key problem

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: Plasma Corral <32695229+plasmacorral@users.noreply.github.com>
Co-authored-by: Corey Janssen <corey.janssen@consensys.net>
2023-06-20 14:27:10 -04:00
Daniel
3e79a742c4
Only show a Swaps notification on a supported chain (#19673) 2023-06-20 18:57:14 +02:00
David Walsh
ba3f86400c
Fix #19609 - Prevent rounded corners in account menu (#19615) 2023-06-20 08:38:24 -05:00
OGPoyraz
39089e0f4c
Accept SignController approval request from frontend (#19184) 2023-06-20 15:37:09 +02:00
Matthew Walsh
b247f272ba
Support translation in background code (#19650) 2023-06-20 13:44:11 +01:00
jainex
6bc6cba6d5
remove Unused CSS (#19602)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-06-19 23:29:52 +05:30
Victorien Gauch
e4923399a9
feat: add new linea mainnet network (#19326)
* feat: add new linea mainnet network

* fix: removed unused condition + lint code

* fix: update tests + fix network tab issue

* feat: add feature toggle for linea mainnet

* fix: add feature toggle for linea mainnet

* feat: add linea mainnet logo

* update @metamask/eth-json-rpc-infura package to support linea networks

* update linea mainnet block explorer url

* fix: refactor linea mainnet feature toggle

* fix: update linea mainnet chain id and rpc url

* fix: update settings-search unit test

* fix: update linea mainnet feature flag

* fix: remove useless async function keyword for linea mainnet feature flag
2023-06-16 14:05:33 -02:30
Garrett Bear
70d86ee67c
Feat/19274/ds popover update account list menu (#19534)
* update account list menu to use ds popover and fix accessibility issue

* close popover if user continues to tab to next items

* remove disable logic not doing anything

* add stylesheet

* add refs to track last menuitem

* cleaned up ref version for MenuItems

* fix test

* add click away option and fix test

* fix e2e test

* undo e2e test

* add account e2e

* fix click outside component

* remove additional line break

* remove commented out code

* add isOpen to story

* set width to 225px
2023-06-16 09:25:13 -07:00
Nidhi Kumari
a8a61ebc33
Updated contacts Title and copy changes in Send Flow (#19618)
* updated snapshot

* updated spacing for edit and delete in full screen

* updated ui

* reverted changes for contacts

* updated json
2023-06-16 21:36:27 +05:30
David Walsh
bc2a5aaf96
Fix #19619 - Submit the account creation form when pressing enter (#19620) 2023-06-16 08:13:08 -05:00
Daniel
1aae94fedc
Fix searchable item list height (#19634) 2023-06-16 15:06:25 +02:00
Alex Donesky
c16b35c029
Extend wallet_watchAsset to support ERC721 and ERC1155 tokens (#19454)
* Extend wallet_watchAsset to support ERC721 and ERC1155 tokens
2023-06-15 15:18:12 -05:00
Daniel
8b3e3c8a58
Swaps UI update (#19169) 2023-06-15 20:17:21 +02:00
António Regadas
1520f57b77
MMI start script and fixes a bug preventing it to run (#19594)
* adds MMI start script and fixes a bug preventing it to run

* lint fix
2023-06-15 17:57:35 +01:00
David Walsh
d2f0b2f785
UX: Ensure 'Connect Hardware' route is functioning properly (#19612)
* UX: Ensure 'Connect Hardware' route is functioning properly

* restore create-account page

---------

Co-authored-by: Bernardo Garces Chapero <bernardo.chapero@consensys.net>
2023-06-15 11:55:23 -05:00
Olusegun Akintayo
a0e6737848
Fix unknown processing time not showing in warning color (#19527) 2023-06-15 10:52:08 -05:00
David Walsh
276d9c74c6
Fix #19437 - Prevent Connected Sites global menu item from being clicked during confirmation (#19598)
* Fix #19437 - Prevent Connected Sites global menu item from being clicked during confirmation

* Add tests
2023-06-15 08:36:28 -05:00
David Walsh
b6f42bacf7
UX: Add portfolio button in overview (#19601) 2023-06-15 08:17:29 -05:00
Victorien Gauch
1fca9255c1
fix: refactor linea goerli testnet implementation (#19321)
* fix: refactor linea goerli testnet implementation

* fix: rename linea goerli network

* feat: add linea testnet logo

* update linea goerli block explorer url

* update @metamask/eth-json-rpc-infura package to version 8.1.0

* fix: refactor ticker map object in shared/constants/networks.ts files
2023-06-15 09:08:07 -02:30
David Walsh
875bad125f
Fix #19439 - Allow Account Picker during Send flow (#19522)
* Fix #19439 - Allow Account Picker during Send flow

* Disable any network change with confirmations pending

* Disable the settings menu during an unconfirmed transaction
2023-06-14 13:49:14 -05:00
George Marshall
f4f80c223e
Adding deprecation tags to popover and old modals (#19556)
Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-06-14 09:47:16 -07:00
Nidhi Kumari
bdb26b04fc
updated components with Multichain Prefix (#19593) 2023-06-14 21:21:19 +05:30
Nidhi Kumari
c59941c7bc
UX Multichain: UI fixes for settings page (#19574)
* fixed spacings and UI for settings page

* lint fix
2023-06-13 20:47:35 +05:30
Nidhi Kumari
cc0b30776a
UX Multichain: updated enums for multichain token list item (#19575)
* updated enums for multichain token list iteam

* updated snapshot
2023-06-13 20:47:21 +05:30
George Marshall
6c3f31d382
Adding background/default to BorderColor enum to prevent propType error and updating tests (#19571) 2023-06-13 08:11:21 -07:00
David Walsh
28137798b6
UX: Multichain: Move Add Account and Import Account into Account Menu Popover (#19346)
* UX: Multichain: Move Add Account and Import Account into Account Menu Popover

* Create a new CreateAccount component for the Account Menu

* Add actions for import form

* Use separate actions for cancel vs. submit

* Fix jest tests

* Remove commented route navigation

* Accommodate for failing import

* Fix tests

* Remove routes for new account and import

* Remove old create account page

* Move import-account files to multichain directory

* Fix paths on the import files

* Remove deprecated component library variables

* Fix error property of add form

* Fix user-actions-benchmark
2023-06-13 10:07:01 -05:00
Matthew Walsh
4f4192c6f4
Await approval request in transaction controller (#19197) 2023-06-13 10:17:32 +01:00
Elliot Winkler
f77b1f65e2
Upgrade assets-controllers to v9 (#19472) 2023-06-09 15:48:48 -05:00
Nidhi Kumari
f11596710c
UX Multichain: Updated header to use picker network in popup view (#19514)
* updated avatar network to use picker network in popup view

* removed unused locale

* fixed the extra gap

* fixed css

* fixed lint error

* updated aria label
2023-06-09 21:30:11 +05:30
Frederik Bolding
1a8a263cc1
[FLASK] Align update error state with Figma (#19547)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-06-09 16:50:51 +02:00
Frederik Bolding
3e1fb2a4be
[FLASK] Fix usages of getSnapName (#19546) 2023-06-09 16:37:38 +02:00
Hassan Malik
ff36e32fb0
[FLASK] Improve snaps connect flow (#19461)
* add todo comments

* add snaps-connect component

* added new messages

* added component scss files to main scss files

* remove dead code and add snap-connect-cell

* update snaps connect

* updated messages and styling

* update messages and css

* update css

* moved snaps privacy warning into snaps connect, moved snaps connect error into snap install

* added story and removed unused import

* fix style linting and move snaps connect error css

* removed unused message

* ran lavamoat policy generation

* fix fencing

* some more css changes

* Fix scrolling and box shadow

* added comment, fixed quote

* Align more with Figma

* Regen LavaMoat policies

* bring back privacy logic to permission page container

* Revert scrolling changes + fix snaps icon

* fix linting, reintroduced dedupe logic and additionally addressed a corner case

* made some fixes

* Fix scrolling with multiple snaps

* add dedupe logic to snaps connect and fix spacing issue

* policy regen

* lint fix

* fix fencing

* replaced with new icon design, trimmed origin urls in certain places

* remove unused imports

* badge icon size

* Revert LM policy changes

* Use SnapAvatar for snaps-connect

* Use InstallError for connection failed

* Delete unused CSS file

* Remove unused CSS

* Use useOriginMetadata

* addressed PR comments

* fix linting errors

* add explicit condition

* fix fencing

* fix some more fencing

* fix util fencing issue

* fix storybook file, prevent null destructuring

* Fix storybook origin URLs

* Fix wrong prop name

---------

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
Co-authored-by: Erik Nilsson <eriks@mail.se>
2023-06-09 10:36:38 -04:00
David Drazic
8eff1fc1ff
[FLASK] Update Snaps privacy notice (#19501)
* Update Snaps privacy notice

* Add changes to finalize update requirements

* Update scroll icon color

* Fix unit tests

* Update link

* Address small change requests

* Fix unit test

* move terms of use link to variable

---------

Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
2023-06-09 14:22:31 +02:00
George Marshall
006d90fee7
Deprecate JS version of Box in favor of TS version (#19530)
* Initail deprecation messages and updates

* Updating spelling of favour to US spelling favor
2023-06-08 13:37:09 -07:00
George Marshall
35ae06d824
Adding Box component in TS to component-library (#19363)
* Adding TS version of Box to component-library

* Updates to types and comments
2023-06-08 11:12:16 -07:00
Binij Shrestha
fa70aec286
added validTag string literal union (#19258)
* added validTag string literal union

* Adding deprecation message

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-06-08 11:01:00 -07:00
Nidhi Kumari
c0afc4d2a9
update icons for add-network (#19513) 2023-06-08 22:56:20 +05:30
Nidhi Kumari
a8e194a8f6
Send flow UI update (#19465)
* removed recents and added accounts in send flow

* updated add contact button and fixed full screen view

* updated ui for contacts

* fixed lint errors and test

* fixed lint errors

* fixed lint errors

* updated spec files

* fixed lint errors

* updated snapshot

* fixed edit in spec files

* removed unused console statement

* updated snapshot

* added userInput check

* updated snapshot and added hover
2023-06-08 22:39:39 +05:30
Suraj Jadhav
6ede0422ca
issue-18714: Replaced deprecated constants with enum in EthSignModal and HoldToRevealModal Component (#19499)
* issue-18714: Replaced deprecated constants with enum in eth-sign-modal.js

* issue-18714: Replaced deprecated constants with enum in hold-to-reveal-modal.js
2023-06-08 16:35:16 +05:30
aleksandar-mihajlovic
f3147bcfb7
Added the ability to navigate multiple SIWE notifications (#18103) 2023-06-08 13:02:08 +02:00
David Drazic
2e856894cc
[FLASK] Update snap installation permission warning UI (#19494)
* Update snap installation permission warning UI

* Fix font size (TextVariant)

* Fix vertical margins between labels

* Update font weight in warning top description

* Update snapName for warning modal on update flow
2023-06-08 12:32:47 +02:00
Olusegun Akintayo
e2c4e93ab0
When gas fees suggested by dapp is too high, show warning color and icon (#19088)
* When gas fees suggested by dapp is too high, show warning color and icon

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

tests

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

Fix tests

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

set a default for high gas fees

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

Fix test cases where transaction is undefined.

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

Fix locale error

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

Fix error where dappSuggestedGasFees is null

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

Fix icon for site suggested

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

Fix unit tests snapshot

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Fix QA Comments

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* lint:fix

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Fix unit tests

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Fix PR comments

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Lint fix

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* Fix PR comment. - call setEstimateUsed only once.

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

* use constants for Priority levels.

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>

---------

Signed-off-by: Olusegun Akintayo <akintayo.segun@gmail.com>
2023-06-08 13:26:18 +03:00
Albert Olivé
08b881880f
[MMI] Improved code, fixed bugs and added more tests (#19488)
* Improved code, fixed bugs and added more tests

* removing tabKey prop as is causing to fail other test
2023-06-08 11:01:06 +02:00
Suraj Jadhav
e7adf7ac22
issue-18714: Replaced deprecated constants with enum in confirmation-warning-modal.js (#19477) 2023-06-07 16:19:32 -07:00
Dhruv
58f6cf96cf
Creating story for icon-border (#19467)
* Creating story for icon-border

* Adding deprecation message

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-06-07 16:18:33 -07:00
Dhruv
29e6c2d34e
Creating story for account-mismatch-warning (#19460)
* Creating story for account-mismatch-warning

* Removed line break

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-06-07 16:17:08 -07:00
Frederik Bolding
789779f4d5
[FLASK] Rework Snaps headers and footers (#19442)
* Add new snap header and footer to snap install

* Add new snap header and footer to snap result and snap update

* Fix loading state

* Fix lint

* Add required scrolling

* Adjust avatar component

* Apply new headers and footers to snaps confirmations

* Rename previous SnapAuthorship component to SnapAuthorshipExpanded

* Fix lint

* Fix font weight

* Fix fencing

* Fix a test

* Fix lint after rebase

* Fix E2E

* Fix locale lint

* Fix another E2E

* Fix test ID

* Address PR comments

* Better scroll button centering

* Address design comments

* Fix unit test

* Fix E2Es
2023-06-07 15:18:49 +02:00
Albert Olivé
2070e5e42a
Feature/mmi 3009 confirm transaction base code fences (#19335)
* Added code fences

* Continue working on this ticket

* Fixed policies

* Added compliance-row component

* Fixed tests and css

* Fixed invalid locale

* Fixing linting

* Add optional check

* Fixing issues

* Fixed storybook

* Added missing dependency

* ran lavamoat auto

* ran dedupe and lavamoat

* lint

* Removed compliance row

* Removed unneeded package

* Removed unneeded proptyes

* updates mmi packages

* updating lavamoat

* formatting main

* Fixed conflicts

* updates lock file

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

* Updated yarn.lock and lavamoat

* remove linebreak

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

* Fixing proptypes issues with eslint

* runs lavamoat auto

* Testing fixes issue e2e tests

* Testing issues

* Reverting code fences container

* Fixing issue with binding

* Added code fences in proptypes

* Reverting code fences

* Removed institutional from main lavamoat

* Added code fences in confirm transaction base component

* Adding tests for handleMainSubmit

* Improving code

* Added test for handleMainSubmit

* Removed waitFor

---------

Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
Co-authored-by: António Regadas <apregadas@gmail.com>
2023-06-07 08:43:28 +02:00
Dhruv
2b95d7b242
Creating story for asset-list (#19450)
* Creating story for asset-list component

* lint fix

* lint-fix
2023-06-06 11:31:18 -07:00
David Walsh
7d7d09e469
UX: Multichain: Restore Flask support link and text (#19198)
* UX: Multichain: Restore Flask support link and text

* Update test
2023-06-06 11:02:00 -05:00
Niranjana Binoy
b5b3f67b4b
Using NetworkAccountBalanceHeader component on SIWE screen (#19361) 2023-06-06 09:53:28 -04:00
David Drazic
354788510e
[FLASK] Update UI (for audit) (UI facelift) (#19388)
* Update UI (for audit)

Revert yarn.lock change

Update e2e tests with new copy for a button

Make UI changes to custom Snap UI

Update UI on snap installation success page

Fix icon on installation success

Fix snap name font weight in installation page

Add UI changes for Snap installation failed page

Add new copy for snap installation screen

Update e2e tests OK button name

Update OK button names in e2e tests

Return previous functionality of update flow

Add error message handling for update screens

* Fix after rebase

* Fix messages.json update message

* Revert SCSS changes

* Refactor failed and success screen rendering
2023-06-06 12:15:20 +02:00
Frederik Bolding
c66d65921c
[FLASK] Limit notification count display to 99+ (#19449) 2023-06-06 11:00:42 +02:00
rohit kerkar
15bdb32bb6
replacing depricated constants (#19448)
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-06-06 14:21:27 +05:30
rohit kerkar
b40b4c6239
replacing depricated constants (#19447) 2023-06-06 14:20:45 +05:30
Nidhi Kumari
b64aa7f958
UX Multichain: Update settings title (#19414)
* update settings title

* fixed add contact button
2023-06-05 21:34:17 -07:00
Bernardo Garces Chapero
5355000202
Handle watch asset accept and reject using ApprovalController only (#18829) 2023-06-05 21:13:22 +01:00
Brad Decker
b5ef94b9f0
Revert "feature: Add legacy derivation path to Trezor (#19443)" (#19451)
This reverts commit 36de02ff69.
2023-06-05 14:20:38 -04:00
Simon Males
36de02ff69
feature: Add legacy derivation path to Trezor (#19443) 2023-06-05 11:34:08 -05:00
Dhruv
61e952bad0
Replacing deprecated constants with enums (#19242) 2023-06-05 21:25:20 +05:30
Dhruv
5c5de03846
Updating component-library readme storybook render (#19359)
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-06-05 21:23:25 +05:30
rohit kerkar
3ec2c189b0
Part of #18714: Replacing deprecated constants in Avatar-Base folder (#19408)
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-06-05 10:43:23 -05:00
Frederik Bolding
3b9e2eb5e5
[FLASK] Update snap tweaks (#19410)
* Sort revoked permissions before existing permissions

* Simplify update screen logic and update copy

* Remove approve and update copy

* Reduce nesting
2023-06-05 14:31:11 +02:00
vthomas13
1726fb3fd0
Remove MULTICHAIN flag for NFT badges (#19416) 2023-06-04 12:28:48 -04:00
David Walsh
931b126831
UX: Multichain: Make MetaFox logo more accessible (#19395)
* UX: Multichain: Make MetaFox logo more accessible

* Fix jest snapshots
2023-06-02 11:43:20 -05:00
Albert Olivé
9195057136
[MMI] Added code fencing in libs folder (#17929) 2023-06-02 18:40:58 +02:00
vthomas13
4f8c4820d2
Multichain NFT network badges (#19029)
* adding badges for nfts

* fixing default nft styling issue

* adding multichain flag, making borderRadius inline

* Apply suggestions from code review

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

* fixing imports

* removing nullcheck for guaranteed fields

* moving badgewrapper UI into multichain component

* using Box for button, removing inline style, border-radius for NFT default image

* adding nft badges to NFT Details page

* nits, snap update

* fixing/refactoring nftdefaultimage display, adding clickable, removing handleimageclick, refactor NFTItem, required props

* editing nft-default-image story, test, and snap

* Updating to fix positioning, use Box props to reduce CSS and BEM naming conventions

* moving minor styling to Box props, adding comment

* display block typo

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-06-02 11:01:51 -04:00
Jyoti Puri
f1de905be7
Fix details when transferring NFT not added to wallet (#19045) 2023-06-02 18:33:10 +05:30
Pedro Pablo Aste Kompen
37af04374a
feature(on-ramp): update supported networks (#19268)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-06-02 08:19:03 -04:00
Suryansh Anand
20fe6fcad4
Fix/storybook console cleanup (#19244)
* Fix: Fix storybook console error of networkList not being found when passed to createStore

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

* Show new copy button in QR code modal

* Show address copy button in wallet overview

* Update connected status component

* Remove legacy MenuBar

* Remove legacy ImportTokenLink

* Remove AssetListItem

* Remove DetectedTokensLink

* Remove legacy AppHeader

* Remove MULTICHAIN flag from builds.yml

* Remove legacy AccountMenu

* FIX: Token cell snapshot

* Add data-testid for Account Picker

* Remove multichain check in LoadingNetworkScreen

* Remove MULTICHAIN check for AccountDetailsModal

* Remove MULTICHAIN check for AssetList

* Update QR dimensions

* Remove MULTICHAIN declaration from metamaskrc.dist

* Implement PickerNetwork and NetworkListMenu in onboarding

* Remove legacy NetworkDropdown and Dropdown

* Remove documentation about legacy account menu

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

* Fix account-menu-icon data-testid

* Fix TokenCell test

* FIX Onboarding Flow tests

* Remove unused locales from AccountMenu removal

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

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

* E2E: Fix add-account.spec.js

* E2E: Fix state-logs.spec.js

* E2E: Fix lock-account.spec.js

* E2E: Fix settings-general.spec.js

* E2E: Fix advanced-settings.spec.js

* E2E: Fix auto-lock.spec.js

* E2E: Fix backup-restore.spec.js

* E2E: Fix clear-activity.spec.js

* E2E: Fix settings-search.spec.js

* E2E: Fix encrypt-decrypt.spec.js

* E2E: Fix dapp-interactions.spec.js

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

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

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

* E2E: Fix provider-api.spec.js

* E2E: Fix chain-interactions.spec.js

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

* Remove network icon from overview components

* E2E: Fix user-actions-benchmark.js

* E2E: Fix benchmark.js

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

* E2E: Fix address-book.spec.js

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

* E2E: Fix incremental-security.spec.js

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

* E2E: Onboarding.spec.js

* E2E: Fix permissions.spec.js

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

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

* Remove dead AccountOptionsMenu test

* E2E: Fix token-details.spec.js

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

* E2E: Fix metamask-ui.spec.js

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

This reverts commit 15598f2a23.

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

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

* e2e flaky test

* adds back the mmi options

* scss fix

* test fix

* removes unnecessary double quotes

* Prevent double logos on login screen

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

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

---------

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

* sad

* replacing depricated constants

---------

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

* txHelper: reorganize lines and improve test

* ConfirmTx: rn unconfirmedTxs->unconfirmedTxsSorted

* ConfirmTx: rn unconfirmedMessages-> unconfirmedTxs

* ConfirmTxPage: rm redundant unapprovedTxs const

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

* fix eslint

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

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-06-01 09:32:10 -07:00
Ariella Vu
ea4270babf
ConfirmApprove: fix space occurring after footer (#19276) 2023-06-01 16:12:09 +02:00
Ariella Vu
8d79e28560
Clean ConfirmTransaction page related code (#19208)
* fix typo: uncofirmedTransactions -> unconfirmedTransactions

* txHelper: reorganize lines and improve test

* ConfirmTx: rn unconfirmedTxs->unconfirmedTxsSorted

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

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

Relates to #19271

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-05-31 18:33:29 -02:30
rohit kerkar
80de5ceed4
Part of #18714: Replacing deprecated constants in Modal-Header folder (#19339)
* replacing deprecated

* replacing deprecated

---------

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-05-31 10:12:21 -07:00
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
legobeat
dfafdbb6bd
Revert "[MMI] Add confirm-transaction-base code fences (#18795)" (#19328)
This reverts commit 97a9834182.

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

* Continue working on this ticket

* Fixed policies

* Added compliance-row component

* Fixed tests and css

* Fixed invalid locale

* Fixing linting

* Add optional check

* Fixing issues

* Fixed storybook

* Added missing dependency

* ran lavamoat auto

* ran dedupe and lavamoat

* lint

* Removed compliance row

* Removed unneeded package

* Removed unneeded proptyes

* updates mmi packages

* updating lavamoat

* formatting main

* Fixed conflicts

* updates lock file

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

* Updated yarn.lock and lavamoat

* remove linebreak

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

* Fixing proptypes issues with eslint

* runs lavamoat auto

* Testing fixes issue e2e tests

* Testing issues

* Reverting code fences container

* Fixing issue with binding

* Added code fences in proptypes

* Reverting code fences

---------

Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
Co-authored-by: António Regadas <apregadas@gmail.com>
2023-05-29 16:50:56 +01:00
Dhruv
744dfc9e38
Part of #18714: Replacing deprecated constants in Icon folder (#19250)
* Replacing deprecated constants in Icon folder

* Requested changes

---------

Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-05-25 13:53:31 -07:00
Dhruv
26bd689b44
Fixed Text Docs not rendering issue in Storybook (#19248) 2023-05-25 10:35:38 -07:00
Daniel
e1b12279ab
Show the right "balance needed" value if we fallback from STX to regular Swaps (#19230)
* Show the right balance needed value if we fallback from STX to regular Swaps
* Fix usage of StxErrorTypes
2023-05-25 19:30:10 +02:00
Daniel
af018efcb6
Styling fix and content update for Swaps (#19284) 2023-05-25 18:48:11 +02:00
Nidhi Kumari
f0be1c3dba
added tooltip (#19269) 2023-05-25 08:30:01 -05:00
David Walsh
68e1958005
Fix #19139 - Allow user to switch network when loading networking fails (#19175) 2023-05-24 09:40:12 -02:30
Albert Olivé
057188d155
[MMI] Add code fences in signature-request (#18770)
* Started adding code fences in signature-request

* Finished code fencing

* Improving code

* Fixed storybook and code fences bundle

* Added missing dependency

* Fixed yarn.lock

* Fixing policies

* Updated package.json

* updating lavamoat

* lavamoat fix

* adds missing package

* runs yarn dedupe

* updates method name

* run lavamoat:auto again

* Added more code fences

* updates snapshot

* snapshot updates

* updates mmi packages to lighter versions

* updates mmi packages

* runs lavamoat auto

* updates yarn lock and runs lavamoat auto

* updates yarn lock

* updates targets file

* Removed console log and added tests

---------

Co-authored-by: António Regadas <apregadas@gmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
2023-05-24 13:41:21 +02:00
Albert Olivé
00bad7b8a8
[MMI] Added code fencing in transaction list (#18071)
* Added code fencing in transaction list

* Fixed import

* Fixed tests

* Fixed indentation

* Fixed code fences

* Removed custody icon in favor of svg

* Fix prettier

* lint

* Fixed prettier issue

* adds check before set state with variable _mounted

* lint

* check for address in selectedIdentity

* review fix

* lint

* updates test

* lint

* clean up

* prettier

* adds missing locale

* Added tests and improved code

* Fixed code

---------

Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
2023-05-24 13:40:58 +02:00
Monte Lai
832ce634fd
feat(accounts): import account without password (#19132)
import account without password

---------

Co-authored-by: Mike B <32695229+plasmacorral@users.noreply.github.com>
Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com>
Co-authored-by: Howard Braham <howrad@gmail.com>
2023-05-23 15:54:30 -07:00
Garrett Bear
53acfe271d
TEXT_ALIGN to TextAlign in UI folder (#19235) 2023-05-23 13:57:07 -07:00
David Walsh
c5a35b70c7
UX: Multichain: Only show the account picker with a selected identity (#19236) 2023-05-23 14:44:24 -05:00
David Walsh
627ff3c0ad
Multichain: UX: Snaps: Add Notifications to Global Menu (#19204)
* Multichain: UX: Snaps: Add Notifications to Global Menu

* Fix lint

* Move notification count after text
2023-05-23 14:44:05 -05:00
Garrett Bear
ba90e57663
Feat/18444/text align update app folder (#19216)
* Update TEXT_ALIGN const to TextAlign enum

* update TEXT_ALIGN to TextAlign in app folder
2023-05-23 12:29:14 -07:00
Nidhi Kumari
9db971768b
UX Multichain: updated ui for settings page (#19167)
* updated ui for settings page

* lint fix

* resolved errors

* fixed search bar css

* fixed css

* lint fix

* fixed tests

* fixed indentation

* updated settings aria label
2023-05-23 23:59:00 +05:30
Garrett Bear
415798876c
update TEXT_ALIGN to TextAlign in component-library folder (#19237) 2023-05-23 11:05:50 -07:00
Dhruv
49b8dcb25d
Moving RESIZE constant to textarea component folder (#19240)
* Moving RESIZE constant

* fixinf linting errors
2023-05-23 23:10:34 +05:30
Nidhi Kumari
15598f2a23
UX Multichain: updated border top for activity list (#19176)
* updated border top for activity list

* updated border css via prop

* fixed symbol

* fixed lint errors

* fix conditions

* updated snapshot
2023-05-23 22:54:17 +05:30
Hassan Malik
a9429c5c0d
[FLASK] Fix classnames for snaps components (#19234)
* renamed classnames according to BEM, removed unnecessary scss file

* remove plurality in classnames
2023-05-23 09:07:44 -04:00
Albert Olivé
dfb2c0e0e8
[MMI] Added code fencing in app menu bar (#18069)
* Added code fencing in app me nu bar

* Fixed lint issues

* Fixed yarn.lock

* Fixed issue

* Fixed tests

* Fixed yarn.lock

* Fixing policies

* Fixing lavamoat

* fixed yarn.lock

* Fixed storybook

* clean up and adds test

* lint

* typo

* adds test

---------

Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
2023-05-23 14:51:39 +02:00