Skip to content

Instantly share code, notes, and snippets.

@alant
Last active December 24, 2018 11:14
Show Gist options
  • Save alant/dfb74dc8fd828526c42ea7e5a2352aeb to your computer and use it in GitHub Desktop.
Save alant/dfb74dc8fd828526c42ea7e5a2352aeb to your computer and use it in GitHub Desktop.
...
function* showMetaMaskOverlay() {
yield put({ type: 'CHECK_METAMASK' });
}
function* showTxErrorMsg() {
yield put({ type: 'TX_ERROR_METAMASK' });
}
function* showCheckingTxMsg() {
yield put({ type: 'REDIRECT_HOME'});
yield put({ type: 'CHECKING_TX_UI'});
}
function* txSuccessful() {
yield put({ type: 'TX_SUCCESSFUL_UPDATE_UI'});
yield put({ type: 'GET_STORED_VALUE'});
}
...
export default function* root() {
yield takeLatest('PUSH_TO_TXSTACK', showMetaMaskOverlay);
yield takeLatest('TX_ERROR', showTxErrorMsg);
yield takeLatest('TX_BROADCASTED', showCheckingTxMsg);
yield takeLatest('TX_SUCCESSFUL', txSuccessful);
yield all(
drizzleSagas.map(saga => fork(saga))
);
yield getStoredValueWatcher();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment