diff options
Diffstat (limited to 'ui/index.js')
-rw-r--r-- | ui/index.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/index.js b/ui/index.js index 1e0e9f1cc..746e28eab 100644 --- a/ui/index.js +++ b/ui/index.js @@ -69,6 +69,16 @@ async function startApp (metamaskState, accountManager, opts) { store.dispatch(actions.updateMetamaskState(metamaskState)) }) + // global metamask api - used by tooling + global.metamask = { + updateCurrentLocale: (code) => { + store.dispatch(actions.updateCurrentLocale(code)) + }, + setProviderType: (type) => { + store.dispatch(actions.setProviderType(type)) + }, + } + // start app render( h(Root, { |