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 storybook test runner
* added test runner in ci
* updated test for ci and fixed lint error
* updated lavamoat policy
* updated test command
* updated playwright
* changed command to storybook;ci
* updated command
* updated instance for test-storybook
* updated playwright
* added playwright step
* replaced concurrently with start-server-and-test
* updated the static storybook directory
* replaced first with last
* updated lock file
* replaced first with last
* updated test-storybook with maxworkers
* updated .depchechrc
* updated yml
* removed id from banner base
* replaced broken stories with .stories-to-do.js extesnsion
* updated token allowance story
* removed duplicacies from yarn
* fixed lavamoat
* removed filename comment
* updated links for docs
* fixed file extension for stories
* updated path for stories.json
* updated stories.json path
* yarn updated
* updated stories
* updated yarn
* updated wait on
* Remove ETH badge from NetworkAccountBalanceHeader when on non-ETH networks
* Network specific icons, or fallback, in the network-account-balance-header
* Update snapshots
* Code cleanup
Co-authored-by: Dan Miller <danjm.com@gmail.com>
The `data-test-id` prop has been added to `TextField`. This prop allows
selecting this component more easily from e2e and unit tests. This is
required for a subsequent PR that includes a text field that cannot be
selected for by placeholder or contents or label (any of which would
have been preferable).
* Add design-tokens and apply colors to button
* swap more colors
* tweak button and add dark theme switch to storybook
* tweak buttons
* fix typo
* remove comments
* add dep to ignored list
* fix linting issue
* fix linting issues
* Updating some styles and removing some deprecated buttons (#13742)
* Updating some styles and removing some deprecated buttons
* Warning button fixes
* Fixing warning text for darkmode
* bump design tokens and update storybook theme strategy
Co-authored-by: George Marshall <george.marshall@consensys.net>
ESLint rules have been added to enforce our JSDoc conventions. These
rules were introduced by updating `@metamask/eslint-config` to v9.
Some of the rules have been disabled because the effort to fix all lint
errors was too high. It might be easiest to enable these rules one
directory at a time, or one rule at a time.
Most of the changes in this PR were a result of running
`yarn lint:fix`. There were a handful of manual changes that seemed
obvious and simple to make. Anything beyond that and the rule was left
disabled.
* Show custom tokens in Swaps
* Add messages for adding a custom token in Swaps
* Add the first version of importing custom tokens in swaps
* Fix lint rules
* Create a new component: ImportToken
* Remove a pointer cursor from regular heading
* Fix a CSS issue for tokens with long names
* Update a comment
* Don’t return a custom token if it doesn’t have symbol or decimals
* Only search by contract address if nothing was found
* Track “Token Imported” event
* Fix unit tests
* Import tracking for “Token Imported”, increase token icon font size
* Disable token import for Source Token
* Update logic and content for notifications, update tests
* Do not hide a dropdown placeholder on click, so a user can click on a link
* Update a key name
* Update styling for the “danger” type notification in Swaps
* Show either a warning or danger notification based on token verification occurences
* Remove testnets from SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP
* Use the “shouldSearchForImports” prop
* Create a new function for handling token import: “onOpenImportTokenModalClick”
* Filter token duplicities before iterating over tokens
* Use “address” instead of “symbol” for checking uniqueness
* Trigger Build
* Use a new API (/token) to get token data for importing in Swaps
* Temporarily decrese Jest threshold for functions