The package `@metamask/controller-utils` has been updated to v4. This
version was part of the core monorepo v53 release. The remaining
packages released as part of v53 will be updated in later PRs.
This release included a variety of breaking changes, but most of them
did not affect the extension's usage of this library. The one that did
have an impact was the removal of the `Json` type, which was identical
to the `Json` type in `@metamask/utils`. We're now using the
`@metamask/utils` version of this type exclusively.
Relates to #19271
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
* Add Snaps privacy warning on snap install
Add snap install warning status to storage
Add storybook
Add test for snap-privacy-warning
Resolve button type issue
Fix popup display logic
Update fixture
Update popup information and read more handling
Replace deprecated button
Update unit test
* Update buttons and add cancel flow
* Refactoring (review 1)
* Add more unit tests
import account without password
---------
Co-authored-by: Mike B <32695229+plasmacorral@users.noreply.github.com>
Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com>
Co-authored-by: Howard Braham <howrad@gmail.com>
* Add DS Popover component
* Update to Popover story
* make role a prop with PopoverRole enum
* update to Hiro design changes
* fix snapshot
* Update ui/components/component-library/popover/README.mdx
Co-authored-by: George Marshall <george.marshall@consensys.net>
* Update ui/components/component-library/popover/README.mdx
Co-authored-by: George Marshall <george.marshall@consensys.net>
* small story changes and removal of unused forwardRef
* add more test coverage
* add more story demos
* add more popover demos
* if escKeyClose is passed then it will add event listener
* isPortal story
* add if statement
* replace Text with Box for now
* add esc test coverage
* add README docs
* fix readme and onEscKeyClose
* onEscKeyClose to onPressEscKey
* Update ui/components/component-library/popover/README.mdx
Co-authored-by: George Marshall <george.marshall@consensys.net>
* change conditional on useEffect
---------
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
* updating the tokenBalance fetch and Token standard type to enable the Total in setSetApproveForAllWarning
* updating the base-10 for the BN.toString() conversion
* updating review comments
* adding string conversion to tokenBalance
* ConfirmPageContainer: mv props to the top
* ConfirmPageContainer: deprecate sinon
* updating coverage-targets
* updating the conversion base
* ConfirmPageContainer: add test for warning modal
---------
Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com>
* disable prev page button
* test added
* test fixes
* tests fixed
* test fix
---------
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Mike B <32695229+plasmacorral@users.noreply.github.com>
* devDeps: pin @babel/core and @babel/runtime in resulotions
Without this: misses patch, lavamoat error
* storybook 6 to 7 migration
* devDeps: add @storybook/addon-mdx-gfm
* fix lint deps
* devDeps: remove unused require-from-string
* devDeps/resolutions: @types/react@^16.9.53
* devDeps: add @storybook/cli
* storybook: new-frameworks migration
* iyarc: remove resolved dependency advisory
* deps: set globalthis@1.0.1 in resolutions
This is required since a file is copied over from a set path in the dist
package subdirectory as of d13aabde23 (#10014).
A future update should either vendor the shim, or update to
compatibility with a maintained upstream version.
* mdx2 migration fixes
* chore: bump ljharb packages
* devDeps: @storybook/*@^7.0.10->^7.0.11
* storybook: update preview.js to use v7 addon api
* ci/test/storybook: echo between storybook build&test
* ci/circleci: resources tweak
* info-tab: handle undefined global.platform
* update lavamoat build policy
* update lavamoat browserify policies
* UX: Multichain: Ensure percentage of account name always shown
* Remove extra spacing between value and menu, use proposed widths
* Setup widths via storybook and props
* Remove spacing between avatar and asset value
* WIP: Setup customization for Sara, update hard-coded font sizes
* Implement final widths
* Cleanup CSS
* Added code fences for account menu
* updates test and messages json
* clean up
* icons
* icons color correct
* icon size fix
* icon size fix
* adds mmi entries and updates to the new IconName
* clean up
* lint
* clean up
* prettier
* prettier
* camel case
---------
Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
Co-authored-by: António Regadas <apregadas@gmail.com>
* Started adding styles imports with code fences
* FIxed prettier issues
* removed fences since they dont do anything
* Update ui/components/ui/ui-components.scss
Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
---------
Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
Co-authored-by: António Regadas <apregadas@gmail.com>
Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
* Ensure the GasDetailsItem component can handle a tx with a maxPriorityFee of 0
* Clean up code
* Update ui/components/app/gas-details-item/gas-details-item.js
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
---------
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Worked on issue #17670 & #18714 in file token-details-page.js in file
* Worked on issue #17670 & #18714 in file token-details-page.js in file
* Update token-details-page.js
* Remove border radius from network menu list
* Provide background color for test network avatars
* Make button size large
* Update ui/components/multichain/network-list-item/network-list-item.js
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
* Fix lint
---------
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
* adds mmi logic to home container
* adds code fences to home component
* adds code fences to home component
* lint fix
* lint fix
* updates fences and runs prettier
* version bump
* clean up code fence
* Fix account details editable label
* Fix font-weight of the password label
* Remove duplicate error
* Hide password warning on first screen after bad password, autofocus password field
* Fix jest failure
* Restore className
* Addressed some lint issues.
* Worked on the mentioned lint issue.
* Worked on the CRLF lint issues.
---------
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
* Fixed UI updates for header
* updated padding
* replaced grey avatar border with white color and updated snapshots
---------
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
* added eth sign first step
* added modal
* added validation for form
* updated width with block
* added state trigger for toggle
* updated Eth sign modal text changes
* added eth sign toggle tex
* removed unnecessary code
* fixed form validation text
* updated eth toggle text
* added test
* added analytics
* updated design changes
* lint fix
* updated error text
* updated changes
* Converted file extension from .js to .tsx
* Updated README docs to match the enums. Resolved type errors
* Updated AvatarBaseSizes enum values to string literals
* Added TEXT_TRANSFORM.UPPERCASE as default value of textTransform in base file
* lint fix
* Solved liniting errors in avatar-base
* Made enum more consistent, added desc for AvatarBaseProps
* Updated snapshots of AvatarBase and exported AvatarBaseProps in index.ts
* Made textTransform property accept right values in avatar-base.tsx
* Adding temporary changed extensions
* Reverted files back to tsx and resolved conflicts
* Solved linting errors
* AvatarBaseProps now extends TextProps
* Changing extension to resolve conflict
* Reverted extensions back to tsx after resolving conflicts
* Added forwardRef in AvatarBase
* Updated import name of AvatarBaseSize in README.mdx. Removed empty children attribute from AvatarBase storybook file
---------
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
* UX: Multichain: Implement Account Details Popover
* Styling account details popover
* using ButtonSecondary with variant, removing Text
* adding account-details jest test
* Close popover when outside area clicked
* Move all export functionality into the popover
* Improve jest tests
* Implement new design for export key screens
* Hide warning when popover is closed
* Vertically align the copy button
* Move AccountDetailsDisplay to its own file
* Move authentication to its own file
* Move private key to its own component
* Fix misalignment of avatar on display screen
* Move private key to its own component
* Update ui/components/multichain/account-details/account-details-authenticate.js
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
* Update ui/components/multichain/account-details/account-details.test.js
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
* Prevent account name overflow, update text size
* Use FormTextField
* Add analytics
* Move location of accountDetailsAddress
* Ensure passsword input is used
---------
Co-authored-by: Victor Thomas <10986371+vthomas13@users.noreply.github.com>
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
* Rename `provider` to `providerConfig`
The network controller `provider` state has been renamed to
`providerConfig`. This better reflects what this state is, and makes
this controller more closely aligned with the core network controller.
All references to the provider configuration have been updated to
prefer `providerConfig` over `provider`, to make the distinction clear
between a provider and provider config.
Closes#18902
* Add migration
The `getProviderConfig` selector is now used anywhere the `provider`
state was previously referenced directly. This was done to simplify
renaming this state from `provider` to `providerConfig` in a later PR.
Note that there are many opportunities left to use more-specific
selectors (e.g. `getChainId()` over `getProviderConfig().chainId`), but
that was intentionally omitted from this PR to reduce the size. I
started going down this path and it quickly exploded in scope.
Relates to #18902
* Adding strong tag support for Text component
* Update build-quote.js
* Update awaiting-signatures.js
* Used <strong> tag in a better way.
* Remove <strong> tag from file: awaiting-signatures.js
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
* Update awaiting-signatures.js
* Update ui/components/component-library/text/text.scss
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
* Update ui/pages/swaps/build-quote/build-quote.js
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
* Removing unintended UI and strong css from Text component
---------
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
The provider configuration selector has been renamed from `getProvider`
to `getProviderConfig`, and it has been moved from the selectors module
into the MetaMask slice. A JSDoc description has been added as well.
This refactor was done to make a future PR simpler, and to make this
selector better aligned with best practices.
This relates to #18902
* 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
The range of browsers considered to be outdated has been updated to
match our latest browser support policy, which is ~2 years on Chrome,
and the most recent end-of-life extended support release on Firefox.
Comments have been added to help explain how these versions were chosen
as well.
* 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