From 2cd42321a473e783607fd6fbf214c88858ccf6a7 Mon Sep 17 00:00:00 2001 From: joemarct Date: Fri, 13 Dec 2024 20:06:59 +0800 Subject: [PATCH] Fixed error in processing JPP QR code in main QR scanner --- .../ios/App/App.xcodeproj/project.pbxproj | 4 ++-- src/pages/qr/qr-reader.vue | 20 +++++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src-capacitor/ios/App/App.xcodeproj/project.pbxproj b/src-capacitor/ios/App/App.xcodeproj/project.pbxproj index 7a578531c..b622b9095 100644 --- a/src-capacitor/ios/App/App.xcodeproj/project.pbxproj +++ b/src-capacitor/ios/App/App.xcodeproj/project.pbxproj @@ -364,7 +364,7 @@ CODE_SIGN_ENTITLEMENTS = App/App.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 187; + CURRENT_PROJECT_VERSION = 188; DEVELOPMENT_TEAM = 89X576BZBF; INFOPLIST_FILE = App/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -387,7 +387,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = App/AppRelease.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 187; + CURRENT_PROJECT_VERSION = 188; DEVELOPMENT_TEAM = 89X576BZBF; INFOPLIST_FILE = App/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; diff --git a/src/pages/qr/qr-reader.vue b/src/pages/qr/qr-reader.vue index 92211a983..561bed8b1 100644 --- a/src/pages/qr/qr-reader.vue +++ b/src/pages/qr/qr-reader.vue @@ -281,10 +281,10 @@ export default { loadingDialog.hide() }, 700) + let query if (value.includes('bitcoincash:q') || value.includes('bitcoincash:z') || value.includes('bitcoincash:p') || value.includes('bitcoincash:r') || value.includes('bchtest:q') || value.includes('bchtest:z') || value.includes('bchtest:p') || value.includes('bchtest:r') ) { - let query let fallback = false if (payProData.valid) { query = { @@ -298,7 +298,6 @@ export default { query.fungible = payProData.paypro.fungible } - // TODO - Check first if the requested token exists before routing vm.$router.push({ name: 'transaction-send', query @@ -329,6 +328,23 @@ export default { }) } } + } else if (value.includes('bitcoincash:?r')) { + query = { + assetId: vm.$store.getters['assets/getAssets'][0].id, + network: 'BCH', + paymentUrl: String(value) + } + vm.$router.push({ + name: 'transaction-send', + query + }) + } else { + vm.$q.notify({ + message: vm.$t('UnidentifiedQRCode'), + timeout: 800, + color: 'red-9', + icon: 'mdi-qrcode-remove' + }) } } else if (parseWalletConnectUri(value)) { const loadingDialog = vm.loadingDialog()