* UX: Multichain: Set a maximum width on the network picker
* Fix jest
* Document the max-width
* Adding code example to README
---------
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
* hide search input for single account
* updated test for single account with no search
* nit fix
* nit fix
* added search test for more than one account
---------
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
* feat: add yaml feature management
Add yaml feature file per build type.
Also add method to parse yaml and set
enabled features env to true. The build
process will then replace any process.env[feature]
that exists on the config by its value
* chore: add example for desktop
* Added initial draft of build features
* [TMP] Sync between computers
* Is able to succesfully build stable extension with snaps feature
* Removing var context from builds.yml
* Add asssets to builds.yml
* Minor bug fixes and removing debug logs
* [WIP] Test changes
* Removed TODOs
* Fix regession bug
Also
* remove debug logs
* merge Variables.set and Variables.setMany with an overload
* Fix build, lint and a bunch of issues
* Update LavaMoat policies
* Re-add desktop build type
* Fix some tests
* Fix desktop build
* Define some env variables used by MV3
* Fix lint
* Fix remove-fenced-code tests
* Fix README typo
* Move new code
* Fix missing asset copy
* Move Jest env setup
* Fix path for test after rebase
* Fix code fences
* Fix fencing and LavaMoat policies
* Fix MMI code-fencing after rebase
* Fix MMI code fencing after merge
* Fix more MMI code fencing
---------
Co-authored-by: cryptotavares <joao.tavares@consensys.net>
Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
* Part of #17670 Replace Typography with Text component.
* Worked on the mentioned lint issues.
* Upgrading to enum version.
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
* Upgrading to enum version.
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
---------
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
* Unit tests for Hide Token Confirmation modal
* Unit test for Export Private Key modal
* Unit test for Customize Nonce modal
* Bump coverage targets
---------
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
* Add updated version of the Snaps list UI
Add more changes to match the designs of snaps list
Add next design iteration for snaps list
Update icons, sizes and pointer behaviour
Add redesign for snap settings page
Refactor and improve designs
Fix unit tests and refactor code
Fix e2e test
Fix lint
Update margin values
Add CSS override for connected sites list and update margins
Update paddings as requested
Fix vertical alignment of links
Fix tooltip position on the enable button
Add usage of getSnapName function for displaying snap names
Fix e2e tests and update date format for snap install date
Improve unit test for snap-settings-card
Change installation info logic
Update mocked state for snap
Add tests for ViewSnap component, refactor and update mocked state
Add check for version info
Change Snaps icon in Settings
Refactor Snaps list to use selector
Add handling in case of missing version history
* Fix icon ref
* Remove console logs
* Remove onClick from selector
* Add code fencing for imports in selectors.js
* switched to use banner alert and added story
* enabled dismiss functionality
* remove close button
* bump global branches coverage target
* replace Typography with Text and (link) Button with ButtonLink
* unit test for component rendering
* left-align button links to match text
* update copy to reflect figma mock ups
* update unit test snapshot
* bump coverage threshold
* update snapshot to reflect button component changes
* update snapshot to reflect box changes
* updated ethereum logo icon
* Updating eth logo (#18631)
* Updating eth logo
* Removing border from eth logo identicon
* Removing old eth logo
* updated snapshot and lint errors
* updated eth logo from svg to png
---------
Co-authored-by: George Marshall <george.marshall@consensys.net>
* 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>
* 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>
* 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>
* 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
* 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
* 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
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>
* 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
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.
* add fallbacks for confirmation title on nft transfers
* Add token name and id
* fix
* fix test
---------
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
* 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
* 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
* 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>
* 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
* 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>
The `HardwareKeyringTypes` constant has been renamed to `KeyringTypes`
and moved to a separate constants module, to reflect that it contains
more than just hardware wallet keyring types. This corrects a mistake
made recently during a TypeScript conversion.
* MMI adds the Jwt dropdown
* MMI prettier
* review fixes
* adds the component
* adds tests and story file
* lint & prettier fix
* prettier fix
* prettier and clean up
* prettier and clean up
* 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
* adding base what's new for NFT autodetection
* lintfix
* Adding nfts svg image
* adding new notification to fixture builder for e2e
* lint:fix
* Adding new messaging, styling what's new
* styling descriptions, increasing fullscreen height
* applying firstNotification styling to NFT whats new announcement
* adding scrollDown button to whats new popup
* adding Opensea announcement, removing old announcement, moving scrollDown button up to popover component
* verify-locales:fix
* updating icon
* 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
* add banner-tip component
* set fixed width
* add banner tip props to logo
* fix logo type naming
* update test
* reduce png sizes
* upate type name and add image element test
* updates
* Update ui/components/component-library/banner-tip/banner-tip.js
Co-authored-by: George Marshall <george.marshall@consensys.net>
* update BannerTip
* fix text case banner tip
---------
Co-authored-by: George Marshall <george.marshall@consensys.net>
* Use tokenList to get token details, when available, in getTokenStandardAndDetails
Previously, every call to getTokenStandardAndDetails would fetch data via the provider.
This would result in at least 3 network requests whenever that method is called for an
ERC20 token, contributing to unneccesary loading and lagging in multiple places.
This commit takes advantage of stored data we already have available to avoid the unnecessary
loading.
* Lint fix
* Fix build-quote test
* bump coverage targets
* Pass provider to token-util, for use in ethers Contract module
* Check all possible sources of ERC20 token data before async call to assetsContractController
* Add and update tests
* Update app/scripts/metamask-controller.js
Co-authored-by: Alex Donesky <adonesky@gmail.com>
* Update app/scripts/metamask-controller.js
Co-authored-by: Alex Donesky <adonesky@gmail.com>
* Remove unnecessary this.ethQuery changes
* Use metamask-eth-abis instead of human-standard-token-abi in token-util.ts
* Add explanatory comments to getTokenStandardAndDetails
* lint fix
* Cleanup
* fix test
* Update app/scripts/metamask-controller.js
Co-authored-by: Alex Donesky <adonesky@gmail.com>
* update error message
---------
Co-authored-by: Alex Donesky <adonesky@gmail.com>
* Add Bridge button
* Add newline to the end of bridge svg
* Move Portfolio button
* Vertically center Portfolio button
* Use IconButton for Portfolio button
* Change portfolio button size
* Lowering coverage to get this in for release by a very small amount
* Add unit tests for Portfolio button
---------
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
* Fix incorrect balance in signature request header
* Fix unit tests
* Fix tests and increase unit test coverage
* actually fix unit tests
---------
Co-authored-by: Dan Miller <danjm.com@gmail.com>
* 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
* Updating HelpText component
* Updating logic for html element depending on children
* Adding span to story to reflect docs
* Updating reveal seed instance
* 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>
* UX: Update block explorer icon
* Removing unneeded CSS and some HTML bloat
* Removing unneeded className
* Removing unneeded CSS and reducing HTML bloat for ContractTokenValues
---------
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
* Add ipfs gateway and collectible state to mock-state.json
* Add collectible-default-image test with snapshot and testids
* Add Collectible Details test, snapshot, and test-ids
* Add Collectible Options tests and test-ids
* Add Collectible Items test and test-ids.
* Add more tests to Add Collectible component
* Update Security Tab snapshot with ipfs gateway state value
* Add data-testid to Menu component for menu background
* Lint
* Bump coverage targets
* Remove commented import
---------
Co-authored-by: David Walsh <davidwalsh83@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
Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>