diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 68b2aa66..02c1b99d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -31,8 +31,9 @@ + - \ No newline at end of file + diff --git a/app.config.js b/app.config.js index ca1af7bf..d3c1afd8 100644 --- a/app.config.js +++ b/app.config.js @@ -25,6 +25,7 @@ export default { version: '0.1.0', orientation: 'portrait', icon: './assets/icon.png', + scheme: 'wc', splash: { image: './assets/splash.png', resizeMode: 'contain', diff --git a/ios/Alephium.xcodeproj/project.pbxproj b/ios/Alephium.xcodeproj/project.pbxproj index 50a860a7..8d50dc91 100644 --- a/ios/Alephium.xcodeproj/project.pbxproj +++ b/ios/Alephium.xcodeproj/project.pbxproj @@ -7,28 +7,28 @@ objects = { /* Begin PBXBuildFile section */ - 0C8E8AE3240B40B9BAE4DA64 /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83C20817D2024B1EA7A9E8A9 /* noop-file.swift */; }; 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; }; + 94D78729F38744D9AFFA0CDB /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7377FE1A317A49738401381B /* noop-file.swift */; }; 96905EF65AED1B983A6B3ABC /* libPods-Alephium.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-Alephium.a */; }; B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; }; BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 03948DD9CE4E42449B54C355 /* Alephium-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "Alephium-Bridging-Header.h"; path = "Alephium/Alephium-Bridging-Header.h"; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* Alephium.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Alephium.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Alephium/AppDelegate.h; sourceTree = ""; }; 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = Alephium/AppDelegate.mm; sourceTree = ""; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Alephium/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Alephium/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Alephium/main.m; sourceTree = ""; }; - 509502C335B9484AB3812FC4 /* Alephium-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "Alephium-Bridging-Header.h"; path = "Alephium/Alephium-Bridging-Header.h"; sourceTree = ""; }; 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-Alephium.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Alephium.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 6C2E3173556A471DD304B334 /* Pods-Alephium.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Alephium.debug.xcconfig"; path = "Target Support Files/Pods-Alephium/Pods-Alephium.debug.xcconfig"; sourceTree = ""; }; + 7377FE1A317A49738401381B /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "Alephium/noop-file.swift"; sourceTree = ""; }; 7A4D352CD337FB3A3BF06240 /* Pods-Alephium.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Alephium.release.xcconfig"; path = "Target Support Files/Pods-Alephium/Pods-Alephium.release.xcconfig"; sourceTree = ""; }; - 83C20817D2024B1EA7A9E8A9 /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "Alephium/noop-file.swift"; sourceTree = ""; }; AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = Alephium/SplashScreen.storyboard; sourceTree = ""; }; BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; @@ -57,8 +57,8 @@ 13B07FB61A68108700A75B9A /* Info.plist */, 13B07FB71A68108700A75B9A /* main.m */, AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */, - 83C20817D2024B1EA7A9E8A9 /* noop-file.swift */, - 509502C335B9484AB3812FC4 /* Alephium-Bridging-Header.h */, + 7377FE1A317A49738401381B /* noop-file.swift */, + 03948DD9CE4E42449B54C355 /* Alephium-Bridging-Header.h */, ); name = Alephium; sourceTree = ""; @@ -145,13 +145,13 @@ buildPhases = ( 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */, FD10A7F022414F080027D42C /* Start Packager */, - 581D71713F7C4C83A56A5A27 /* [Expo] Configure project */, + A147AFB983C30B10F86B0607 /* [Expo] Configure project */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */, - A54F10CF4EE1AD72134DB16C /* [CP] Embed Pods Frameworks */, + 7AF5E9439727BB234B98A62F /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -171,8 +171,8 @@ LastUpgradeCheck = 1130; TargetAttributes = { 13B07F861A680F5B00A75B9A = { - DevelopmentTeam = 888T9Q26P9; LastSwiftMigration = 1250; + DevelopmentTeam = "Z3J8P4JW24"; ProvisioningStyle = Automatic; }; }; @@ -245,24 +245,29 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 581D71713F7C4C83A56A5A27 /* [Expo] Configure project */ = { + 7AF5E9439727BB234B98A62F /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Alephium/Pods-Alephium-frameworks.sh", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework/double-conversion", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-Glog/glog.framework/glog", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes", ); - name = "[Expo] Configure project"; - outputFileListPaths = ( - ); + name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-Alephium/expo-configure-project.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Alephium/Pods-Alephium-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; @@ -288,29 +293,24 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Alephium/Pods-Alephium-resources.sh\"\n"; showEnvVarsInLog = 0; }; - A54F10CF4EE1AD72134DB16C /* [CP] Embed Pods Frameworks */ = { + A147AFB983C30B10F86B0607 /* [Expo] Configure project */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Alephium/Pods-Alephium-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework/double-conversion", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-Glog/glog.framework/glog", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes", ); - name = "[CP] Embed Pods Frameworks"; + name = "[Expo] Configure project"; + outputFileListPaths = ( + ); outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Alephium/Pods-Alephium-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-Alephium/expo-configure-project.sh\"\n"; }; FD10A7F022414F080027D42C /* Start Packager */ = { isa = PBXShellScriptBuildPhase; @@ -341,7 +341,7 @@ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, 13B07FC11A68108700A75B9A /* main.m in Sources */, B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */, - 0C8E8AE3240B40B9BAE4DA64 /* noop-file.swift in Sources */, + 94D78729F38744D9AFFA0CDB /* noop-file.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -355,10 +355,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Alephium/Alephium.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 888T9Q26P9; ENABLE_BITCODE = NO; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", @@ -381,6 +378,9 @@ SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; + DEVELOPMENT_TEAM = "Z3J8P4JW24"; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; }; name = Debug; }; @@ -391,10 +391,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Alephium/Alephium.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 888T9Q26P9; INFOPLIST_FILE = Alephium/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -411,6 +408,9 @@ SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; + DEVELOPMENT_TEAM = "Z3J8P4JW24"; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; }; name = Release; }; diff --git a/ios/Alephium.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Alephium.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/ios/Alephium.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Alephium/Info.plist b/ios/Alephium/Info.plist index 498acd7d..aed7c9b5 100644 --- a/ios/Alephium/Info.plist +++ b/ios/Alephium/Info.plist @@ -27,6 +27,7 @@ CFBundleURLSchemes + wc org.alephium.mobilewallet diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 4fd53535..c7976993 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -702,10 +702,10 @@ PODS: - Yoga (1.14.0) - YogaKit (1.18.1): - Yoga (~> 1.14) - - ZXingObjC/Core (3.6.5) - - ZXingObjC/OneD (3.6.5): + - ZXingObjC/Core (3.6.9) + - ZXingObjC/OneD (3.6.9): - ZXingObjC/Core - - ZXingObjC/PDF417 (3.6.5): + - ZXingObjC/PDF417 (3.6.9): - ZXingObjC/Core DEPENDENCIES: @@ -1116,7 +1116,7 @@ SPEC CHECKSUMS: SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: 8796b55dba14d7004f980b54bcc9833ee45b28ce YogaKit: f782866e155069a2cca2517aafea43200b01fd5a - ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb + ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5 PODFILE CHECKSUM: 297efce18c9efbe3898e77547adaa9adb52ca081 diff --git a/package-lock.json b/package-lock.json index 9364b15b..6bb1e3dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,6 +44,7 @@ "expo-haptics": "~12.4.0", "expo-image": "~1.3.4", "expo-linear-gradient": "~12.3.0", + "expo-linking": "^6.0.0", "expo-local-authentication": "~13.4.1", "expo-localization": "~14.3.0", "expo-screen-capture": "~5.3.0", @@ -7466,6 +7467,11 @@ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" }, + "node_modules/@types/qs": { + "version": "6.9.9", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.9.tgz", + "integrity": "sha512-wYLxw35euwqGvTDx6zfY1vokBFnsK0HNrzc6xNHchxfO2hpuRg74GbkEW7e3sSmPvj0TjCDT1VCa6OtHXnubsg==" + }, "node_modules/@types/react": { "version": "18.2.20", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.20.tgz", @@ -12255,6 +12261,191 @@ "expo": "*" } }, + "node_modules/expo-linking": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/expo-linking/-/expo-linking-6.0.0.tgz", + "integrity": "sha512-BVj+9yfMfQg1r23uQOES3Y47XdigKV0Qg0jJ5zP+3SO/mZ98s3r5wASOGLhujvO9/SqOh/BdotcTsO9sasxCag==", + "dependencies": { + "@types/qs": "^6.9.7", + "expo-constants": "~14.5.0", + "invariant": "^2.2.4", + "qs": "^6.11.0", + "url-parse": "^1.5.9" + } + }, + "node_modules/expo-linking/node_modules/@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/expo-linking/node_modules/@expo/config": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@expo/config/-/config-8.2.1.tgz", + "integrity": "sha512-15XjV0WrSb5hChRM5pAEK5uyh55njfgFOEZpov3YKYBeMd9D6QT/azWWqnaFuuCWKzgzyxD9HaYgGo5VbnOU1g==", + "dependencies": { + "@babel/code-frame": "~7.10.4", + "@expo/config-plugins": "~7.3.0", + "@expo/config-types": "^49.0.0-alpha.1", + "@expo/json-file": "^8.2.37", + "getenv": "^1.0.0", + "glob": "7.1.6", + "require-from-string": "^2.0.2", + "resolve-from": "^5.0.0", + "semver": "7.5.3", + "slugify": "^1.3.4", + "sucrase": "^3.20.0" + } + }, + "node_modules/expo-linking/node_modules/@expo/config-plugins": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-7.3.1.tgz", + "integrity": "sha512-TkDtAP3P/rrjhr7GBQtyYH/l1SQUGAO/gByBCwHjfRa4RIPFs+iiq7hocytAl+oSmVsB28ipZCC3O1IPg1OZ7g==", + "dependencies": { + "@expo/config-types": "^49.0.0-alpha.1", + "@expo/json-file": "~8.2.37", + "@expo/plist": "^0.0.20", + "@expo/sdk-runtime-versions": "^1.0.0", + "@react-native/normalize-color": "^2.0.0", + "chalk": "^4.1.2", + "debug": "^4.3.1", + "find-up": "~5.0.0", + "getenv": "^1.0.0", + "glob": "7.1.6", + "resolve-from": "^5.0.0", + "semver": "^7.5.3", + "slash": "^3.0.0", + "xcode": "^3.0.1", + "xml2js": "0.6.0" + } + }, + "node_modules/expo-linking/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/expo-linking/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/expo-linking/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/expo-linking/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/expo-linking/node_modules/expo-constants": { + "version": "14.5.1", + "resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-14.5.1.tgz", + "integrity": "sha512-06OKXQmKI0vuje++6lm7w1kO3rKsZAHio/4d9hwQuVAtExJ6RM92BnpzkDAV16ZheVN/FHKzNyY1BYLqXfujMw==", + "dependencies": { + "@expo/config": "~8.2.0", + "uuid": "^3.3.2" + }, + "peerDependencies": { + "expo": "*" + } + }, + "node_modules/expo-linking/node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/expo-linking/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/expo-linking/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/expo-linking/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/expo-linking/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/expo-linking/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "node_modules/expo-local-authentication": { "version": "13.4.1", "resolved": "https://registry.npmjs.org/expo-local-authentication/-/expo-local-authentication-13.4.1.tgz", @@ -29160,6 +29351,11 @@ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" }, + "@types/qs": { + "version": "6.9.9", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.9.tgz", + "integrity": "sha512-wYLxw35euwqGvTDx6zfY1vokBFnsK0HNrzc6xNHchxfO2hpuRg74GbkEW7e3sSmPvj0TjCDT1VCa6OtHXnubsg==" + }, "@types/react": { "version": "18.2.20", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.20.tgz", @@ -32869,6 +33065,154 @@ "integrity": "sha512-f9e+Oxe5z7fNQarTBZXilMyswlkbYWQHONVfq8MqmiEnW3h9XsxxmVJLG8uVQSQPUsbW+x1UUT/tnU6mkMWeLg==", "requires": {} }, + "expo-linking": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/expo-linking/-/expo-linking-6.0.0.tgz", + "integrity": "sha512-BVj+9yfMfQg1r23uQOES3Y47XdigKV0Qg0jJ5zP+3SO/mZ98s3r5wASOGLhujvO9/SqOh/BdotcTsO9sasxCag==", + "requires": { + "@types/qs": "^6.9.7", + "expo-constants": "~14.5.0", + "invariant": "^2.2.4", + "qs": "^6.11.0", + "url-parse": "^1.5.9" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@expo/config": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@expo/config/-/config-8.2.1.tgz", + "integrity": "sha512-15XjV0WrSb5hChRM5pAEK5uyh55njfgFOEZpov3YKYBeMd9D6QT/azWWqnaFuuCWKzgzyxD9HaYgGo5VbnOU1g==", + "requires": { + "@babel/code-frame": "~7.10.4", + "@expo/config-plugins": "~7.3.0", + "@expo/config-types": "^49.0.0-alpha.1", + "@expo/json-file": "^8.2.37", + "getenv": "^1.0.0", + "glob": "7.1.6", + "require-from-string": "^2.0.2", + "resolve-from": "^5.0.0", + "semver": "7.5.3", + "slugify": "^1.3.4", + "sucrase": "^3.20.0" + } + }, + "@expo/config-plugins": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-7.3.1.tgz", + "integrity": "sha512-TkDtAP3P/rrjhr7GBQtyYH/l1SQUGAO/gByBCwHjfRa4RIPFs+iiq7hocytAl+oSmVsB28ipZCC3O1IPg1OZ7g==", + "requires": { + "@expo/config-types": "^49.0.0-alpha.1", + "@expo/json-file": "~8.2.37", + "@expo/plist": "^0.0.20", + "@expo/sdk-runtime-versions": "^1.0.0", + "@react-native/normalize-color": "^2.0.0", + "chalk": "^4.1.2", + "debug": "^4.3.1", + "find-up": "~5.0.0", + "getenv": "^1.0.0", + "glob": "7.1.6", + "resolve-from": "^5.0.0", + "semver": "^7.5.3", + "slash": "^3.0.0", + "xcode": "^3.0.1", + "xml2js": "0.6.0" + } + }, + "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" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.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==" + }, + "expo-constants": { + "version": "14.5.1", + "resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-14.5.1.tgz", + "integrity": "sha512-06OKXQmKI0vuje++6lm7w1kO3rKsZAHio/4d9hwQuVAtExJ6RM92BnpzkDAV16ZheVN/FHKzNyY1BYLqXfujMw==", + "requires": { + "@expo/config": "~8.2.0", + "uuid": "^3.3.2" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, "expo-local-authentication": { "version": "13.4.1", "resolved": "https://registry.npmjs.org/expo-local-authentication/-/expo-local-authentication-13.4.1.tgz", diff --git a/package.json b/package.json index d02f2792..71e65e7c 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,9 @@ "expo-device": "~5.4.0", "expo-file-system": "~15.4.3", "expo-haptics": "~12.4.0", + "expo-image": "~1.3.4", "expo-linear-gradient": "~12.3.0", + "expo-linking": "^6.0.0", "expo-local-authentication": "~13.4.1", "expo-localization": "~14.3.0", "expo-screen-capture": "~5.3.0", @@ -89,8 +91,7 @@ "react-qr-code": "^2.0.7", "react-redux": "^8.0.1", "styled-components": "^5.3.5", - "victory-native": "^36.6.10", - "expo-image": "~1.3.4" + "victory-native": "^36.6.10" }, "expo": { "install": { diff --git a/src/components/AddressBox.tsx b/src/components/AddressBox.tsx index 6ffd3a8e..44ebc570 100644 --- a/src/components/AddressBox.tsx +++ b/src/components/AddressBox.tsx @@ -16,7 +16,6 @@ You should have received a copy of the GNU Lesser General Public License along with the library. If not, see . */ -import * as Haptics from 'expo-haptics' import { useMemo } from 'react' import { GestureResponderEvent, Pressable, PressableProps } from 'react-native' import Animated, { useAnimatedStyle, withSpring } from 'react-native-reanimated' @@ -30,6 +29,7 @@ import { useAppSelector } from '~/hooks/redux' import { makeSelectAddressesKnownFungibleTokens, makeSelectAddressesNFTs } from '~/store/addressesSlice' import { BORDER_RADIUS, VERTICAL_GAP } from '~/style/globalStyle' import { AddressHash } from '~/types/addresses' +import { ImpactStyle, vibrate } from '~/utils/haptics' interface AddressBoxProps extends PressableProps { addressHash: AddressHash @@ -51,7 +51,7 @@ const AddressBox = ({ addressHash, isSelected, onPress, ...props }: AddressBoxPr })) const handlePress = (e: GestureResponderEvent) => { - Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Heavy) + vibrate(ImpactStyle.Heavy) onPress && onPress(e) } diff --git a/src/components/AuthenticationModal.tsx b/src/components/AuthenticationModal.tsx index f6387607..cac606b9 100644 --- a/src/components/AuthenticationModal.tsx +++ b/src/components/AuthenticationModal.tsx @@ -29,15 +29,15 @@ import ModalWithBackdrop, { ModalWithBackdropProps } from '~/components/ModalWit import { Spinner } from '~/components/SpinnerModal' import CenteredInstructions, { Instruction } from '~/components/text/CenteredInstructions' import { loadBiometricsSettings } from '~/persistent-storage/settings' -import { getStoredWallet } from '~/persistent-storage/wallet' +import { getStoredWallet, GetStoredWalletProps } from '~/persistent-storage/wallet' import { ShouldClearPin } from '~/types/misc' import { WalletState } from '~/types/wallet' import { mnemonicToSeed, pbkdf2 } from '~/utils/crypto' -interface AuthenticationModalProps extends ModalWithBackdropProps { +interface AuthenticationModalProps extends ModalWithBackdropProps, GetStoredWalletProps { onConfirm: (pin?: string, wallet?: WalletState) => void onClose?: () => void - forcePinUsage?: boolean + loadingText?: string } const pinLength = 6 @@ -49,7 +49,14 @@ const errorInstructionSet: Instruction[] = [ { text: 'Please try again 💪', type: 'secondary' } ] -const AuthenticationModal = ({ onConfirm, onClose, forcePinUsage = false, ...props }: AuthenticationModalProps) => { +const AuthenticationModal = ({ + onConfirm, + onClose, + forcePinUsage = false, + authenticationPrompt, + loadingText, + ...props +}: AuthenticationModalProps) => { const insets = useSafeAreaInsets() const [shownInstructions, setShownInstructions] = useState(firstInstructionSet) @@ -57,7 +64,7 @@ const AuthenticationModal = ({ onConfirm, onClose, forcePinUsage = false, ...pro const getWallet = useCallback(async () => { try { - const storedWallet = await getStoredWallet(forcePinUsage) + const storedWallet = await getStoredWallet({ forcePinUsage, authenticationPrompt }) // This should never happen, but if it does, inform the user instead of being stuck if (!storedWallet) { @@ -83,7 +90,7 @@ const AuthenticationModal = ({ onConfirm, onClose, forcePinUsage = false, ...pro onClose && onClose() } - }, [onClose, onConfirm, forcePinUsage]) + }, [authenticationPrompt, forcePinUsage, onConfirm, onClose]) const decryptMnemonic = async (pin: string): Promise => { if (!pin || !encryptedWallet) return false @@ -118,7 +125,7 @@ const AuthenticationModal = ({ onConfirm, onClose, forcePinUsage = false, ...pro ) : ( - + )} ) diff --git a/src/components/DashboardHeaderActions.tsx b/src/components/DashboardHeaderActions.tsx index 811cdada..d28150ba 100644 --- a/src/components/DashboardHeaderActions.tsx +++ b/src/components/DashboardHeaderActions.tsx @@ -20,7 +20,7 @@ import { isAddressValid } from '@alephium/sdk' import { NavigationProp, useIsFocused, useNavigation } from '@react-navigation/native' import { usePostHog } from 'posthog-react-native' import { memo, useState } from 'react' -import { StyleProp, View, ViewStyle } from 'react-native' +import { Platform, StyleProp, View, ViewStyle } from 'react-native' import { Portal } from 'react-native-portalize' import styled from 'styled-components/native' @@ -32,7 +32,8 @@ import { useAppDispatch, useAppSelector } from '~/hooks/redux' import WalletConnectSVG from '~/images/logos/WalletConnectLogo' import RootStackParamList from '~/navigation/rootStackRoutes' import { SendNavigationParamList } from '~/navigation/SendNavigation' -import WalletConnectPairingsModal from '~/screens/WalletConnectPairingsModal' +import WalletConnectPairingsModal from '~/screens/Dashboard/WalletConnectPairingsModal' +import WalletConnectPasteUrlModal from '~/screens/Dashboard/WalletConnectPasteUrlModal' import { cameraToggled } from '~/store/appSlice' import { showToast } from '~/utils/layout' @@ -52,7 +53,9 @@ const DashboardHeaderActions = ({ style }: DashboardHeaderActionsProps) => { const isFocused = useIsFocused() const [isWalletConnectPairingsModalOpen, setIsWalletConnectPairingsModalOpen] = useState(false) + const [isWalletConnectPasteUrlModalOpen, setIsWalletConnectPasteUrlModalOpen] = useState(false) + const hasActiveWCSessions = activeSessions.length > 0 const openQRCodeScannerModal = () => dispatch(cameraToggled(true)) const closeQRCodeScannerModal = () => dispatch(cameraToggled(false)) @@ -86,12 +89,12 @@ const DashboardHeaderActions = ({ style }: DashboardHeaderActionsProps) => { round /> )} - {isWalletConnectEnabled && walletConnectClient && activeSessions.length > 0 && ( + {isWalletConnectEnabled && walletConnectClient && (