* 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
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.
* 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
* 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
* feat: add the consensys zkEVM as a default network
* fix: change infuraNetworkStatus in navigate-txs file
* fix: remove account tracker for zkEVM + remove zkEVM from infura list
* fix: change consensys zkevm name to linea + change rpc url for linea network
* fix: rebase conflicts
* feat: add new colors for linea goerli network
* feat: add new function inside network dropdown to render non infura networks
* feat: add feature toggle for linea network
* fix: add new unit test
---------
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
* Add tooltips to show info about a permission
* Make Tooltip component in scope regardless of build type
* Add descriptions
* Add translation variables and fix tooltip
* Use new icons
* Add missing description after rebase
* Fix build issues
* Fix icons
* Fix translation
* Add missing description
* Fix Ethereum icon
* Update coverage
* NFTs: Remove feature flag for release
* Update security tab jest test
* Fix broken test
* Update snapshot
* Update test
* Fix test
* Remove last usages of flag
* Update CI jobs
* Fix jest tests
* MMI adds all mmi images, build type and manifest files
* build-for-all-custodians
* fix remove-fenced-code test
* no need for axios
* runs prettier
* linter
* MMI moving file out of codebase
* MMI adds locale appNameMmi
* MMI adds locale appNameMmi to verify-locale-strings
* feat: disable deposit popover and replace it with global redirect to onramp on pdapp
* feat: remove legacy code for hardcoded onramp providers
* fix: remove unused visuals and components related to legacy code of deposit popover
* fix: remove unused messages
* feat: use a custom hook for all onramps related methods and variables
* fix: modify the custom hook implementation to include test networks
* fix: remove deprecated file buy-url
* fix: remove references for deleted deposit logos
* fix: network-controller failing unit test
* fix: snapshot loading-swaps-quotes-stories-metadata.test.js.snap
* fix: storybook tests
* fix: remove unused constatns related to buyable onramp chains
* fix: remove unused variables and fix eslint
* adding unit test for useRamps custom hook
* feat: add comment on the proper usage of useRamps within confirm-page-container component
* fix: add unit tests for buy button in token-overview page
* fix: add unit test for open the buy crypto URL for a buyable chain ID in token page
* feat: add unit test coverage for eth-overview page
* fix: update locales
* feat: add desktop enable button component
This component will be added
to the experimental page. Users
will then be able to initialize
a desktop connection
* feat: add desktop pairing page
* feat: add desktop deep-linking shared lib
* test: add initial entries to render helper
Allow specifying initialEntries for
MemoryRouter. This change will allow
testing pages that use the useParam
hook.
* feat: add desktop error page
Error page for any desktop pairing
related issue
* feat: add desktop routes to route component
* feat: add enable desktop button to experimental tab
* feat: add desktop icon when paired in dev mode
* feat: disable ledger live control when desktop enabled
* feat: register desktop error actions on ui init
* fix: add missing code fencing
* chore: remove enable desktop rpc middleware
Now that we are adding the UI
there's no need for this rpc middleware
(as it was used to test desktop background
code)
* fix: display experimental tab for desktop
* refactor class to functional component
* update messages
* fix: use classnames
* feat: add hold to reveal modal
* feat: add new zendesk url for secret recovery phrase and noncustodial wallet
* update: clipboard to clear copied text after delay
* fix: remove save to csv
* feat: update styles for reveal seed page
* fix: update reveal seed snapshot
* add test to check for modal
* fix: lint
* fix: unused messages locale
* fix: use new banner component
* fix: use new button from design system
* fix: update snapshot
* fix: lint
* revert text
* fix: lint
* fix: remove --copy-only
* fix: marginBottom prop value
* fix: iconName and prop error
* --made the QR code slightly smaller so it's less likely to have a scrollbar
--updated the snapshots
* fix: error message not displaying
* SRP hold to reveal using more DS components (#17583)
* Updating to add DS components and remove CSS
* Fixing rendered html and removing some unneeded props
* fix: set block to true
---------
Co-authored-by: Monte <monte.lai@consensys.net>
* fix: add descriptions to messages
* Update ui/components/ui/export-text-container/export-text-container.component.js
fix: lint
Co-authored-by: HowardBraham <HowardBraham@users.noreply.github.com>
* fix: remove using displayWarning in requestRevealSeedWords
* fix: update test to remove displayError
* fix: update design system enums
* fix: messages descriptions
* fix: banner to banneralert
* fix: update preview
* add additional tests
* fix: use jest instead of sinon
* add test if long press isn't completed
* add test if password is wrong
---------
Co-authored-by: Howard Braham <howrad@gmail.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
* Added translation for eth sign toggle
* Disabled the ability to call eth_sign by default. Added ability within advanced settings to renable support for eth_sign
* Add test case for eth_sign being enabled and disabled
* Modified copy
* Moved rpc method preference to its own object within store
* Complete work on moving rpc method preference into its own object within store
* Fix with prettier
* Fix lint
* Fix a unit test
* Fix test
* Renamed function and object keys to be more intuitive
* Fix e2e test
* Enabled eth_sign through preferences fixture
* Fix lint
* Fix e2e test
Wait for the notification popup to close, leaving 2 window handles the extension and the test dapp
* Fix e2e test
* Fix unit test
Enable eth_sign method
* Lint fix
---------
Co-authored-by: PeterYinusa <peter.yinusa@consensys.net>
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
* Add hardcoded list of human-readable snap names
* Make the text properly bold
* Small style fixes to approval screen
* Run yarn lint:fix
* Update snapshots
* Adding browser outdated notification
* updating dependency
* adding unit tests for util function
* adding unit tests for selectors, lintfix
* Added Tests, refactored notification delay logic
* lint:fix
* adding test coverage for method parameter
* Update app/scripts/controllers/app-state.js
adding documentation details
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* moving declaration into test
* Update app/scripts/controllers/app-state.test.js
spacing in test file
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Update jest.config.js
removing duplicate entries
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* using async submitRequestToBackground method
* removing unused import
* removing unnecessary link syntax in notification
* adding opera and edge and associated tests
* handling the undefined case in bowser.satisfies
* setOutdatedBrowserWarningLastShown try/catch
* lint:fix
* Removing try/catch and letting errors bubble up
Removing deprecated displayWarning method
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* taking out forceMetamaskUpdateState call
* excludint app-state test from mocha test suite
* Added note: Jest files should match Mocha excluded
* syntax error, lint:fix
---------
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Add transaction activity log component
* Remove duplicate tx activity log snapshot.
* Convert Advanced Tab to tlr.
* Lint fix
* Change ENS to DNS in mock state data.
* Add test ids for speedup, cancel, rety buttons.
* Convert TransactionListItemDetails component to RTL.
* Convert PageContainerHeader component to RTL.
* Convert TokenInput component to RTL.
* Convert UnitInput component to RTL.
* Convert withModalProps to RTL.
* Convert i18n-helper to RTL.
* Convert ConfirmSeedPhrase component to TLR.
* Convert AddRecipient component to RTL.
* Set process.env metamask build type to 'main' for test
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
* dealt with most of the problems in the Create Account dialog
* Fixed "newAccountNumberName" localizations
* In another language, don't allow accounts named, for instance, Cuenta 3
* Editing an account name later now follows the same rules
* Fixing lint errors
* Responding to the review by @adonesky1
* Worked with @montelaidev to alter the RegExp, in order to catch spaces before and after the account name
* Fixed line breaks for eslint
* ui: add common constant PASSWORD_MIN_LENGTH=8
* ui: simplify password validation logic
* ui: getPasswordStrengthLabel using t from context
Co-authored-by: Alex Donesky <adonesky@gmail.com>
* Privacy - Allow users to set a custom RPC from the onboarding process (#16767)
* Privacy - Allow adding custom IPFS from onboarding (#16782)
* Privacy - Show default selected network after a custom network has been added during onboarding
* WIP: Show dropdown list of networks
* Add network switcher to the onboarding advanced privacy screen
* Fix duplicate imports
* Provide default for networks
* Update ui/helpers/utils/ipfs.js
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
* Fix lint
* Remove unwanted changes
* Fix lint
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
* text housekeeping
* update testing
* Text constant
* TEXT const to story
* format text sizes
* add associated constants to text component
* add all exports to global index.js
* update snapshot
* update text component variants
* Update ui/components/component-library/text/README.mdx
Co-authored-by: George Marshall <george.marshall@consensys.net>
* update rearrangements
* update text in tests
Co-authored-by: George Marshall <george.marshall@consensys.net>
* Expose transaction origin to transaction insight snaps
* Support multiple icons for each label for a permission
* Add transaction insight origin permission
* Fix fencing
* Fix import and permission crash
* Use function properly for connected accounts
* Migrate to new controller packages
`@metamask/controllers` is deprecated, and most of the controllers that
lived here are now located in their own package ([1]). This commit
replaces `@metamask/controllers` in `package.json` with references to
these packages and updates `import` lines to match.
[1]: https://github.com/MetaMask/controllers/pull/831
* Support GitHub registry for draft PRs (#16549)
* Add additional allowed host to lockfile linter
* Update LavaMoat policies
* Add policy exception for nanoid
* Add additional nanoid overrides
* Update LavaMoat policies again
* Bump controller packages
* Update lavamoat
* Bump controller packages
* Update packages to v1.0.0
* Expand gitignore comment
* Unpin controller dependencies, using ^ range instead
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Add beta home banner to home screen
* Move the beta home notification to the app-header
* Updates to formatting
* Add beta home banner to home screen
* Move the beta home notification to the app-header
* Updates to formatting
* Update ui/components/app/app-header/index.scss
Co-authored-by: George Marshall <george.marshall@consensys.net>
* Update ui/components/app/app-header/index.scss
Co-authored-by: George Marshall <george.marshall@consensys.net>
* Update ui/components/app/app-header/index.scss
Co-authored-by: George Marshall <george.marshall@consensys.net>
* Move banner to top of page
* Move to own folder, update styles
* Swith to BOX component
* Address feedback
* Add tests
* Update name of component
* Fix tests
* Fix proptype errors
* Fixups
* Remove unrelated changes
* Remove unwanted string changes
* Update beta component name and text
* Update mock data
Co-authored-by: George Marshall <george.marshall@consensys.net>
* BETA - Update logo imagery
* Restore basic metamask rotating fox
* Adding story and updating colors
* Add beta to following logo
* New, square images
* Add 512 icon
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
* Remove 3box feature and delete ThreeBoxController
Lint locale messages
lavamoat policy updates
* Restore 3Box user trait with value `false`
The 3Box user trait has been restored and hard-coded as `false`. This
ensures that users don't get stuck in our metrics as having this trait.
A deprecation comment has been left in various places for this trait.
* Remove unused state
* Remove additional 3box-related things
* Run `yarn-deduplicate`
* Restore migration that was lost while rebasing
* Remove obsolete override
* Remove additional unused resolutions/dependencies
* Update LavaMoat policies
* Remove obsolete security advisory ignore entries
* Remove 3Box fixture builder method
* Update unit tests
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Enable "Add Popular Network" feature by default
* Fixing e2e tests
* Attempt to fix e2e tests
* Revert "Attempt to fix e2e tests"
This reverts commit d88e8944b8df8f7c3075753f8d8b3480439f8e30.
* Get e2e tests passing
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
* Adding border radius full and updating border radius sizes for box
* Adding missing XS size
* Updating docs and linting issues
* Updating name from 'full' to 'pill'
Update ui/components/component-library/icon/README.mdx
Co-authored-by: George Marshall <george.marshall@consensys.net>
Update ui/components/component-library/icon/icon.stories.js
Co-authored-by: George Marshall <george.marshall@consensys.net>
Update ui/helpers/constants/design-system.js
Co-authored-by: George Marshall <george.marshall@consensys.net>
story fix
font size comment
update auto demo and fix inline style
* refactor backup controller to return the data to be backed up
and do the actual backup in the UI.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Move export-utils to ui/helpers as it's only used in the UI now.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* use context to call event tracker.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Don't make backup function inline.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Deprecating Rinkeby, setting default debug network to Goerli
* Deprecating Ropsten and Kovan
* Conflict fix
* Remove unused localization, test fixes
* Add migration for moving used deprecated testnets to custom networks
* Fix migrator test
* Add more unit tests
* Migration updates provider type to rpc if deprecated network is selected
* Migration fully and correctly updates the provider if selected network is a deprecated testnet
* Continue to show deprecation warning on each of rinkeby, ropsten and kovan
* Add rpcUrl deprecation message to loading screen
* Removing mayBeFauceting prop
Co-authored-by: Dan Miller <danjm.com@gmail.com>
* Dark Mode: Elevate the theme dropdown from experimental to regular settings
* Fix search
* Fix test
* Adjust settings order
* removing renderTheme call from experimental tab and rearranging setting ref number in general tab
Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com>