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 });