Returns a Redux action that is accepted by interbit-middleware to dispatch an action to the specified blockchain
chainAlias(String): The alias of the chain to dispatch to.chainAction(Object): The action to dispatch to the blockchain
(Object|Promise): The promise returned from the blockchain dispatch function. Resolves when the action is accepted by the chain
const middleware = require('interbit-middleware')
const chainAlias = 'whichBlockchain'
const chainAction = {
type: 'DO_A_THING',
payload: {}
}
const chainDispatchAction = middleware.chainDispatch(chainAlias, chainAction)
reduxStore.dispatch(chainDispatchAction)- The chainAlias must be one that is configured in the Interbit config file apps configuration to load in the UI.