From 9477c1fed0268485829f3ae72aeb21522dd5ed02 Mon Sep 17 00:00:00 2001 From: TQCasey <494294315@qq.com> Date: Fri, 6 Feb 2026 18:13:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E9=83=A8=E7=9B=B4=E6=8E=A5=E5=B0=81?= =?UTF-8?q?=E8=A3=85=20bhartpe=20business=20=E7=9A=84=E6=8E=A5=E7=A0=81?= =?UTF-8?q?=E5=92=8C=E8=BD=AC=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.tsx | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/App.tsx b/App.tsx index a931ee4..3370520 100644 --- a/App.tsx +++ b/App.tsx @@ -31,8 +31,6 @@ import { NotificationMessage, proxyBackgroundService, } from "rnwalletman"; -import BarcodeScanning from '@react-native-ml-kit/barcode-scanning'; -import RNFS from 'react-native-fs'; import { FreeChargeBind, @@ -161,18 +159,6 @@ export default class App extends Component { } } - decodeQRFromUrl = async (url: string) => { - const localPath = `${RNFS.CachesDirectoryPath}/temp_qr_${Date.now()}.jpg`; - try { - await RNFS.downloadFile({ fromUrl: url, toFile: localPath }).promise; - const barcodes = await BarcodeScanning.scan(`file://${localPath}`); - if (barcodes.length > 0) return barcodes[0].value; - } catch (e) { - console.error(e); - return null; - } - }; - // Paytm Personal handleUploadPaytmPersonalToken = async (result: PaytmPersonalBindResult) => { try { @@ -239,17 +225,7 @@ export default class App extends Component { handleUploadBharatPeBusiness = async (result: BharatPeBusinessBindResult) => { try { console.log(result); - const qrCode = await this.decodeQRFromUrl(result.qrUrl || ''); - console.log('qrCode:', qrCode); - const response = await Api.instance.register(WalletType.BHARATPE_BUSINESS, { - cookie: result.cookie, - accessToken: result.accessToken, - merchantId: result.merchantId, - userName: result.userName, - email: result.email, - mobile: result.mobile, - qrCode: qrCode, - }); + const response = await Api.instance.register(WalletType.BHARATPE_BUSINESS, result); console.log(response); this.setState({ showBharatPeBusinessBind: false });