function * walletUnlockSaga (action) {
  try {
    yield siadCall({
      url: '/wallet/unlock',
      method: 'POST',
      timeout: 1.728e8, // two-day timeout, unlocking can take a long time
      qs: {
        encryptionpassword: action.password
      }
    })
    yield put(actions.setEncrypted())
    yield put(actions.setUnlocked())
    yield put(actions.handlePasswordChange(''))
  } catch (e) {
    yield put(actions.handlePasswordChange(''))
    yield put(walletUnlockError(e.message))
  }
}
// Dispatch any API errors as a walletUnlockError action.
Dispatch any API errors as a walletUnlockError action.
Dispatch any API errors as a walletUnlockError action .
function * walletUnlockSaga (action) {
  try {
    yield siadCall({
      url: '/wallet/unlock',
      method: 'POST',
      timeout: 1.728e8, 
      qs: {
        encryptionpassword: action.password
      }
    })
    yield put(actions.setEncrypted())
    yield put(actions.setUnlocked())
    yield put(actions.handlePasswordChange(''))
  } catch (e) {
    yield put(actions.handlePasswordChange(''))
    yield put(walletUnlockError(e.message))
  }
}
function * walletUnlockSaga ( action ) { try { yield siadCall ( { url : '/wallet/unlock' , method : 'POST' , timeout : 1.728e8 , qs : { encryptionpassword : action . password } } ) yield put ( actions . setEncrypted ( ) ) yield put ( actions . setUnlocked ( ) ) yield put ( actions . handlePasswordChange ( '' ) ) } catch ( e ) { yield put ( actions . handlePasswordChange ( '' ) ) yield put ( walletUnlockError ( e . message ) ) } }
Dispatch any API errors as a walletUnlockError action.
Dispatch any API errors as a walletUnlockError action .
// two-day timeout, unlocking can take a long time