Skip to content

Commit

Permalink
clean up comments and logs
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-hull committed Jan 9, 2022
1 parent b5be7d6 commit 6c66e75
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/libs/actions/Session/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ function resetPassword() {
*/
function setPassword(password, validateCode, accountID) {
Onyx.merge(ONYXKEYS.ACCOUNT, {...CONST.DEFAULT_ACCOUNT_DATA, loading: true, validateCodeExpired: false});
console.log('set password');
API.SetPassword({
password,
validateCode,
Expand All @@ -324,7 +323,6 @@ function setPassword(password, validateCode, accountID) {
if (login) {
Onyx.merge(ONYXKEYS.CREDENTIALS, {login});
}
console.log('nav home via set password');
Navigation.navigate(ROUTES.HOME);
})
.finally(() => {
Expand Down Expand Up @@ -389,7 +387,6 @@ function clearAccountMessages() {
* @param {String} password
*/
function changePasswordAndSignIn(authToken, password) {
console.log('change password and sign in');
Onyx.merge(ONYXKEYS.ACCOUNT, {validateSessionExpired: false});
API.ChangePassword({
authToken,
Expand Down Expand Up @@ -449,7 +446,6 @@ function validateEmail(accountID, validateCode) {
})
.then((responseValidate) => {
if (responseValidate.jsonCode === 200) {
console.log('email validated ');
Onyx.merge(ONYXKEYS.USER_SIGN_UP, {authToken: responseValidate.authToken});
Onyx.merge(ONYXKEYS.ACCOUNT, {accountExists: true, validated: true});
Onyx.merge(ONYXKEYS.CREDENTIALS, {login: responseValidate.email});
Expand All @@ -458,21 +454,6 @@ function validateEmail(accountID, validateCode) {
if (responseValidate.jsonCode === 401) {
Onyx.merge(ONYXKEYS.SESSION, {error: 'setPasswordPage.setPasswordLinkInvalid'});
}

// if (responseValidate.jsonCode === 666 && !authToken) {
// Onyx.merge(ONYXKEYS.ACCOUNT, {accountExists: true, validated: true});
// resetPassword({email: login});
// Onyx.merge(ONYXKEYS.SESSION, {error: 'setPasswordPage.setPasswordLinkInvalid'});
// return;
// }
// if (responseValidate.jsonCode === 666 && !login) {
// console.log('no email and invalid link');
// Navigation.navigate(ROUTES.HOME);
// return;
// }
// console.log('invalid link - new link requested');
// API.ResendValidateCode({email: login});
// Onyx.merge(ONYXKEYS.SESSION, {error: 'setPasswordPage.setPasswordLinkInvalid'});
}).finally(Onyx.merge(ONYXKEYS.USER_SIGN_UP, {isValidating: false}));
}

Expand Down

0 comments on commit 6c66e75

Please sign in to comment.