增加airtel钱包

This commit is contained in:
2026-09-08 01:35:01 +08:00
parent 9ad191ffc6
commit 3771faf12b
6 changed files with 68 additions and 3 deletions
+32
View File
@@ -52,6 +52,7 @@ import {
BharatPeBusinessOTPBind,
PaytmBusinessOTPBind,
PhonePeBusinessOTPBind,
AirtelPersonalOTPBind,
} from '../components/WalletBindComponents';
import { WalletSelectModal, WALLET_ICONS, WALLET_TYPE_COLORS } from '../components/WalletSelectModal';
import { ServerSettingsModal } from '../components/ServerSettingsModal';
@@ -143,6 +144,8 @@ function getBindKeyForWallet(item: WalletItem): string | null {
return otp ? 'freecharge_personal' : 'freecharge_personal_token';
case 'amazonpay':
return 'amazonpay_personal';
case 'airtel':
return 'airtel_personal';
default:
return null;
}
@@ -165,6 +168,7 @@ interface HomeScreenState {
mobikwikPersonalBindType: 'otpMode' | 'tokenMode';
showFreechargePersonalBind: boolean;
showAmazonPayPersonalBind: boolean;
showAirtelPersonalBind: boolean;
// proxy
proxyStatus: 'idle' | 'connecting' | 'connected' | 'disconnected' | 'error';
proxyError?: string;
@@ -217,6 +221,7 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
showFreechargePersonalBind: false,
freechargePersonalBindType: 'otpMode',
showAmazonPayPersonalBind: false,
showAirtelPersonalBind: false,
proxyStatus: 'idle',
showServerSettings: false,
settingsHost: '',
@@ -525,6 +530,7 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
showPaytmBusinessBind, paytmBusinessBindType, showPhonePeBusinessBind, phonePeBusinessBindType, showGooglePayBusinessBind, showBharatPeBusinessBind,
showMobikwikPersonalBind, mobikwikPersonalBindType, showFreechargePersonalBind, freechargePersonalBindType,
showAmazonPayPersonalBind,
showAirtelPersonalBind,
bindPrefillMobile,
} = this.state;
@@ -946,6 +952,29 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
</Modal>
);
}
if (showAirtelPersonalBind) {
return (
<Modal
visible
transparent
onRequestClose={close('showAirtelPersonalBind')}
>
<AirtelPersonalOTPBind
isDebug
initialMobile={bindPrefillMobile}
onRequestOTP={async (wt, p) => {
this._otpCardId = this._pendingCardId ?? newCardId(Api.instance.getUserId(), wt, p.mobile);
return this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, {}, this._otpCardId));
}}
onVerifyOTP={async (wt, p) => {
return this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { hashId: p.hashId }, this._otpCardId));
}}
onSuccess={this.onOtpBindSuccess('showAirtelPersonalBind', 'Airtel bound successfully')}
onError={() => {}}
/>
</Modal>
);
}
return null;
};
@@ -1000,6 +1029,9 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
case 'amazonpay_personal':
this.setState({ showAmazonPayPersonalBind: true });
break;
case 'airtel_personal':
this.setState({ showAirtelPersonalBind: true });
break;
}
}, 300);
};