MyCrypto/common/sagas/wallet.js

15 lines
512 B
JavaScript
Raw Normal View History

2017-06-29 16:03:11 -07:00
// @flow
import { takeEvery, call, put, select } from 'redux-saga/effects';
import { delay } from 'redux-saga';
import { saveWallet } from 'actions/wallet';
import type { UnlockPrivateKeyAction } from 'actions/wallet';
import PrivKeyWallet from 'libs/wallet/privkey';
function* unlockPrivateKey(action: UnlockPrivateKeyAction) {
yield put(saveWallet(new PrivKeyWallet(action.payload)));
}
export default function* notificationsSaga() {
yield takeEvery('WALLET_UNLOCK_PRIVATE_KEY', unlockPrivateKey);
}