* Add new snap header and footer to snap install
* Add new snap header and footer to snap result and snap update
* Fix loading state
* Fix lint
* Add required scrolling
* Adjust avatar component
* Apply new headers and footers to snaps confirmations
* Rename previous SnapAuthorship component to SnapAuthorshipExpanded
* Fix lint
* Fix font weight
* Fix fencing
* Fix a test
* Fix lint after rebase
* Fix E2E
* Fix locale lint
* Fix another E2E
* Fix test ID
* Address PR comments
* Better scroll button centering
* Address design comments
* Fix unit test
* Fix E2Es
* 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
* 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 `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.
* 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
* 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>
* 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>
* 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
* 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>
* 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>
* Add transaction activity log component
* Remove duplicate tx activity log snapshot.
* Convert Identicon test to tlr.
* Convert Metafoxlogo test to tlr.
* Convert Reveal Seed Phrase test to tlr.
* Consolidate and convert Send Footer test to tlr.
* Convert Settings test to tlr.
* Consolidate and convert security tab test to tlr.
* Convert null selectedOption to empty string, and add test id to Dropdown component.
* Add Send state to mock-state
* Lint mock-state.json
* 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>
* Update mock state data
* Convert App Header test to tlr.
* Convert Gas Timing test to tlr.
* Convert Account Details Modal to tlr.
* Update Sig Req test to match mock state changes.
* Add test-ids to Editable Label for Account Details Modal
* Adjust selectors test for the mock state update.
* Add back gasIsLoading for selectors test.
* Replace hardcoded sent ether label on confirm screen
* replace transaction type SENT_ETHER with network agnostic SENDING_NATIVE_ASSET
* remove sentEther translation base
* make backwards compatible with lingering transaction of legacy sentEther type
* update localalization files
* fixup legacy sentEther transaction type
* changing new transaction type away from localization string
* revert migration tests
* update fixtures and test data
* update name of new transaction type
* add migration
* remove legacy SENT_ETHER from transaction types enum object
* Remove use of ethgassthat; use metaswap /gasPrices api for gas price estimates
* Remove references to ethgasstation
* Pass base to BigNumber constructor in fetchExternalBasicGasEstimates
* Update ui/app/hooks/useTokenTracker.js
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
* Delete gas price chart
* Remove price chart css import
* Delete additional fee chart code
* Lint fix
* Delete more code no longer used after ethgasstation removal
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
* Delete CachedBalancesController.cachedBalances
* Migrate provider to Rinkeby instead of deleting it
* Convert hex transaction metamaskNetworkId values to decimal
* Don't migrate provider state in e2e tests
* Don't kick custom RPC users to Rinkeby unnecessarily
* Use provider.chainId for address book chainId values
* Add address book migration
* Fix failing unit test
* fixup! Merge branch 'develop' into address-book-use-chainId
* Select address book entries for display by chainId
* Merge all address book entry keys
* fixup! Merge all address book entry keys
* Use initial transaction for settings swap transaction title params, and remove addition of swap properties to cancel transcations
* Update unit test data
* Use token symbol properties from initial transaction for filitering in transaction list