diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ce192a67..2759ddf78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.60.0 - 2022-07-05 + +### Added + +- Show QR code for asset wallet address + +### Fixed + +- Show camera feedback on capture photo +- Show correct error message on duplicate phone verification + ## 0.59.5 - 2022-06-28 ### Changed diff --git a/android/app/build.gradle b/android/app/build.gradle index bb9a1c687..5a8d231eb 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "io.numbersprotocol.capturelite" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 415 - versionName "0.59.5" + versionCode 420 + versionName "0.60.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildFeatures { diff --git a/android/app/capacitor.build.gradle b/android/app/capacitor.build.gradle index eb69ef298..2d6ec18cb 100644 --- a/android/app/capacitor.build.gradle +++ b/android/app/capacitor.build.gradle @@ -28,7 +28,6 @@ dependencies { implementation project(':capacitor-storage') implementation project(':numbersprotocol-preview-camera') implementation project(':numbersprotocol-preview-video') - implementation project(':appsflyer-capacitor-plugin') implementation project(':capacitor-blob-writer') implementation "com.android.billingclient:billing:4.0.0" } diff --git a/android/app/src/main/assets/capacitor.plugins.json b/android/app/src/main/assets/capacitor.plugins.json index dc40e55f9..e008e93b8 100644 --- a/android/app/src/main/assets/capacitor.plugins.json +++ b/android/app/src/main/assets/capacitor.plugins.json @@ -75,10 +75,6 @@ "pkg": "@numbersprotocol/preview-video", "classpath": "io.numbersprotocol.capturelite.plugins.previewvideo.PreviewVideoPlugin" }, - { - "pkg": "appsflyer-capacitor-plugin", - "classpath": "capacitor.plugin.appsflyer.sdk.AppsFlyerPlugin" - }, { "pkg": "capacitor-blob-writer", "classpath": "com.equimaps.capacitorblobwriter.BlobWriter" diff --git a/android/capacitor.settings.gradle b/android/capacitor.settings.gradle index e404eabf0..bb81fdf84 100644 --- a/android/capacitor.settings.gradle +++ b/android/capacitor.settings.gradle @@ -59,8 +59,5 @@ project(':numbersprotocol-preview-camera').projectDir = new File('../node_module include ':numbersprotocol-preview-video' project(':numbersprotocol-preview-video').projectDir = new File('../node_modules/@numbersprotocol/preview-video/android') -include ':appsflyer-capacitor-plugin' -project(':appsflyer-capacitor-plugin').projectDir = new File('../node_modules/appsflyer-capacitor-plugin/android') - include ':capacitor-blob-writer' project(':capacitor-blob-writer').projectDir = new File('../node_modules/capacitor-blob-writer/android') diff --git a/ios/App/App/Info.plist b/ios/App/App/Info.plist index b86a67ca8..65bf2de48 100644 --- a/ios/App/App/Info.plist +++ b/ios/App/App/Info.plist @@ -86,8 +86,5 @@ UIViewControllerBasedStatusBarAppearance - - - diff --git a/ios/App/Podfile b/ios/App/Podfile index 80123b236..1199e2ee7 100644 --- a/ios/App/Podfile +++ b/ios/App/Podfile @@ -28,7 +28,6 @@ def capacitor_pods pod 'CapacitorStorage', :path => '../../node_modules/@capacitor/storage' pod 'NumbersprotocolPreviewCamera', :path => '../../node_modules/@numbersprotocol/preview-camera' pod 'NumbersprotocolPreviewVideo', :path => '../../node_modules/@numbersprotocol/preview-video' - pod 'AppsflyerCapacitorPlugin', :path => '../../node_modules/appsflyer-capacitor-plugin' pod 'CapacitorBlobWriter', :path => '../../node_modules/capacitor-blob-writer' pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins' end diff --git a/package-lock.json b/package-lock.json index 22d22a909..611b9008d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "capture-lite", - "version": "0.59.5", + "version": "0.60.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "capture-lite", - "version": "0.59.5", + "version": "0.60.0", "dependencies": { "@angular/animations": "^12.2.4", "@angular/cdk": "^12.2.4", @@ -50,7 +50,7 @@ "@ngx-formly/schematics": "^5.10.22", "@numbersprotocol/preview-camera": "github:numbersprotocol/preview-camera#release-0.0.2-auto-rotate-fix", "@numbersprotocol/preview-video": "github:numbersprotocol/preview-video", - "appsflyer-capacitor-plugin": "^6.5.2", + "@techiediaries/ngx-qrcode": "^9.1.0", "async-mutex": "^0.3.2", "buffer": "^5.7.1", "capacitor-blob-writer": "^1.0.4", @@ -4245,6 +4245,27 @@ "node": ">=6" } }, + "node_modules/@techiediaries/ngx-qrcode": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@techiediaries/ngx-qrcode/-/ngx-qrcode-9.1.0.tgz", + "integrity": "sha512-pjDt+eBjxDds7Iz47VhoSUlv4NiPuSWyMo44GiC7ZLoozBoAo6ga6bW7XS6F89omiWVMJ7Gphh5XI2SAcpfzAg==", + "dependencies": { + "qrcode": "^1.4.4", + "tslib": "^1.10.0" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "@angular/common": ">=6.0.0 || <=10.0.0", + "@angular/core": ">=6.0.0 || <=10.0.0" + } + }, + "node_modules/@techiediaries/ngx-qrcode/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -5308,14 +5329,6 @@ "node": ">= 8" } }, - "node_modules/appsflyer-capacitor-plugin": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/appsflyer-capacitor-plugin/-/appsflyer-capacitor-plugin-6.5.2.tgz", - "integrity": "sha512-bCQI/T0mxUE/cwTlLEt8NY7foLyevovB2aeb7qjQfyoL4+7Lv5BHmo6l5ING7ZPSQTEF2MgEzouIuKdAhpXqRg==", - "peerDependencies": { - "@capacitor/core": "^3.0.0" - } - }, "node_modules/aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -8508,6 +8521,11 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, + "node_modules/dijkstrajs": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.2.tgz", + "integrity": "sha512-QV6PMaHTCNmKSeP6QoXhVTw9snc9VD8MulTT0Bd99Pacp4SS1cjcrYPgBPmibqKVtMJJfqC6XvOXgPMEEPH/fg==" + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -8708,6 +8726,11 @@ "node": ">= 4" } }, + "node_modules/encode-utf8": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz", + "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==" + }, "node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -16081,6 +16104,14 @@ "node": ">=6" } }, + "node_modules/pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/portfinder": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", @@ -19057,6 +19088,165 @@ "node": ">=0.9" } }, + "node_modules/qrcode": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.0.tgz", + "integrity": "sha512-9MgRpgVc+/+47dFvQeD6U2s0Z92EsKzcHogtum4QB+UNd025WOJSHvn/hjk9xmzj7Stj95CyUAs31mrjxliEsQ==", + "dependencies": { + "dijkstrajs": "^1.0.1", + "encode-utf8": "^1.0.3", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "bin": { + "qrcode": "bin/qrcode" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/qrcode/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/qrcode/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/qrcode/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/qrcode/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/qrcode/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/qrcode/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -28391,6 +28581,22 @@ "defer-to-connect": "^1.0.1" } }, + "@techiediaries/ngx-qrcode": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@techiediaries/ngx-qrcode/-/ngx-qrcode-9.1.0.tgz", + "integrity": "sha512-pjDt+eBjxDds7Iz47VhoSUlv4NiPuSWyMo44GiC7ZLoozBoAo6ga6bW7XS6F89omiWVMJ7Gphh5XI2SAcpfzAg==", + "requires": { + "qrcode": "^1.4.4", + "tslib": "^1.10.0" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, "@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -29212,12 +29418,6 @@ "picomatch": "^2.0.4" } }, - "appsflyer-capacitor-plugin": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/appsflyer-capacitor-plugin/-/appsflyer-capacitor-plugin-6.5.2.tgz", - "integrity": "sha512-bCQI/T0mxUE/cwTlLEt8NY7foLyevovB2aeb7qjQfyoL4+7Lv5BHmo6l5ING7ZPSQTEF2MgEzouIuKdAhpXqRg==", - "requires": {} - }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -31734,6 +31934,11 @@ } } }, + "dijkstrajs": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.2.tgz", + "integrity": "sha512-QV6PMaHTCNmKSeP6QoXhVTw9snc9VD8MulTT0Bd99Pacp4SS1cjcrYPgBPmibqKVtMJJfqC6XvOXgPMEEPH/fg==" + }, "dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -31920,6 +32125,11 @@ "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", "dev": true }, + "encode-utf8": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz", + "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==" + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -37649,6 +37859,11 @@ "xmlbuilder": "^9.0.7" } }, + "pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==" + }, "portfinder": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", @@ -39814,6 +40029,125 @@ "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", "dev": true }, + "qrcode": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.0.tgz", + "integrity": "sha512-9MgRpgVc+/+47dFvQeD6U2s0Z92EsKzcHogtum4QB+UNd025WOJSHvn/hjk9xmzj7Stj95CyUAs31mrjxliEsQ==", + "requires": { + "dijkstrajs": "^1.0.1", + "encode-utf8": "^1.0.3", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", diff --git a/package.json b/package.json index 1efe10ecf..db1a49639 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "capture-lite", - "version": "0.59.5", + "version": "0.60.0", "author": "numbersprotocol", "homepage": "https://numbersprotocol.io/", "scripts": { @@ -61,7 +61,7 @@ "@ngx-formly/schematics": "^5.10.22", "@numbersprotocol/preview-camera": "github:numbersprotocol/preview-camera#release-0.0.2-auto-rotate-fix", "@numbersprotocol/preview-video": "github:numbersprotocol/preview-video", - "appsflyer-capacitor-plugin": "^6.5.2", + "@techiediaries/ngx-qrcode": "^9.1.0", "async-mutex": "^0.3.2", "buffer": "^5.7.1", "capacitor-blob-writer": "^1.0.4", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 3880b6a43..2bceb0093 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -5,7 +5,6 @@ import { SplashScreen } from '@capacitor/splash-screen'; import { Platform } from '@ionic/angular'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { catchError, concatMap } from 'rxjs/operators'; -import { AppsFlyerService } from './shared/app-flyer/apps-flyer.service'; import { CameraService } from './shared/camera/camera.service'; import { CaptureService } from './shared/capture/capture.service'; import { CollectorService } from './shared/collector/collector.service'; @@ -38,7 +37,6 @@ export class AppComponent { private readonly cameraService: CameraService, private readonly errorService: ErrorService, private readonly inAppStoreService: InAppStoreService, - appsFlyerService: AppsFlyerService, notificationService: NotificationService, pushNotificationService: PushNotificationService, langaugeService: LanguageService, @@ -60,8 +58,6 @@ export class AppComponent { this.restoreAppState(); this.initializeCollector(); this.registerIcon(); - // Uncomment in next release after fixing Apps Flyer - // appsFlyerService.initAppsFlyerSDK(); } static setDarkMode() { diff --git a/src/app/features/home/custom-camera/custom-camera.page.html b/src/app/features/home/custom-camera/custom-camera.page.html index 57706bb43..313f5fc19 100644 --- a/src/app/features/home/custom-camera/custom-camera.page.html +++ b/src/app/features/home/custom-camera/custom-camera.page.html @@ -3,6 +3,7 @@ [style.--background]="'transparent'" *transloco="let t" > +
0) { this.curRecordTimeInMilliseconds = 0; this.curRecordTimeInPercent = 0; + this.customCameraService.stopRecord(); } } @@ -154,16 +154,13 @@ export class CustomCameraPage implements OnInit, OnDestroy { } // eslint-disable-next-line class-methods-use-this - private scaleUpGalleryButton() { - // TODO: use @ViewChild elementRef - const element = document.getElementById('gallery-icon'); - element?.classList.add('scaled-mat-icon'); - } - - // eslint-disable-next-line class-methods-use-this - private scaleDownGalleryButton() { - // TODO: use @ViewChild elementRef - const element = document.getElementById('gallery-icon'); - element?.classList.remove('scaled-mat-icon'); + private flashCameraScreen() { + const element = document.getElementById('camera-flash-placeholder'); + element?.classList.add('flash-camera-animation'); + const flashCameraTimeout = 1000; + setTimeout( + () => element?.classList.remove('flash-camera-animation'), + flashCameraTimeout + ); } } diff --git a/src/app/features/profile/phone-verification/phone-verification.page.ts b/src/app/features/profile/phone-verification/phone-verification.page.ts index 341994c19..1b963ea2a 100644 --- a/src/app/features/profile/phone-verification/phone-verification.page.ts +++ b/src/app/features/profile/phone-verification/phone-verification.page.ts @@ -178,7 +178,8 @@ export class PhoneVerificationPage { if ( errorType === 'validation_error' || errorType === 'throttled' || - errorType === 'external_api_error' + errorType === 'external_api_error' || + errorType === 'duplicate_phone_number' ) { return this.errorService.toastError$( this.translocoService.translate(`error.diaBackend.${errorType}`) diff --git a/src/app/features/wallets/wallets.module.ts b/src/app/features/wallets/wallets.module.ts index 0028db262..8c32cecf1 100644 --- a/src/app/features/wallets/wallets.module.ts +++ b/src/app/features/wallets/wallets.module.ts @@ -1,10 +1,11 @@ import { NgModule } from '@angular/core'; +import { NgxQRCodeModule } from '@techiediaries/ngx-qrcode'; import { SharedModule } from '../../shared/shared.module'; import { WalletsPageRoutingModule } from './wallets-routing.module'; import { WalletsPage } from './wallets.page'; @NgModule({ - imports: [SharedModule, WalletsPageRoutingModule], + imports: [SharedModule, WalletsPageRoutingModule, NgxQRCodeModule], declarations: [WalletsPage], }) export class WalletsPageModule {} diff --git a/src/app/features/wallets/wallets.page.html b/src/app/features/wallets/wallets.page.html index 822d520dd..78d3ee073 100644 --- a/src/app/features/wallets/wallets.page.html +++ b/src/app/features/wallets/wallets.page.html @@ -76,6 +76,22 @@

NUM

+
+ {{ t('wallets.myAssetWalletQRCode') }} +
+ {{ t('wallets.myAssetWalletQRCodeInfo') }} +
+
+ + +
+ diff --git a/src/app/features/wallets/wallets.page.scss b/src/app/features/wallets/wallets.page.scss index 917e8bd67..da9276960 100644 --- a/src/app/features/wallets/wallets.page.scss +++ b/src/app/features/wallets/wallets.page.scss @@ -119,3 +119,22 @@ mat-list { margin-left: 3px; font-size: 1.1em; } + +.asset-wallet-qr-code-container { + // background-color: green; + max-width: 300px; + margin: 0 auto; + display: flex; + flex-direction: column; + align-items: center; +} + +.qr-code-info { + text-align: center; + opacity: 0.6; + font-size: 12px; +} + +.vertical-pacing-12 { + height: 12px; +} diff --git a/src/app/features/wallets/wallets.page.ts b/src/app/features/wallets/wallets.page.ts index 03b9cf59d..f12457f9d 100644 --- a/src/app/features/wallets/wallets.page.ts +++ b/src/app/features/wallets/wallets.page.ts @@ -8,6 +8,7 @@ import { Browser } from '@capacitor/browser'; import { Clipboard } from '@capacitor/clipboard'; import { TranslocoService } from '@ngneat/transloco'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { NgxQrcodeElementTypes } from '@techiediaries/ngx-qrcode'; import { BehaviorSubject, combineLatest, forkJoin } from 'rxjs'; import { catchError, @@ -18,7 +19,6 @@ import { switchMap, tap, } from 'rxjs/operators'; -import { AppsFlyerService } from '../../shared/app-flyer/apps-flyer.service'; import { WebCryptoApiSignatureProvider } from '../../shared/collector/signature/web-crypto-api-signature-provider/web-crypto-api-signature-provider.service'; import { ConfirmAlert } from '../../shared/confirm-alert/confirm-alert.service'; import { DiaBackendAuthService } from '../../shared/dia-backend/auth/dia-backend-auth.service'; @@ -49,6 +49,8 @@ export class WalletsPage { readonly isLoadingBalance$ = new BehaviorSubject(false); readonly networkConnected$ = this.diaBackendWalletService.networkConnected$; + elementType = NgxQrcodeElementTypes.URL; + constructor( private readonly diaBackendWalletService: DiaBackendWalletService, private readonly diaBackendAuthService: DiaBackendAuthService, @@ -60,8 +62,7 @@ export class WalletsPage { private readonly confirmAlert: ConfirmAlert, private readonly dialog: MatDialog, private readonly errorService: ErrorService, - private readonly router: Router, - private readonly appsFlyerService: AppsFlyerService + private readonly router: Router ) { this.matIconRegistry.addSvgIcon( 'wallet', @@ -81,10 +82,6 @@ export class WalletsPage { .subscribe(totalBalance => this.totalBalance$.next(totalBalance)); } - ionViewDidEnter() { - this.appsFlyerService.trackUserOpenedWalletsPage(); - } - // eslint-disable-next-line class-methods-use-this onBuyNumBtnClicked() { Browser.open({ diff --git a/src/app/shared/app-flyer/apps-flyer.service.spec.ts b/src/app/shared/app-flyer/apps-flyer.service.spec.ts deleted file mode 100644 index f475afa51..000000000 --- a/src/app/shared/app-flyer/apps-flyer.service.spec.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { TestBed, waitForAsync } from '@angular/core/testing'; -import { Platform } from '@ionic/angular'; -import { SharedTestingModule } from '../shared-testing.module'; -import { AppsFlyerService } from './apps-flyer.service'; - -describe('AppsFlyerService', () => { - let service: AppsFlyerService; - let platformIs: boolean | undefined; - let platformReadySpy: Promise; - let platformSpy: Platform; - - beforeEach( - waitForAsync(async () => { - platformReadySpy = Promise.resolve(); - platformIs = false; - - platformSpy = jasmine.createSpyObj('Platform', { - ready: platformReadySpy, - is: platformIs, - }); - - await TestBed.configureTestingModule({ - imports: [SharedTestingModule], - providers: [{ provide: Platform, useValue: platformSpy }], - }).compileComponents(); - - service = TestBed.inject(AppsFlyerService); - }) - ); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/src/app/shared/app-flyer/apps-flyer.service.ts b/src/app/shared/app-flyer/apps-flyer.service.ts deleted file mode 100644 index 7c3155607..000000000 --- a/src/app/shared/app-flyer/apps-flyer.service.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Injectable } from '@angular/core'; -import { AdvertisingId } from '@capacitor-community/advertising-id'; -import { Platform } from '@ionic/angular'; -import { AFEvent, AFInit, AppsFlyer } from 'appsflyer-capacitor-plugin'; -import { environment } from '../../../environments/environment'; -import { APPS_FLYER_DEV_KEY } from '../dia-backend/secret'; - -@Injectable({ - providedIn: 'root', -}) -export class AppsFlyerService { - private readonly afConfig: AFInit = { - appID: '1536388009', // AppStore Application ID. For iOS only. - devKey: APPS_FLYER_DEV_KEY, - isDebug: !environment.production, - waitForATTUserAuthorization: 10, // for iOS 14 and higher - minTimeBetweenSessions: 6, // default 5 sec - registerOnDeepLink: true, - registerConversionListener: true, - registerOnAppOpenAttribution: false, - deepLinkTimeout: 4000, // default 3000 ms - useReceiptValidationSandbox: true, // iOS only - useUninstallSandbox: true, // iOS only - }; - - constructor(private readonly platform: Platform) {} - - async initAppsFlyerSDK() { - if (this.platform.is('ios')) { - await AdvertisingId.requestTracking(); - } - if (this.isNativePlatform) { - await AppsFlyer.initSDK(this.afConfig); - } - } - - async trackUserOpenedWalletsPage() { - if (this.isNativePlatform) return; - - const data: AFEvent = { eventName: 'open-wallets-page' }; - - return AppsFlyer.logEvent(data).catch(() => ({})); - } - - private get isNativePlatform() { - return this.platform.is('ios') || this.platform.is('android'); - } -} diff --git a/src/assets/i18n/en-us.json b/src/assets/i18n/en-us.json index 3a9badc81..86caac067 100644 --- a/src/assets/i18n/en-us.json +++ b/src/assets/i18n/en-us.json @@ -215,6 +215,7 @@ "external_api_error": "An error occurred. Please try again later", "phone_verification_failed": "Incorrect verification code", "phone_verification_code_expired": "The verification code has been expired", + "duplicate_phone_number": "The phone number has already been used by another user", "throttled": "Too frequent request", "user_is_email_verified": "The email address has beed verified", "user_not_found": "There is no account registered with the email address", @@ -274,6 +275,8 @@ "assetWalletHistory": "Asset Wallet History", "myAssetWallet": "My Asset Wallet", "myAssetWalletTooltip": "Main asset vault for Capture NFT and NUM", + "myAssetWalletQRCode": "My Asset Wallet QR-Code", + "myAssetWalletQRCodeInfo": "Please make sure to use BEP20 (BNB Chain)", "integrityKey": "Integrity Key", "integrityWallet": "Integrity Wallet", "integrityWalletTooltip": "Wallet used for creating Signatures", diff --git a/src/assets/i18n/zh-tw.json b/src/assets/i18n/zh-tw.json index 48a38ca14..0e7d43cf0 100644 --- a/src/assets/i18n/zh-tw.json +++ b/src/assets/i18n/zh-tw.json @@ -215,6 +215,7 @@ "external_api_error": "發生錯誤,請稍後再試", "phone_verification_failed": "驗證碼錯誤", "phone_verification_code_expired": "驗證碼已過期", + "duplicate_phone_number": "該電話號碼已被其他用戶使用", "throttled": "短時間內傳送過多請求", "user_is_email_verified": "此電子郵件已驗證", "user_not_found": "此電子郵件尚未註冊 Capture 帳號", @@ -274,6 +275,8 @@ "assetWalletHistory": "資產交易紀錄", "myAssetWallet": "我的資產錢包", "myAssetWalletTooltip": "Capture NFT 和 NUM 的主要資產庫", + "myAssetWalletQRCode": "我的資產錢包二維碼", + "myAssetWalletQRCodeInfo": "請務必使用 BEP20(BNB 鏈)", "integrityKey": "完整性金鑰", "integrityWallet": "完整性錢包", "integrityWalletTooltip": "用於創建簽名的錢包",