|
|
@ -22,11 +22,13 @@ declare global { |
|
|
|
const _paq = window._paq = window._paq || [] //eslint-disable-line
|
|
|
|
const _paq = window._paq = window._paq || [] //eslint-disable-line
|
|
|
|
let plugin: RunTab, dispatch: React.Dispatch<any> = () => {} |
|
|
|
let plugin: RunTab, dispatch: React.Dispatch<any> = () => {} |
|
|
|
|
|
|
|
|
|
|
|
export const initRunTab = (udapp: RunTab) => async (reducerDispatch: React.Dispatch<any>) => { |
|
|
|
export const initRunTab = (udapp: RunTab, resetEventsAndAccounts: boolean) => async (reducerDispatch: React.Dispatch<any>) => { |
|
|
|
plugin = udapp |
|
|
|
plugin = udapp |
|
|
|
dispatch = reducerDispatch |
|
|
|
dispatch = reducerDispatch |
|
|
|
setupEvents(plugin, dispatch) |
|
|
|
if (resetEventsAndAccounts) { |
|
|
|
resetAndInit(plugin) |
|
|
|
setupEvents(plugin, dispatch)
|
|
|
|
|
|
|
|
resetAndInit(plugin) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export const setAccountAddress = (account: string) => setAccount(dispatch, account) |
|
|
|
export const setAccountAddress = (account: string) => setAccount(dispatch, account) |
|
|
|