* 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
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>
* 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
* 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>
* 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>
An array of integers is now used to represent the SRP in three cases:
* In the import wallet flow, the UI uses it to pass the user-provided
SRP to the background (which converts the array to a buffer).
* In the create wallet flow, the UI uses it to retrieve the generated
SRP from the background.
* When persisting the wallet to state, the background uses it to
serialize the SRP.
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
The `nodeify` utility is no longer needed for the background API.
Instead each method is assumed to be either synchronous or Promise-
returning.
The error handling was updated to at least log the error in the case
where a method fall fails after the connection is broken.
As part of the unlock process, currently the seed phrase is retrieved
from the background then discarded. This step is pointless, so it has
been deleted.
The CurrencyRateController has been migrated to the BaseControllerV2
API, which includes various API changes. These changes include:
* The constructor now expects to be passed a
`RestrictedControllerMessenger`.
* State changes are subscribed to via the `ControllerMessenger` now,
rather than via a `subscribe` function.
* The state and configration are passed in as one "options" object,
rather than as two separate parameters
* The polling needs to be started explicitly by calling `start`. It
can be stopped and started on-demand now as well.
* Changing the current currency or native currency will now throw an
error if we fail to update the conversion rate.
The `ComposableObservableStore` has been updated to accomodate these
new types of controllers. The constructor has been updated to use an
options bag pattern as well, to make the addition of the new required
`controllerMessenger` parameter a bit less unweildly.
The `SET_CURRENT_FIAT` action has been removed. It has been replaced
by a call to `forceUpdateMetamaskState`. The only purpose of this
action was to eagerly update the current fiat currency settings before
the next state update. Forcing a state update instead is simpler and
safer.
The `setCurrentCurrency` function in the background has been updated to
no longer return the state, now that it's no longer needed.