Skip to content

Commit

Permalink
implement phone verification (#274)
Browse files Browse the repository at this point in the history
* implement phone verification
* update permissions in buildozer.spec
  • Loading branch information
akinwale committed Sep 3, 2018
1 parent e8185e0 commit c0b464a
Show file tree
Hide file tree
Showing 260 changed files with 534 additions and 155 deletions.
92 changes: 79 additions & 13 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
"dependencies": {
"base-64": "^0.1.0",
"lbry-redux": "lbryio/lbry-redux",
"lbryinc": "lbryio/lbryinc",
"lbryinc": "lbryio/lbryinc#phone-verification",
"moment": "^2.22.1",
"react": "16.2.0",
"react-native": "0.55.3",
"react-native-country-picker-modal": "^0.6.2",
"react-native-fast-image": "^5.0.3",
"react-native-fetch-blob": "^0.10.8",
"react-native-image-zoom-viewer": "^2.2.5",
"react-native-phone-input": "^0.2.1",
"react-native-vector-icons": "^5.0.0",
"react-native-video": "lbryio/react-native-video#exoplayer-lbry-android",
"react-navigation": "^2.12.1",
Expand Down
2 changes: 1 addition & 1 deletion app/src/component/AppNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class AppWithNavigationState extends React.Component {
}

if ('toast' === currentDisplayType) {
ToastAndroid.show(message, ToastAndroid.SHORT);
ToastAndroid.show(message, ToastAndroid.LONG);
}

dispatch(doHideNotification());
Expand Down
9 changes: 0 additions & 9 deletions app/src/component/deviceIdRewardSubcard/index.js

This file was deleted.

48 changes: 0 additions & 48 deletions app/src/component/deviceIdRewardSubcard/view.js

This file was deleted.

5 changes: 3 additions & 2 deletions app/src/component/emailRewardSubcard/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ class EmailRewardSubcard extends React.PureComponent {
value={this.state.email}
onChangeText={text => this.handleChangeText(text)} />
{!this.state.verifyStarted && <Button style={rewardStyle.actionButton}
text={"Send Verification Email"}
text={"Send verification email"}
onPress={this.onSendVerificationPressed} />}
{this.state.verifyStarted && emailNewPending && <ActivityIndicator size={"small"} color={Colors.LbryGreen} />}
{this.state.verifyStarted && emailNewPending &&
<ActivityIndicator size={"small"} color={Colors.LbryGreen} style={rewardStyle.loading} />}
</View>
);
}
Expand Down
28 changes: 28 additions & 0 deletions app/src/component/phoneNumberRewardSubcard/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { connect } from 'react-redux';
import { doNotify } from 'lbry-redux';
import {
doUserPhoneNew,
doUserPhoneVerify,
selectPhoneNewErrorMessage,
selectPhoneNewIsPending,
selectPhoneToVerify,
selectPhoneVerifyIsPending,
selectPhoneVerifyErrorMessage
} from 'lbryinc';
import PhoneNumberRewardSubcard from './view';

const select = state => ({
phoneVerifyErrorMessage: selectPhoneVerifyErrorMessage(state),
phoneVerifyIsPending: selectPhoneVerifyIsPending(state),
phone: selectPhoneToVerify(state),
phoneNewErrorMessage: selectPhoneNewErrorMessage(state),
phoneNewIsPending: selectPhoneNewIsPending(state),
});

const perform = dispatch => ({
addUserPhone: (phone, country_code) => dispatch(doUserPhoneNew(phone, country_code)),
verifyPhone: (verificationCode) => dispatch(doUserPhoneVerify(verificationCode)),
notify: data => dispatch(doNotify(data)),
});

export default connect(select, perform)(PhoneNumberRewardSubcard);
Loading

0 comments on commit c0b464a

Please sign in to comment.