fix enroll sync flow

This commit is contained in:
Akinwale Ariwodola 2019-05-28 19:05:14 +01:00
parent 51db5ba692
commit 872b060515

View file

@ -60,6 +60,10 @@ class VerificationScreen extends React.PureComponent {
if (this.state.isEmailVerified && !deviceWalletSynced) {
this.setState({ currentPage: 'syncVerify' });
}
if (this.state.isEmailVerified && syncFlow && deviceWalletSynced) {
navigation.goBack();
}
} else {
if (this.state.isEmailVerified && !this.state.isIdentityVerified && !this.state.isRewardApproved) {
this.setState({ currentPage: 'phoneVerify' });
@ -67,17 +71,11 @@ class VerificationScreen extends React.PureComponent {
if (this.state.isEmailVerified && this.state.isIdentityVerified && !this.state.isRewardApproved) {
this.setState({ currentPage: 'manualVerify' });
}
}
if (this.state.isEmailVerified && syncFlow && deviceWalletSynced) {
navigation.goBack();
return;
}
if (this.state.isEmailVerified && this.state.isRewardApproved) {
// verification steps already completed
// simply navigate back to the rewards page
navigation.goBack();
if (this.state.isEmailVerified && this.state.isRewardApproved) {
// verification steps already completed
// simply navigate back to the rewards page
navigation.goBack();
}
}
});
}