diff --git a/app/src/component/phoneNumberRewardSubcard/view.js b/app/src/component/phoneNumberRewardSubcard/view.js index 2cb841fb..3c3ac8b3 100644 --- a/app/src/component/phoneNumberRewardSubcard/view.js +++ b/app/src/component/phoneNumberRewardSubcard/view.js @@ -40,7 +40,7 @@ class PhoneNumberRewardSubcard extends React.PureComponent { } componentDidMount() { - DeviceEventEmitter.addListener('onReceiveSmsPermissionGranted', this.receiveSmsPermissionGranted); + //DeviceEventEmitter.addListener('onReceiveSmsPermissionGranted', this.receiveSmsPermissionGranted); DeviceEventEmitter.addListener('onVerificationCodeReceived', this.receiveVerificationCode); const { phone } = this.props; @@ -48,13 +48,13 @@ class PhoneNumberRewardSubcard extends React.PureComponent { this.setState({ newPhoneAdded: true }); } - if (NativeModules.UtilityModule) { + /*if (NativeModules.UtilityModule) { NativeModules.UtilityModule.canReceiveSms().then(canReceiveSms => this.setState({ canReceiveSms })); - } + }*/ } componentWillUnmount() { - DeviceEventEmitter.removeListener('onReceiveSmsPermissionGranted', this.receiveSmsPermissionGranted); + //DeviceEventEmitter.removeListener('onReceiveSmsPermissionGranted', this.receiveSmsPermissionGranted); DeviceEventEmitter.removeListener('onVerificationCodeReceived', this.receiveVerificationCode); } @@ -89,10 +89,6 @@ class PhoneNumberRewardSubcard extends React.PureComponent { } } - receiveSmsPermissionGranted = () => { - this.setState({ canReceiveSms: true }); - } - receiveVerificationCode = (evt) => { if (!this.state.newPhoneAdded || this.state.codeVerifySuccessful) { return; @@ -103,16 +99,6 @@ class PhoneNumberRewardSubcard extends React.PureComponent { verifyPhone(evt.code); } - onAllowAccessPressed = () => { - if (!NativeModules.UtilityModule) { - return notify({ - message: 'The required permission could not be obtained due to a missing module.', - }); - } - - NativeModules.UtilityModule.requestReceiveSmsPermission(); - } - onSendTextPressed = () => { const { addUserPhone, notify } = this.props; @@ -169,17 +155,6 @@ class PhoneNumberRewardSubcard extends React.PureComponent { return ( Pending action: Verify Phone Number - {!this.state.canReceiveSms && - - - You can grant access to the receive SMS permission in order to verify phone number. Alternatively, you can enter the verification code manually. - -