import { SagaIterator } from 'redux-saga' ; import { takeEvery , put , call , select , take } from 'redux-saga/effects' ; import Keyring from 'utils/keyring' ; import { generateSeed , exportSeed , importSeed , receiveSeed } from '../application/actions' ; export function * generateSeedWorker ( ) { const seed = yield call ( Keyring . generateSeed ) ; yield put ( receiveSeed ( seed ) ) ; } export function * exportSeedWorker ( ) { yield call ( console . log , 'export' ) ; } export function * importSeedWorker ( ) { yield call ( console . log , 'import' ) ; } export default function * seedSaga ( ) { yield takeEvery ( generateSeed , generateSeedWorker ) ; yield takeEvery ( exportSeed , exportSeedWorker ) ; yield takeEvery ( importSeed , importSeedWorker ) ; }