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

6514 Commits

Author SHA1 Message Date
Garrett Bear
13f4295287
update Icon to TS version in UI Folder (#18551)
* update Icon to TS version and using proper Enums

* Update ui/components/ui/menu/menu.stories.js

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

* Update ui/components/ui/nickname-popover/nickname-popover.component.js

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

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-04-18 09:48:34 -07:00
Jyoti Puri
c6aa4f38c5
Fix approve all warning modal (#18613)
* Fix approve all warning modal

* fix

* fix

* fix
2023-04-18 13:22:16 -02:30
Niranjana Binoy
9d3cdd1b79
Overriding gas estimate in the send page even if enough ETH is not available (#18554) 2023-04-18 11:10:32 -04:00
Danica Shen
66767d981c
fix/18577: Add title back for approving ERC20 token (#18617)
* fix/18577: Add title back for approving ERC20 token

* Apply suggestions from code review

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

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-04-18 15:49:31 +02:00
Guillaume Roux
76d79d9cce
[FLASK] Redesign dropdown-tab (#18546) 2023-04-18 12:46:38 +02:00
Jyoti Puri
09d00e1e45
Refactor confirm-send-ether into functional component (#18527) 2023-04-18 05:59:06 +05:30
Garrett Bear
81393e1b5d
update to enum DS Text component (#18584)
* update to enum DS Text component

* Update ui/components/component-library/text/README.mdx

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

* Update ui/components/component-library/text/README.mdx

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

* Update ui/components/component-library/text/README.mdx

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

* Update ui/components/component-library/text/README.mdx

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

* Update ui/components/component-library/text/README.mdx

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-04-17 10:17:28 -07:00
Albert Olivé
c3cb464229
[MMI] Added custody-labels and account-list components (#18197)
* Added custody-labels and account-list components

* Modified link

* Renamed custody labels and improved code

* Added snapshot

* Fixed snapshot

* Finished connect-custody account-list

* Fixing css prettier

* Fixed comments of the PR

* Fixed code

---------

Co-authored-by: António Regadas <apregadas@gmail.com>
2023-04-17 17:06:41 +02:00
Niranjana Binoy
fedd6d4970
New reusable gas-display component (#17976) 2023-04-17 10:34:26 -04:00
dswilson4
ca10a1cdb6
updated onClick of close button to call the same autohide fxn as the NFT import removal (#18504)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-17 16:13:00 +02:00
Frederik Bolding
47f4f4008b
[FLASK] Remove unused snaps code (#18565)
* Remove unused code after snap_confirm was removed

* Remove more unused code

* Fix lint
2023-04-17 12:55:08 +02:00
António Regadas
b50b9be502
[MMI] moves mmi selectors to institutional folder (#18542)
* adds the initial selectors

* adds more selectors

* adds tests

* fix lint and prettier
2023-04-17 09:22:53 +01:00
Ariella Vu
1406885115
siwe: add ledger instructions (#18589) 2023-04-14 21:10:27 -03:00
vthomas13
40e4a3653f
Updating Terms of Use, Adding popover and onboarding flow check (#18221)
* WIP commit

* Moving copy out of messages.json, styling changes

* handling scroll button click and disable logic

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

* adding terms of use to e2e wallet creation/import

* adjusting failing unit test

* fixing QR code e2e

* updating welcome test

* setting app state in fixtures

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

removing console log

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

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

adding args to ToU popup storybook

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

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

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

* updating DS components in terms of use

* popover styling changes

* adding metametrics tracking

* editing scrollbutton behavior

* adding unit test

* code fencing

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-04-14 12:51:13 -04:00
António Regadas
8fdbd07c91
[MMI] Interactive replacement token modal (#18523)
* updates styles for confirm-add-institutional-feature

* initial component

* adds tests and storybook file

* clean up styles and adds MM design system

* prettier

* locale update

* lint

* snapshot update

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-14 11:35:58 +01:00
David Drazic
3eefe874a8
[FLASK] Revert changes made to stable permission display (UI design) (#18470)
* Revert changes made to stable permission display (UI design)

* Add test for new component

* Update paddings for install flow

* Fix missing icons on snap installation flow

* Update storybook path

* Add targetSubjectMetadata param

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2023-04-14 12:04:23 +02:00
Garrett Bear
e09028b4e5
Update multichain Icon imports (#18536)
* Update multichain Icon imports

* replace ButtonIcon with updated version

* Buttons with Icon TODO added

* update header to use TS version Icon
2023-04-13 15:24:47 -07:00
Nidhi Kumari
8becb57d9e
updated copy Address (#18557)
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
2023-04-13 23:07:33 +05:30
Jyoti Puri
a2bec15c68
Improvement on approval pages (#18545) 2023-04-13 22:54:33 +05:30
David Walsh
eb51460cae
UX: Multichain: App header (#18363)
* UX: Multichain: App header

* Export app header, provide required information, put feature flag in place

* Provide available data

* Implement account picker -- centered and opens account popover

* Remove backgrounds, use isUnlocked

* Fix placement of the global menu

* Show logo when unlocked

* Add selector for getting current network, provide props to AvatarNetwork and PickerNetwork

* Wire up the network menu to the header

* fixed ui for all the screens

* updated story for header

* fixed import and header settings

* updated lint error

* fixed tests

* updated header

* removed test

* updated snapshot test

* updated network menu

* updated changes

* removed comment from menu bar

* updated css

* updated test for network list menu

* updated stylesheet

* updated ButtonIcon import

---------

Co-authored-by: NidhiKJha <menidhikjha@gmail.com>
2023-04-13 22:24:03 +05:30
Niranjana Binoy
643a89f24d
Disabling network and account changes after the send flow is initiated (#18086) 2023-04-13 12:51:20 -04:00
António Regadas
300bfd6e69
[MMI] 2642 compliance modal component (#18410)
* adds component, styles and storybook file

* wip

* prettier and adds test

* prettier

* lint

* review fix

* lint

* updates to IconSize, IconName
2023-04-13 11:14:44 +01:00
Bernardo Garces Chapero
6ed72d6934
Refactor eth_getEncryptionPublicKey handling (#18319)
* add EncryptionPublicKeyController

* update message-managers package
2023-04-13 09:24:59 +01:00
Garrett Bear
065c499753
update ButtonIcon to TS (#18448)
* update ButtonIcon to TS

lint updates

fix lint issues

add ref

fix as prop

test updates

* box and icon updates for support

* Update ui/components/component-library/text-field/README.mdx

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

* fix disabled

* update types for as

* update readme

* fix storybook

* george changes to button icon

* revert headerbase

* box prop back to HTMLElementTagNameMap

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-12 08:55:24 -07:00
Matthew Walsh
bb0dff9443
Trigger transaction popup using ApprovalController (#18400) 2023-04-11 14:18:43 +01:00
Filip Sekulic
54aeb1b791
Replace contract with third party within the token allowance flow (#18101) 2023-04-11 08:49:42 +05:30
Amer Kadic
463fe40fde
Fix Unable to determine contract standard error (#18300)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-10 21:56:02 -03:00
dswilson4
826ac55c32
initial changes to support controls over knobs in storybook (#18502)
* initial changes to support controls over knobs in storybook

* fix linting issue
2023-04-10 13:37:07 +05:30
George Marshall
f31596af24
Fix hold to reveal button (#18496) 2023-04-10 11:27:56 +05:30
dswilson4
d4e12e55e8
Part of 17670: Replace Typography with Text swap-import-token (#18479)
* Initial changes to support Text component in import token component

* linting issue fix

* fix prettier linting issue

* updated styles and attributes for boxProps

* lint leading 0
2023-04-07 08:48:30 -07:00
Nidhi Kumari
b452f40e2f
Update new send icon (#18411)
* updated send icon

* optimised svg

* updated enum
2023-04-06 17:43:15 -07:00
vthomas13
c6cd3c9ff2
Bumping notification id's to 18 & 19 (#18460)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2023-04-06 12:38:11 -02:30
Danica Shen
f92e463a0f
fix: Pass correct optimism chain id to gas estimation (#18478) 2023-04-06 12:50:52 +01:00
Aditya Patel
18ff108627
Typography to text (#18382)
* Typography to text

* Update README.md

* Update README.md

* minor changes in custom file

* minor change

* Resolved Conflict issues

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-04-06 16:40:14 +05:30
legobeat
a816a6e592
Fix typo: detetcted-tokens-link -> detected-tokens-link (#18408) 2023-04-06 18:31:45 +09:00
George Marshall
4ce605f514
Updating icon imports to TS version in component-library folder (#18449) 2023-04-05 09:11:10 -07:00
George Marshall
94292fadc9
Small update to badgewrapper story (#18450) 2023-04-05 08:37:09 -07:00
Frederik Bolding
40628da3b4
[FLASK] Fix crash when requesting unknown snap permission (#18447) 2023-04-05 15:34:33 +02:00
Albert Olivé
c52d2131d3
[MMI] Confirm-add-institutional-feature page (#18321)
* Added confirm add institutional feature page

* Finished implementing component

* Added all institutional ducks

* Fixed tests

* Removed ducks and console log

* Fixed snapshots

* Fixed messages json

* Changed method name and using useEffect

* Replace useEffect hook with a simple if statement to check if connectRequest exists and add null return statement to avoid warnings

* Remove unneeded dependency

* Added back useEffect and added a extra check to return null if connectRequest is false

* Fixed eslint problem

* Fixed all issues commented in the pr
2023-04-05 09:50:30 +01:00
Thomas Huang
3a38140cb6
Onboarding app header onboarding unit test and snapshot (#18254) 2023-04-04 19:59:09 -07:00
George Marshall
739075662c
Migrating Icon to typescript and deprecating JS component (#18431)
* Migrating Icon to typescript and deprecating JS component

* gw suggestions (#18434)

---------

Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-04-04 09:48:04 -07:00
Mark Stacey
2029fb28ff
Fix MMI build (#18415)
In the MMI build, the build fencing in this component resulted in an
`else` block with no preceding `if` block, which is a syntax error.
The fence in this case was meant to include "all non-Flask build
types", MMI was mistakenly missing from that list.

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: António Regadas <apregadas@gmail.com>
2023-04-04 10:29:10 -02:30
Nidhi Kumari
4b271868cf
Disabled button for Import Tokens Modal when no token is selected (#18396)
* disabled button for zero token

* addressed changes
2023-04-04 11:23:05 +05:30
Nidhi Kumari
0614b3db68
UXMultichain: update segmented tabs (#18283)
* update tabs to functional component

* updated Tabs to use Box

* updated css for tab

* updated css on home screen

* updated snapshot

* fixed defaultkey and active key value for new keys
2023-04-03 23:27:14 +05:30
Garrett Bear
01057f9824
convert text component to TS (#18329)
* convert text component to TS

* invisible character fix

* storybook fix

* fix types export

* update ButtonBase

* add typeof to objects in TextProps

* fix linting issues

* fix implicit conversion

* lint fix

* add deprecated Text back

* change box ref to any

* fix classnames issue

* account details to use deprecated text reference

* ref update

* make RefObject

* remove RefObject and go back to Ref

* react.ref change to box
2023-04-03 10:42:37 -07:00
David Drazic
8603a4b067
[FLASK] Add permission cell component (#18372)
* Add permission cell component

Add storybook and handling for revoked permission colors

* Fix things after conflict resolve after rebase

* Add code refactoring and minor UI changes

* Add permission cell component to snap-update flow

* Update storybook

* Add unit tests for permission cell

* Update component padding

* Fix spacing between permission cells

* Fix main icon color for approved permissions

* Update width value with constant
2023-04-03 19:33:54 +02:00
Guillaume Roux
f51055802f
[FLASK] Update snap delineator (#18385) 2023-04-03 18:04:30 +02:00
Elliot Winkler
1304ec7af5
Convert shared/constants/metametrics to TS (#18353)
We want to convert NetworkController to TypeScript in order to be able
to compare differences in the controller between in this repo and the
core repo. To do this, however, we need to convert the dependencies of
the controller to TypeScript.

As a part of this effort, this commit converts
`shared/constants/metametrics` to TypeScript. Note that simple objects
have been largely replaced with enums. There are some cases where I even
split up some of these objects into multiple enums.

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2023-04-03 09:31:04 -06:00
David Walsh
a71a06965c
UX: Multichain: Network Menu (#18229) 2023-03-31 12:58:25 -05:00
Nidhi Kumari
0bbfd38cc6
UX Multichain: Menu for Site connections and permissions (#18167)
* added site connection menu component

* reverted change for unlock page

* updated snapshot

* updated state with useSelector

* updated state for connected

* updated icons

* updated test

* updated snapshot

* moved component to multichain folder

* updated color

* added multichain connection to menu bar

* updated default color

* updated css

* updated multichain site with connected site info

* updated ui for not connected state

* removed scripts

* updated lint errors

* updated lint errors

* updated stories

* updated story for not connected to current state

* updated story for not connected to current state

* updated badge to 16px

* updated badge position

* updated snapshot

* fixed lint errors

* updated not connected state icon

* updated constants for status and added new locale string
2023-03-31 22:53:27 +05:30
David Walsh
74b9ab28f3
UX: Multichain: Close account menu when item is clicked (#18393) 2023-03-31 10:41:51 -05:00
Dan J Miller
41210084dd
Allow specific origin to direct to second page of token allowance flow (#18395)
* Allow specific origin to direct to second page of token allowance flow

* Remove accidentally committed git diff text

---------

Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
2023-03-31 11:34:55 -02:30
Pedro Figueiredo
fbd68d4a3f
Introduce action metrics for mv3 service worker restart (#18346)
* fix dapp interaction e2e test

* wip

* add sentry post request mock

* fix console errors

* fix scripting console error and remove e2e test unnecessary check

* clean up

* remove e2e test

* stop skipping  test

* fixing build mv3 job

* fixing unit tests

* fixing unit tests

* fixing unit tests

* update coverages

* revert skip mv3 e2e test

* remove IN_TEST on the npm script

* remove console.log

* revert aria label changes

* revert aria label changes

* revert permission changes

* revert permission changes

* implement sw restart delay tracking

* fix rebase
2023-03-31 14:22:33 +01:00
Albert Olivé
c2618176f6
[MMI] Added code fencing in info tab component (#17910)
* Added code fencing in info tab component

* Fixed storybook urls

* Removed isBeta mmi code fencing
2023-03-31 13:23:11 +02:00
António Regadas
234fb4ac5d
[MMI] confirm-add-custodian-token component (#18261)
* adds component with locales and test

* adds feedback from review

* adds storeis file

* update snapshots

* prettier

* clean up stories file

* relocation

* review fixes

* Update ui/pages/institutional/confirm-add-custodian-token/confirm-add-custodian-token.js

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

* Update ui/pages/institutional/confirm-add-custodian-token/confirm-add-custodian-token.js

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

* Update ui/pages/institutional/confirm-add-custodian-token/confirm-add-custodian-token.js

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

* Button path remove

* Update ui/pages/institutional/confirm-add-custodian-token/confirm-add-custodian-token.js

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

* pulled

* stories file update location

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-31 11:30:10 +02:00
David Walsh
e895ff33f9
NFTs: Use Unknown Collection instead of first NFT name (#18388)
* NFTs: Use Unknown Collection instead of first NFT name

* Use localization in hook

* Get localization for previously owned

* Fix tests

---------

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2023-03-31 06:41:07 -02:30
Thomas Huang
00e6471d90
IPFS unit test for onboarding privacy setting (#18252) 2023-03-30 19:27:36 -07:00
Elliot Winkler
ed3cc404f2
NetworkController: Split network into networkId and networkStatus (#17556)
The `network` store of the network controller crams two types of data
into one place. It roughly tracks whether we have enough information to
make requests to the network and whether the network is capable of
receiving requests, but it also stores the ID of the network (as
obtained via `net_version`).

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

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

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

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

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

Now:

* One fewer request is made, specifically `eth_blockNumber`, as we don't
  need to make an extra request to determine whether Infura is blocking
  requests; we can reuse `eth_getBlockByNumber`;
* All requests are awaited, which makes `lookupNetwork` run fully
  in-band instead of partially out-of-band; and
* Both requests for `net_version` and `eth_getBlockByNumber` are
  performed in parallel to make `lookupNetwork` run slightly faster.
2023-03-30 16:49:12 -06:00
Jyoti Puri
b3e45ea4bc
Adding terms of use link for opensea (#18381) 2023-03-30 22:25:02 +04:00
David Walsh
6f7e382777
UX: Multichain: Improve accessibility of accounts menu (#18309)
* UX: Multichain: Improve accessibility of accounts menu

* Use button instead of a

* Pass color instead of using CSS
2023-03-30 13:12:45 -05:00
David Walsh
ba307d7258
UX: Multichain: Account Picker (#18177)
* UX: Multichain: Account Picker

* 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>

* Cleanup

* Move file names to DS standard

* Add index for export

* Add MULTICHAIN flag

* Fix hover color

* Fix lint

* Use BackgroundColor instead of Color

* Add comments for propTypes

* Provide args properly

* Implement onClick arg

* Fix alignment

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

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

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

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

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

* Only use account name and address, account for blockies or jazzicons

* Add test

* Fix jest change

* Fix CSS locations

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

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

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

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

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

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

* Update snapshot

* Update border radius

* Fix jest

* Switch to using Button

---------

Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-03-30 13:11:13 -05:00
Pedro Figueiredo
05f0006684
Fix aria label error on the console (#18370)
* fix aria label bug

* improve solution

* improve solution

* improve solution

* update snapshot
2023-03-30 18:33:42 +01:00
Alex Donesky
da06901f79
Fix #18199 : Add fallbacks for confirmation title on NFT transfers (#18269)
* add fallbacks for confirmation title on nft transfers

* Add token name and id

* fix

* fix test

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2023-03-30 14:07:29 -02:30
António Regadas
9f89d71c6f
[MMI] compliance settings component (#18274)
* MMI-2657 adds the compliance settings screen

* MMI-2657 adds stories file

* review fixes

* review fixes

* lint fix

* clean up

* Update ui/components/institutional/compliance-settings/compliance-settings.stories.js

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

* lint fix

* snaps update

* Button update

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-03-30 12:40:37 +02:00
Albert Olivé
b5184db620
[MMI] Added code fencing in keyring-label component (#17993)
* Added code fencing in keyring-label component

* Updated tests
2023-03-30 09:42:59 +02:00
Albert Olivé
f7aea9dc34
[MMI] Created institutional-entity-done-page component (#18096)
* Created institutional-entity-done-page component

* Added index file

* Added css file and Boxes

* Fixing prettier formatter

* Fixed prettier format

* Fixing prettier issues

* Fixed prettier

* Adding Text component

* Removed styles and added story

* Moving component to pages and improving styles

---------

Co-authored-by: António Regadas <apregadas@gmail.com>
2023-03-30 08:33:12 +02:00
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
David Walsh
6052841381
Fix breaking jest test for MMI (#18365)
* Fix breaking jest test for MMI

* Bump coverage threshold

---------

Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Co-authored-by: PeterYinusa <peter.yinusa@consensys.net>
2023-03-29 13:44:04 -04:00
David Walsh
efc34b9420
UX: Multichain: Address Copy Button (#18153) 2023-03-29 11:14:38 -05:00
António Regadas
8fbd1e30e8
[MMI] compliance feature page (#18320)
* MMI-2657 adds the compliance settings screen

* MMI-2657 adds stories file

* wip compliance feature page

* adds stories and fixes imports

* adds storybook and tests

* lint fix
2023-03-29 14:49:45 +01:00
OGPoyraz
f32d71ba1a
Merge pull request #18102 from MetaMask/fix/599-fix-theme-issues-of-desktop-pairing-page-in-the-extension-ui
fix: fix theme issues of desktop pairing page
2023-03-29 10:58:17 +02:00
Thomas Huang
8f65c268b4
Welcome onboarding unit test (#18248) 2023-03-29 14:00:34 +08:00
Youmna Jaza
6be18552ab
Updating Typography to Text (#17681)
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-03-28 15:04:22 -07:00
David Walsh
870415f111
UX: Multichain: Global Action Menu (#18158) 2023-03-28 14:59:18 -05:00
David Walsh
8cba64b993
Remove isEIP1559Account usage (#18064) 2023-03-28 09:50:02 -05:00
Goktug Poyraz
c640e769b2 Update snapshot 2023-03-28 10:36:53 +02:00
Goktug Poyraz
3a1bcf1446 Adds desktop pairing page story and fix suggestions 2023-03-28 10:35:30 +02:00
Goktug Poyraz
c1b607bdba Fix: add tests 2023-03-28 10:35:30 +02:00
“Goktug
d2098e26ac fix: fix theme issues of desktop pairing page 2023-03-28 10:35:30 +02:00
aleksandar-mihajlovic
0f1b86a037
Removed advanced gas controls from the settings (#18138) 2023-03-27 08:45:17 +02:00
Frederik Bolding
4179ce634c
[FLASK] Update snap authorship component (#18262)
* Create new snap authorship component

* Add icons and fix overflow issues

* Add empty state + more fixes

* Fix overflow

* Move some code to SnapAvatar

* Fix lint

* Change component name

* Delete forgotten file
2023-03-24 17:16:46 +01:00
Garrett Bear
79b2deb194
update text component color to use box color (#18246)
snapshot updates

fix snapshots

add background colors

fix snapshots
2023-03-23 13:00:37 -07:00
Ariella Vu
0d2c54e808
Fix Signature Request scroll (#18305)
* signature-req: fix scroll

* signature-req: fix scroll allow items to shrink
2023-03-23 16:04:24 -03:00
Jyoti Puri
5dee7904d6
Extracting out title component from confirm-transaction-base (#17991) 2023-03-23 22:21:33 +04:00
micaelae
2fc0d93789
Disable Bridge button on unsupported networks (#18268) 2023-03-23 14:54:10 -02:30
Ariella Vu
196b8408d0
PermissionsConnectHeader: unlock SiteOrigin title (#18270)
* PermissionsConnectHeader: unlock SiteOrigin title

* SignatureRequestOriginal: unlock SiteOrigin title

* signature-req: update snapshots
2023-03-23 13:32:54 -03:00
Dan J Miller
270ff26561
Fixes to the Linea Goerli implementation (#18290)
* Ensure that NonInfuraDefaultNetworks are only selected in the dropdown if they are the currently selected network

* Ensure Linea Goerli network appears in network settings tab if added manually
2023-03-23 13:37:28 -02:30
Garrett Bear
ed5b78d61b
Feat/add header base component (#18043)
* add header base component

* fix resizing issue

* add center

* add demo

* header base using flexbox

* fix button issue

* header base clean up

* update tests

* add readme description

* add docs

* update snapshot

* add more to readme

* convert to TS

* fix file name

* fix types and colors

* fix classname error

* fix boxprops import

* fix boxprops

* prop fix

* fix errors

* Update ui/components/component-library/header-base/header-base.stories.tsx

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

* Update ui/components/component-library/header-base/header-base.types.ts

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

* Update ui/components/component-library/header-base/header-base.types.ts

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

* headerbase fixes

* fix export

* remove Math.max

* change order for index on storybook to prep build

* revert back to order

* remove type from export

* add type to export

* change export of headerbase function

* export update

* revert back to normal

* add type to export

* Removing interface export from index

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-23 08:24:23 -07:00
George Marshall
99bdf8458c
Adding ModalOverlay component (#18161) 2023-03-23 06:36:09 -07:00
Ariella Vu
4474359591
Fix overflowing UI & buttons in Signature Request screens (#18247)
* signature-req: fix overflow ui

* signature-req: fix uneven btn height
2023-03-23 10:25:00 -02:30
aleksandar-mihajlovic
8c310a0a8b
Fix for hovering any Address parsed on Signed Type Data screen does not display the pointer anymore (#18046)
* Signed Type Data address hover fix

* Snapshots fix

* Snapshots update fix

* Update snapshot
2023-03-23 08:05:25 -02:30
Nidhi Kumari
fcfb8a8938
UX: Multichain: Added TokenList Component (#17859)
* added redesign storybook

* updated token list

* updated css

* fixed lint error

* updated the new token list component

* fixed redesign folder error

* reverted changes in settings.json

* updated redesign to multichain

* added feature flag

* reverted settings.json

* added detect token banner

* added button componeny

* fixed lint errors

* removed settings

* fixed lint errors

* added stories for multichain

* updated no token found string

* updated lint error

* updated padding values

* updated padding values

* updated tabs with role button

* updated hover state

* updated components with multichain

* fixed lint errors

* updated multichain import token link

* updated a tag

* updated fixes

* updated onClick to handleClick

* updated setShowDetectedTokens proptype

* updated multichain tokenlist with item suffix

* updated tests

* updated tests

* updated token list css

* updated snapshot

* updated text

* reverted story

* added story for multichain token list

* updated story

* updated tooltip

* updated the new token list component

* fixed redesign folder error

* added feature flag

* reverted unused setting change

* removed token list

* fixed lint error

* updated status

* updated tooltip

* updated token-list-item changes

* updated actionbutton click for detect token banner

* updated snapshot

* updated symbol

* updated styles

* updated eth decimal and token url

* updated snapshot

* updated scripts

* updated snapshots
2023-03-23 15:38:33 +05:30
George Marshall
68f928c8a2
Adding ModalContent component (#18175)
* Adding ModalContent component

* Using different component api for ref

* use imperative handle

* Updating size

* Updating stories and docs as well as component api

* Fixing import
2023-03-22 17:17:19 -07:00
vthomas13
16fa967740
Revert "What's new - OpenSea security provider (#16831)" (#17968)
This reverts commit 932282e638.
2023-03-22 12:51:37 -04:00
Nidhi Kumari
cedef121a3
updated keyringType (#18273) 2023-03-22 16:39:58 +05:30
David Walsh
c079c4320e
UX: Multichain: Account Menu List (#17947)
* UX: Multichain: Account Menu List

* Move to using stylesheet

* Add hover state

* Implement George's suggestions

* Add connected site avatar

* Add hardware tag

* Create story for selected hardware item

* Progress on the AccountListItemMenu

* Add story for AccountListItemMenu

* Better position the account menu

* Fix AvatarFavicon missing name prop

* Update menu options label to be account specific

* Update text of 'View on Explorer'

* Add AccountListMenu component

* Move all items to multichain directory

* Fix paths

* Fix linting, use AvatarIcon

* Add title and close button to account menu

* Center the popover title

* Add search functionality

* Implementation WIP

* Add MULTICHAIN feature flag

* Add MULTICHAIN feature flag, add actions for menu items

* Properly dispatch events

* Fix search box padding

* Fix sizing of menu item text

* Fix isRequired

* Fix alignment of the popover

* Update label for hardware wallet items, add text for no search results

* Update keyring retreival to remove account and add label

* Fix storybook

* Fix double link click issue, prevent wrapping of values

* Use labelProps for tag variant

* Restructure item menu story

* Empower storybooks for all new components

* Allow only 3 decimals for currencies

* Avoid inline styles

* Prefix classes with multichain, fix account-list-menu storybook

* Close the accounts menu when account details is clicked

* Restore tag.js

* Create global file for multichain css

* Add index file for multichain js

* Update file paths

* Ensure the block domain is present in menu

* Add AccountListItem test

* Add AccountListItemMenu tests

* Show account connect to current dapp

* Improve tests

* Make avatar smaller

* Add tooltip for account menu

* Align icon better

* Update snapshot

* Rename files to DS standard

* Add index files for export

* Export all multichain components

* Update snapshot

* Remove embedded style in popover

* Add comments for props, cleanup storybook

* Improve test coverage

* Improve test code quality

* Remove border form avatar

* Switch to using the ButtonLink iconName prop

* Only show tooltip if character limit is reached

* Restore prior search settings

* Add test for tooltip
2023-03-22 15:30:08 +05:30
David Walsh
7dab4b53a4
Fix TypographyVariant typescript issues (#18272) 2023-03-22 13:22:30 +05:30
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
Suryansh Anand
b9f00ba536
Changed all Typography to Text component in welcome.js and edit-gas-display.component.js (#18116)
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-21 23:47:59 +05:30
Ariella Vu
5e3770eb13
Replace ActionableMessage components with BannerAlerts in SIWE Sign-in with Ethereum page (#18207)
* siwe: re-enable warning UI for mismatched domains
- unblocks mismatched domain support
- we may re-add error handling here #18184
- reverts logic from #16616

* siwe: fix mismatch domain warning msg UI

* lint: rm whitespace EOL

* siwe: rm unit test

* lint: fix whitespace

* Icon: support .mm-icon
- apply to SIWE actionable-message
- .mm-icon is a <span>

* lint: fix newline

* Revert "siwe: rm unit test"

This reverts commit c80a4a2e661609c46c76d1e43e05909b6db3f0f5.

* ActionableMessage: add deprecation

* siwe: replace actionable-msg w/ banner-alert

* ActionableMessage: add param for lint

* revert .mm_icon ActionableMessage support

* siwe: create tests

* siwe: fix typo in tests

* siwe: fix - do not allow nested <p> elements

* Update ui/components/app/signature-request-siwe/signature-request-siwe.js

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

* Update ui/components/app/signature-request-siwe/signature-request-siwe.js

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

* eslint fix

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-21 09:49:04 -07:00