do not display phone verification action for users who are already reward approved

This commit is contained in:
Akinwale Ariwodola 2018-09-14 04:06:23 -04:00
parent d5366b10fa
commit 33c8aaf36f

View file

@ -44,15 +44,22 @@ class RewardsPage extends React.PureComponent {
const { user } = nextProps;
this.setState({ verifyRequestStarted: false });
if (!emailVerifyErrorMessage) {
this.setState({ isEmailVerified: true });
}
// update other checks regardless of email verify result (due to fetching user data)
this.setState({
isEmailVerified: true,
isIdentityVerified: (user && user.is_identity_verified),
isRewardApproved: (user && user.is_reward_approved)
});
}
}
}
renderVerification() {
if (this.state.isRewardApproved) {
return null;
}
if (!this.state.isEmailVerified || !this.state.isIdentityVerified) {
return (
<View style={[rewardStyle.card, rewardStyle.verification]}>