MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / state

Function state

app/core/Engine.ts:1696–1767  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1694 return instance.controllerMessenger;
1695 },
1696 get state() {
1697 assertEngineExists(instance);
1698 const {
1699 AccountTrackerController,
1700 AddressBookController,
1701 AssetsContractController,
1702 NftController,
1703 TokenListController,
1704 CurrencyRateController,
1705 KeyringController,
1706 NetworkController,
1707 PreferencesController,
1708 PhishingController,
1709 PPOMController,
1710 TokenBalancesController,
1711 TokenRatesController,
1712 TransactionController,
1713 SwapsController,
1714 GasFeeController,
1715 TokensController,
1716 TokenDetectionController,
1717 NftDetectionController,
1718 ///: BEGIN:ONLY_INCLUDE_IF(snaps)
1719 SnapController,
1720 SubjectMetadataController,
1721 ///: END:ONLY_INCLUDE_IF
1722 PermissionController,
1723 ApprovalController,
1724 LoggingController,
1725 AccountsController,
1726 } = instance.datamodel.state;
1727
1728 // normalize `null` currencyRate to `0`
1729 // TODO: handle `null` currencyRate by hiding fiat values instead
1730 const modifiedCurrencyRateControllerState = {
1731 ...CurrencyRateController,
1732 conversionRate:
1733 CurrencyRateController.conversionRate === null
1734 ? 0
1735 : CurrencyRateController.conversionRate,
1736 };
1737
1738 return {
1739 AccountTrackerController,
1740 AddressBookController,
1741 AssetsContractController,
1742 NftController,
1743 TokenListController,
1744 CurrencyRateController: modifiedCurrencyRateControllerState,
1745 KeyringController,
1746 NetworkController,
1747 PhishingController,
1748 PPOMController,
1749 PreferencesController,
1750 TokenBalancesController,
1751 TokenRatesController,
1752 TokensController,
1753 TransactionController,

Callers

nothing calls this directly

Calls 1

assertEngineExistsFunction · 0.85

Tested by

no test coverage detected