diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b74894b..41a541d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -16,6 +16,7 @@ void; onError: (error: string) => void; isDebug: boolean; - deviceId: string; - tuneUserId: string; - androidId: string; initialMobile?: string; }> { render() { @@ -50,11 +47,6 @@ export class MobikwikOTPBind extends Component<{ onSuccess={this.props.onSuccess} onError={this.props.onError} isDebug={this.props.isDebug} - additionalParams={{ - deviceId: this.props.deviceId, - tuneUserId: this.props.tuneUserId, - androidId: this.props.androidId, - }} initialMobile={this.props.initialMobile} /> ); diff --git a/screens/HomeScreen.tsx b/screens/HomeScreen.tsx index 48b25ee..696df57 100644 --- a/screens/HomeScreen.tsx +++ b/screens/HomeScreen.tsx @@ -22,7 +22,6 @@ import { GooglePayBusinessBind, WalletType, PaytmBusinessBindResult, - PhonePeBusinessBindResult, PaytmPersonalBind, MobikwikPersonalBindResult, FreechargePersonalBindResult, @@ -518,65 +517,14 @@ export default class HomeScreen extends Component { onRequestClose={close('showPhonePeBusinessBind')} > + this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, {}))} + onVerifyOTP={async (wt, p) => + this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionToken: p.sessionToken }))} onSuccess={this.onOtpBindSuccess('showPhonePeBusinessBind', 'PhonePe Business bound successfully')} - onError={(e: string) => { Alert.alert('Bind Failed', e); close('showPhonePeBusinessBind')(); }} - onRenderBottomView={({ - showOtpInput, - loading, - formError, - phone, - otp, - onPhoneChange, - onOtpChange, - onGetOtp, - onSubmitOtp, - }) => ( - - {!showOtpInput ? ( - <> - - {!!formError && {formError}} - - {loading ? 'Loading...' : 'GET OTP'} - - - ) : ( - <> - - {!!formError && {formError}} - - {loading ? 'Loading...' : 'Verify OTP'} - - - )} - - )} + onError={() => {}} /> ); @@ -626,14 +574,11 @@ export default class HomeScreen extends Component { > - this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, { deviceId: p.deviceId, tuneUserId: p.tuneUserId, androidId: p.androidId }))} + this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile))} onVerifyOTP={async (wt, p) => - this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionId: p.sessionId, deviceId: p.deviceId, tuneUserId: p.tuneUserId, nid: p.nid }))} + this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { generateOtpRequestTimeId: p.generateOtpRequestTimeId }))} onSuccess={this.onOtpBindSuccess('showMobikwikPersonalBind', 'Mobikwik bound successfully')} onError={() => {}} />