mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Use DesktopManager in background script to redirect internal and external connections to the desktop app. Include DesktopController in the MetaMask controller. Support desktop keyrings in MetaMask controller via the overrides object. Create middleware handler to connect to the desktop app while UI code is pending. Add build system support for desktop specific configuration variables.
28 lines
788 B
JavaScript
28 lines
788 B
JavaScript
import addEthereumChain from './add-ethereum-chain';
|
|
import ethAccounts from './eth-accounts';
|
|
import getProviderState from './get-provider-state';
|
|
import logWeb3ShimUsage from './log-web3-shim-usage';
|
|
import requestAccounts from './request-accounts';
|
|
import sendMetadata from './send-metadata';
|
|
import switchEthereumChain from './switch-ethereum-chain';
|
|
import watchAsset from './watch-asset';
|
|
|
|
///: BEGIN:ONLY_INCLUDE_IN(desktop)
|
|
import enableDesktop from './desktop/enable-desktop';
|
|
///: END:ONLY_INCLUDE_IN
|
|
|
|
const handlers = [
|
|
addEthereumChain,
|
|
ethAccounts,
|
|
getProviderState,
|
|
logWeb3ShimUsage,
|
|
requestAccounts,
|
|
sendMetadata,
|
|
switchEthereumChain,
|
|
watchAsset,
|
|
///: BEGIN:ONLY_INCLUDE_IN(desktop)
|
|
enableDesktop,
|
|
///: END:ONLY_INCLUDE_IN
|
|
];
|
|
export default handlers;
|