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

1208 Commits

Author SHA1 Message Date
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
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
Filip Sekulic
54aeb1b791
Replace contract with third party within the token allowance flow (#18101) 2023-04-11 08:49:42 +05:30
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
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
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
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
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
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
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
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
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
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