Add identity verification to app #366

Merged
kauffj merged 15 commits from rewards3 into master 2017-07-25 01:02:40 +02:00
Showing only changes of commit a63222c7dd - Show all commits

View file

@ -159,22 +159,22 @@ export function doUserIdentityVerify(stripeToken) {
} }
}) })
.catch(error => { .catch(error => {
let user = selectUser(getState()); // let user = selectUser(getState());
user.is_identity_verified = true; // user.is_identity_verified = true;
if (user.is_identity_verified) { // if (user.is_identity_verified) {
dispatch({ // dispatch({
type: types.USER_IDENTITY_VERIFY_SUCCESS, // type: types.USER_IDENTITY_VERIFY_SUCCESS,
data: { user }, // data: { user },
}); // });
} else { // } else {
throw new Error( // throw new Error(
"Your identity is still not verified. This should not happen." // "Your identity is still not verified. This should not happen."
); //shouldn't happen // ); //shouldn't happen
} // }
// dispatch({ dispatch({
// type: types.USER_IDENTITY_VERIFY_FAILURE, type: types.USER_IDENTITY_VERIFY_FAILURE,
// data: { error: error.toString() }, data: { error: error.toString() },
// }); });
}); });
}; };
} }