* Fix fallback gas estimation
Our fallback gas estimation was failing due to a bug in the
`@metamask/controller-utils` package. This was causing gas estimation
to fail completely on certain networks (those not supported by our gas
estimation APIs and non EIP-1559 compatibile), and it was causing the
fallback gas estimation operation (in case our API was down) to fail
across all networks.
Fixes https://github.com/MetaMask/metamask-extension/issues/19735
* Add e2e tests
E2E tests have been added to capture gas estimation. Cases are added
for our API, for the fallback estimate, and for non-EIP-1559 estimates.
As part of this work, the legacy gas API had to be disabled. This was
being used in e2e tests but was dead code in production. It needed to
be disabled to ensure the code under test was reachable.
* Fix gas API referenced in e2e test
* Update unit test snapshots
* 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 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
* 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>
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>
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.
* 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
* 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
* New Icons: Replace instance of fa-qr-code icon
* Update ui/pages/send/send-content/add-recipient/domain-input.component.js
Co-authored-by: George Marshall <george.marshall@consensys.net>
---------
Co-authored-by: George Marshall <george.marshall@consensys.net>
* Use network provider state, instead of CurrencyRateController state, select 'nativeCurrency'
* Fix unit tests
* Lint fix
* Only use the network provider ticket for the native currency when useCurrencyRateCheck is false
* Fix unit test
* Fix tests for real
* 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
* 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>