diff --git a/.yarnrc b/.yarnrc new file mode 100644 index 0000000000..82be0ecc75 --- /dev/null +++ b/.yarnrc @@ -0,0 +1 @@ +network-concurrency 1 \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 68ba12305d..d8275c4ef2 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -59,8 +59,8 @@ android { applicationId "io.hexawallet.hexa" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 491 - versionName "2.0.80" + versionCode 496 + versionName "2.0.90" missingDimensionStrategy 'react-native-camera', 'general' multiDexEnabled true resValue "string", "build_config_package", "io.hexawallet.hexa" diff --git a/android/app/src/debug/java/io/hexawallet/hexa/ReactNativeFlipper.java b/android/app/src/debug/java/io/hexawallet/hexa/ReactNativeFlipper.java new file mode 100644 index 0000000000..d317c072e3 --- /dev/null +++ b/android/app/src/debug/java/io/hexawallet/hexa/ReactNativeFlipper.java @@ -0,0 +1,72 @@ +// /** +// * Copyright (c) Facebook, Inc. and its affiliates. +// * +// *

This source code is licensed under the MIT license found in the LICENSE file in the root +// * directory of this source tree. +// */ +// package io.hexawallet.hexa; + +// import android.content.Context; +// import com.facebook.flipper.android.AndroidFlipperClient; +// import com.facebook.flipper.android.utils.FlipperUtils; +// import com.facebook.flipper.core.FlipperClient; +// import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; +// import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; +// import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; +// import com.facebook.flipper.plugins.inspector.DescriptorMapping; +// import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; +// import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; +// import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; +// import com.facebook.flipper.plugins.react.ReactFlipperPlugin; +// import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; +// import com.facebook.react.ReactInstanceManager; +// import com.facebook.react.bridge.ReactContext; +// import com.facebook.react.modules.network.NetworkingModule; +// import okhttp3.OkHttpClient; + +// public class ReactNativeFlipper { +// public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { +// if (FlipperUtils.shouldEnableFlipper(context)) { +// final FlipperClient client = AndroidFlipperClient.getInstance(context); + +// client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); +// client.addPlugin(new ReactFlipperPlugin()); +// client.addPlugin(new DatabasesFlipperPlugin(context)); +// client.addPlugin(new SharedPreferencesFlipperPlugin(context)); +// client.addPlugin(CrashReporterPlugin.getInstance()); + +// NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); +// NetworkingModule.setCustomClientBuilder( +// new NetworkingModule.CustomClientBuilder() { +// @Override +// public void apply(OkHttpClient.Builder builder) { +// builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); +// } +// }); +// client.addPlugin(networkFlipperPlugin); +// client.start(); + +// // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized +// // Hence we run if after all native modules have been initialized +// ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); +// if (reactContext == null) { +// reactInstanceManager.addReactInstanceEventListener( +// new ReactInstanceManager.ReactInstanceEventListener() { +// @Override +// public void onReactContextInitialized(ReactContext reactContext) { +// reactInstanceManager.removeReactInstanceEventListener(this); +// reactContext.runOnNativeModulesQueueThread( +// new Runnable() { +// @Override +// public void run() { +// client.addPlugin(new FrescoFlipperPlugin()); +// } +// }); +// } +// }); +// } else { +// client.addPlugin(new FrescoFlipperPlugin()); +// } +// } +// } +// } diff --git a/android/app/src/main/java/io/hexawallet/hexa/MainApplication.java b/android/app/src/main/java/io/hexawallet/hexa/MainApplication.java index 769a1554dc..8007edcb07 100644 --- a/android/app/src/main/java/io/hexawallet/hexa/MainApplication.java +++ b/android/app/src/main/java/io/hexawallet/hexa/MainApplication.java @@ -112,5 +112,37 @@ public ReactNativeHost getReactNativeHost() { public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); + initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); + } + + /** + * Loads Flipper in React Native templates. Call this in the onCreate method with something like + * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); + * + * @param context + * @param reactInstanceManager + */ + private static void initializeFlipper( + Context context, ReactInstanceManager reactInstanceManager) { + if (BuildConfig.DEBUG) { + try { + /* + We use reflection here to pick up the class that initializes Flipper, + since Flipper library is not available in release mode + */ + Class aClass = Class.forName("io.hexawallet.hexa.ReactNativeFlipper"); + aClass + .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) + .invoke(null, context, reactInstanceManager); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } + } } } diff --git a/android/gradle.properties b/android/gradle.properties index 0d02fe114b..7b158e294e 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -28,3 +28,6 @@ MYAPP_UPLOAD_KEY_PASSWORD=developer firebaseMessagingVersion=21.1.0 org.gradle.daemon=true org.gradle.jvmargs=-Xmx4096m + +# Version of flipper SDK to use with React Native +FLIPPER_VERSION=0.99.0 diff --git a/ios/HEXA.xcodeproj/project.pbxproj b/ios/HEXA.xcodeproj/project.pbxproj index 0570b46ead..07e173a7cc 100644 --- a/ios/HEXA.xcodeproj/project.pbxproj +++ b/ios/HEXA.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 1ADDFE9EF1EA44B39CDB9BC2 /* OpenSans-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = AD12BB582E724B3887BFFE64 /* OpenSans-Light.ttf */; }; 2F039E5F6FF845818DEC1F4D /* OpenSans-SemiboldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DAD1674B7394413A82B21AF7 /* OpenSans-SemiboldItalic.ttf */; }; + 35BD184BB600EA9373FA9281 /* libPods-HEXA Dev.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD388D7ACD0466BE84BC5F57 /* libPods-HEXA Dev.a */; }; 4D38330326009EDE00F82BDB /* iCloud.m in Sources */ = {isa = PBXBuildFile; fileRef = CCF1689125FB8FCF0038E126 /* iCloud.m */; }; 4D38330426009F8900F82BDB /* iCloudHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCF1688F25FB8FC50038E126 /* iCloudHelper.swift */; }; 4D3833052600A08900F82BDB /* HexaWalletBackup.json in Resources */ = {isa = PBXBuildFile; fileRef = CCF1689425FB8FE60038E126 /* HexaWalletBackup.json */; }; @@ -73,25 +74,24 @@ 6182F7BC250B2742005B6ECE /* OpenSans-SemiboldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DAD1674B7394413A82B21AF7 /* OpenSans-SemiboldItalic.ttf */; }; 61B5223F25076DF5002F73B2 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 619CF232250654E300A8E6DF /* GoogleService-Info.plist */; }; 656E35D57E0B42E8B8745C5C /* OpenSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 466F94D18D9449A8957F3610 /* OpenSans-Regular.ttf */; }; - 6DB0AB6F5761C736B6243483 /* libPods-HEXA Dev.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 248E39EF255398760EE1782A /* libPods-HEXA Dev.a */; }; 6FE58ECD5691497784662337 /* FiraSans-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4D3784CB53EE4E7D914C42B4 /* FiraSans-SemiBold.ttf */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 84C34D93035D4E8CA3855535 /* FiraSans-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 262894C9A21E4EE48406A1D0 /* FiraSans-Bold.ttf */; }; 931F7A4365DF468BADA226D2 /* OpenSans-Semibold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DF7107F6EA2D4846A469A116 /* OpenSans-Semibold.ttf */; }; + 971C7BAE5BAE6D5314FF5259 /* libPods-HEXA Stage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C9651471DCD326912DBB300 /* libPods-HEXA Stage.a */; }; A0647B856EF5484EB9D37E71 /* FiraSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7BBFAA85840C4C369964BD81 /* FiraSans-Regular.ttf */; }; AA11C3A22548270900B032D1 /* HEXA.Dev-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA11C3A12548270900B032D1 /* HEXA.Dev-Info.plist */; }; AA11C3A42548271A00B032D1 /* HEXA.Stage-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA11C3A32548271A00B032D1 /* HEXA.Stage-Info.plist */; }; B8D1041D05D6411F9D52E7D6 /* OpenSans-BoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 9E29DABD5A154C1997E9AD44 /* OpenSans-BoldItalic.ttf */; }; C0D2EBAD35E54C34BB47A2C0 /* FiraSans-MediumItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 158EFB7281D64BD3B2F784B3 /* FiraSans-MediumItalic.ttf */; }; + C86E6CE163F3E6812F7A2B4B /* libPods-HEXA.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A19C8BF1B39563898793156 /* libPods-HEXA.a */; }; CCF1689025FB8FC50038E126 /* iCloudHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCF1688F25FB8FC50038E126 /* iCloudHelper.swift */; }; CCF1689225FB8FCF0038E126 /* iCloud.m in Sources */ = {isa = PBXBuildFile; fileRef = CCF1689125FB8FCF0038E126 /* iCloud.m */; }; CCF1689525FB8FE60038E126 /* HexaWalletBackup.json in Resources */ = {isa = PBXBuildFile; fileRef = CCF1689425FB8FE60038E126 /* HexaWalletBackup.json */; }; DF98272D8CB14F19972464BB /* OpenSans-Italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 96E40822F039459A97686C32 /* OpenSans-Italic.ttf */; }; - E1EEF97F2FD5F39629456AEB /* libPods-HEXA.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D259F301BBD311EEEDACCFE /* libPods-HEXA.a */; }; E59524329FB64B6B9EB4F44A /* FiraSans-Italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E2EDF28037624796A9996D82 /* FiraSans-Italic.ttf */; }; EC871328B5214142B36CC294 /* FiraSans-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 9A4E6F5E9B5642DD8E860F82 /* FiraSans-Medium.ttf */; }; ECA21601D47443C3B3738345 /* OpenSans-LightItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = F727B7636E8440F1BC2C78B2 /* OpenSans-LightItalic.ttf */; }; - F1F9568935E404F854458FC4 /* libPods-HEXA Stage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 476B8127901FC2E85C2F06CA /* libPods-HEXA Stage.a */; }; F49AA80D26A0284D0097D815 /* BackgroundViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F49AA80B26A0284D0097D815 /* BackgroundViewController.m */; }; F49AA80E26A0284D0097D815 /* BackgroundViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F49AA80B26A0284D0097D815 /* BackgroundViewController.m */; }; F49AA80F26A0284D0097D815 /* BackgroundViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F49AA80B26A0284D0097D815 /* BackgroundViewController.m */; }; @@ -110,19 +110,21 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = HEXA/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = HEXA/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = HEXA/main.m; sourceTree = ""; }; + 152B23CF7F362750A3583C5C /* Pods-HEXA Stage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HEXA Stage.release.xcconfig"; path = "Target Support Files/Pods-HEXA Stage/Pods-HEXA Stage.release.xcconfig"; sourceTree = ""; }; 158EFB7281D64BD3B2F784B3 /* FiraSans-MediumItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "FiraSans-MediumItalic.ttf"; path = "../src/assets/fonts/FiraSans-MediumItalic.ttf"; sourceTree = ""; }; 1BDE786A62844DE89D7EE379 /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = ""; }; 227A2A160AEE42F4999170A1 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialCommunityIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = ""; }; - 248E39EF255398760EE1782A /* libPods-HEXA Dev.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HEXA Dev.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 262894C9A21E4EE48406A1D0 /* FiraSans-Bold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "FiraSans-Bold.ttf"; path = "../src/assets/fonts/FiraSans-Bold.ttf"; sourceTree = ""; }; 2952F3993041452D93FA88B9 /* Entypo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Entypo.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Entypo.ttf"; sourceTree = ""; }; - 2F7BBC47285586986E0B3457 /* Pods-HEXA Dev.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HEXA Dev.release.xcconfig"; path = "Target Support Files/Pods-HEXA Dev/Pods-HEXA Dev.release.xcconfig"; sourceTree = ""; }; + 2EF112C156ACEA9B1E96067C /* Pods-HEXA.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HEXA.release.xcconfig"; path = "Target Support Files/Pods-HEXA/Pods-HEXA.release.xcconfig"; sourceTree = ""; }; + 3501CBAA58A753A24DA25D88 /* Pods-HEXA Stage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HEXA Stage.debug.xcconfig"; path = "Target Support Files/Pods-HEXA Stage/Pods-HEXA Stage.debug.xcconfig"; sourceTree = ""; }; 39CE481CEF614843B40E1EC5 /* OpenSans-ExtraBold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-ExtraBold.ttf"; path = "../src/assets/fonts/OpenSans-ExtraBold.ttf"; sourceTree = ""; }; 466F94D18D9449A8957F3610 /* OpenSans-Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-Regular.ttf"; path = "../src/assets/fonts/OpenSans-Regular.ttf"; sourceTree = ""; }; - 476B8127901FC2E85C2F06CA /* libPods-HEXA Stage.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HEXA Stage.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4A19C8BF1B39563898793156 /* libPods-HEXA.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HEXA.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 4D3784CB53EE4E7D914C42B4 /* FiraSans-SemiBold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "FiraSans-SemiBold.ttf"; path = "../src/assets/fonts/FiraSans-SemiBold.ttf"; sourceTree = ""; }; 5395FCDF04064C3DBEEE4A64 /* FontAwesome5_Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Regular.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf"; sourceTree = ""; }; 559C9AB9CDAC4F3FA05EC3FE /* Foundation.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Foundation.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Foundation.ttf"; sourceTree = ""; }; + 5607748ACD75E13D9AE3F326 /* Pods-HEXA.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HEXA.debug.xcconfig"; path = "Target Support Files/Pods-HEXA/Pods-HEXA.debug.xcconfig"; sourceTree = ""; }; 57F664D38343416FB1C55280 /* Zocial.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Zocial.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Zocial.ttf"; sourceTree = ""; }; 599B38ECC3EC4E4CB38D4C8A /* OpenSans-Bold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-Bold.ttf"; path = "../src/assets/fonts/OpenSans-Bold.ttf"; sourceTree = ""; }; 6111482E2506463F00ED433D /* CloudKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CloudKit.framework; path = System/Library/Frameworks/CloudKit.framework; sourceTree = SDKROOT; }; @@ -140,11 +142,12 @@ 6A234933673440BFB6559B6D /* FontAwesome5_Solid.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Solid.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf"; sourceTree = ""; }; 70412DE9AEA54C18972F9DD5 /* Feather.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Feather.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Feather.ttf"; sourceTree = ""; }; 7BBFAA85840C4C369964BD81 /* FiraSans-Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "FiraSans-Regular.ttf"; path = "../src/assets/fonts/FiraSans-Regular.ttf"; sourceTree = ""; }; + 7C9651471DCD326912DBB300 /* libPods-HEXA Stage.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HEXA Stage.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = HEXA/LaunchScreen.storyboard; sourceTree = ""; }; 8A1B98A7327A4AD8A5860B74 /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = ""; }; - 8D259F301BBD311EEEDACCFE /* libPods-HEXA.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HEXA.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8BDB9E6B365CFE2857EBA7C1 /* Pods-HEXA Dev.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HEXA Dev.release.xcconfig"; path = "Target Support Files/Pods-HEXA Dev/Pods-HEXA Dev.release.xcconfig"; sourceTree = ""; }; 917A2A003A01429481FD026C /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = ""; }; - 92235FD800ABA6B3CFCEB66C /* Pods-HEXA Stage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HEXA Stage.debug.xcconfig"; path = "Target Support Files/Pods-HEXA Stage/Pods-HEXA Stage.debug.xcconfig"; sourceTree = ""; }; + 957F492D5DAE5687C8F7BFC3 /* Pods-HEXA Dev.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HEXA Dev.debug.xcconfig"; path = "Target Support Files/Pods-HEXA Dev/Pods-HEXA Dev.debug.xcconfig"; sourceTree = ""; }; 96E40822F039459A97686C32 /* OpenSans-Italic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-Italic.ttf"; path = "../src/assets/fonts/OpenSans-Italic.ttf"; sourceTree = ""; }; 9A4E6F5E9B5642DD8E860F82 /* FiraSans-Medium.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "FiraSans-Medium.ttf"; path = "../src/assets/fonts/FiraSans-Medium.ttf"; sourceTree = ""; }; 9E29DABD5A154C1997E9AD44 /* OpenSans-BoldItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-BoldItalic.ttf"; path = "../src/assets/fonts/OpenSans-BoldItalic.ttf"; sourceTree = ""; }; @@ -152,7 +155,6 @@ AA11C3A12548270900B032D1 /* HEXA.Dev-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "HEXA.Dev-Info.plist"; path = "HEXA/HEXA.Dev-Info.plist"; sourceTree = ""; }; AA11C3A32548271A00B032D1 /* HEXA.Stage-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "HEXA.Stage-Info.plist"; path = "HEXA/HEXA.Stage-Info.plist"; sourceTree = ""; }; AD12BB582E724B3887BFFE64 /* OpenSans-Light.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-Light.ttf"; path = "../src/assets/fonts/OpenSans-Light.ttf"; sourceTree = ""; }; - B27D7E2452C6075107753AFE /* Pods-HEXA.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HEXA.release.xcconfig"; path = "Target Support Files/Pods-HEXA/Pods-HEXA.release.xcconfig"; sourceTree = ""; }; C1B0A87F089E485685570E93 /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = SimpleLineIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf"; sourceTree = ""; }; C88B0D378D49456C80224451 /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = ""; }; C8BC543B70204B8FB3B09520 /* Fontisto.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Fontisto.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf"; sourceTree = ""; }; @@ -160,20 +162,18 @@ CCF1689125FB8FCF0038E126 /* iCloud.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iCloud.m; path = iCloud/iCloud.m; sourceTree = ""; }; CCF1689325FB8FD90038E126 /* iCloud.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iCloud.h; path = iCloud/iCloud.h; sourceTree = ""; }; CCF1689425FB8FE60038E126 /* HexaWalletBackup.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = HexaWalletBackup.json; path = iCloud/HexaWalletBackup.json; sourceTree = ""; }; + CD388D7ACD0466BE84BC5F57 /* libPods-HEXA Dev.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HEXA Dev.a"; sourceTree = BUILT_PRODUCTS_DIR; }; D242AB8F3F014E068BE8C13D /* FontAwesome5_Brands.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Brands.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf"; sourceTree = ""; }; DAD1674B7394413A82B21AF7 /* OpenSans-SemiboldItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-SemiboldItalic.ttf"; path = "../src/assets/fonts/OpenSans-SemiboldItalic.ttf"; sourceTree = ""; }; DF7107F6EA2D4846A469A116 /* OpenSans-Semibold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-Semibold.ttf"; path = "../src/assets/fonts/OpenSans-Semibold.ttf"; sourceTree = ""; }; E2EDF28037624796A9996D82 /* FiraSans-Italic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "FiraSans-Italic.ttf"; path = "../src/assets/fonts/FiraSans-Italic.ttf"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; - EE54A51947F968A5EF54D42E /* Pods-HEXA Stage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HEXA Stage.release.xcconfig"; path = "Target Support Files/Pods-HEXA Stage/Pods-HEXA Stage.release.xcconfig"; sourceTree = ""; }; EE6F36351DD345FAB2CDA5DE /* AntDesign.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = AntDesign.ttf; path = "../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf"; sourceTree = ""; }; - F2496DA6CFA61C7679165390 /* Pods-HEXA Dev.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HEXA Dev.debug.xcconfig"; path = "Target Support Files/Pods-HEXA Dev/Pods-HEXA Dev.debug.xcconfig"; sourceTree = ""; }; F49AA80A26A0284D0097D815 /* BackgroundViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BackgroundViewController.h; sourceTree = ""; }; F49AA80B26A0284D0097D815 /* BackgroundViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BackgroundViewController.m; sourceTree = ""; }; F49AA80C26A0284D0097D815 /* BackgroundViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BackgroundViewController.xib; sourceTree = ""; }; F727B7636E8440F1BC2C78B2 /* OpenSans-LightItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-LightItalic.ttf"; path = "../src/assets/fonts/OpenSans-LightItalic.ttf"; sourceTree = ""; }; - FEBDCBEC860393FD1F2FD5BA /* Pods-HEXA.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HEXA.debug.xcconfig"; path = "Target Support Files/Pods-HEXA/Pods-HEXA.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -182,7 +182,7 @@ buildActionMask = 2147483647; files = ( 6111482F2506463F00ED433D /* CloudKit.framework in Frameworks */, - E1EEF97F2FD5F39629456AEB /* libPods-HEXA.a in Frameworks */, + C86E6CE163F3E6812F7A2B4B /* libPods-HEXA.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -191,7 +191,7 @@ buildActionMask = 2147483647; files = ( 6182F77B250B23D7005B6ECE /* CloudKit.framework in Frameworks */, - 6DB0AB6F5761C736B6243483 /* libPods-HEXA Dev.a in Frameworks */, + 35BD184BB600EA9373FA9281 /* libPods-HEXA Dev.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -200,7 +200,7 @@ buildActionMask = 2147483647; files = ( 6182F7A7250B2742005B6ECE /* CloudKit.framework in Frameworks */, - F1F9568935E404F854458FC4 /* libPods-HEXA Stage.a in Frameworks */, + 971C7BAE5BAE6D5314FF5259 /* libPods-HEXA Stage.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -253,9 +253,9 @@ 6111482E2506463F00ED433D /* CloudKit.framework */, ED297162215061F000B7C4FE /* JavaScriptCore.framework */, ED2971642150620600B7C4FE /* JavaScriptCore.framework */, - 8D259F301BBD311EEEDACCFE /* libPods-HEXA.a */, - 248E39EF255398760EE1782A /* libPods-HEXA Dev.a */, - 476B8127901FC2E85C2F06CA /* libPods-HEXA Stage.a */, + 4A19C8BF1B39563898793156 /* libPods-HEXA.a */, + CD388D7ACD0466BE84BC5F57 /* libPods-HEXA Dev.a */, + 7C9651471DCD326912DBB300 /* libPods-HEXA Stage.a */, ); name = Frameworks; sourceTree = ""; @@ -300,12 +300,12 @@ 9FD0418BDBDF3D36477ED773 /* Pods */ = { isa = PBXGroup; children = ( - FEBDCBEC860393FD1F2FD5BA /* Pods-HEXA.debug.xcconfig */, - B27D7E2452C6075107753AFE /* Pods-HEXA.release.xcconfig */, - F2496DA6CFA61C7679165390 /* Pods-HEXA Dev.debug.xcconfig */, - 2F7BBC47285586986E0B3457 /* Pods-HEXA Dev.release.xcconfig */, - 92235FD800ABA6B3CFCEB66C /* Pods-HEXA Stage.debug.xcconfig */, - EE54A51947F968A5EF54D42E /* Pods-HEXA Stage.release.xcconfig */, + 5607748ACD75E13D9AE3F326 /* Pods-HEXA.debug.xcconfig */, + 2EF112C156ACEA9B1E96067C /* Pods-HEXA.release.xcconfig */, + 957F492D5DAE5687C8F7BFC3 /* Pods-HEXA Dev.debug.xcconfig */, + 8BDB9E6B365CFE2857EBA7C1 /* Pods-HEXA Dev.release.xcconfig */, + 3501CBAA58A753A24DA25D88 /* Pods-HEXA Stage.debug.xcconfig */, + 152B23CF7F362750A3583C5C /* Pods-HEXA Stage.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -367,15 +367,16 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "HEXA" */; buildPhases = ( - BF473A888F35B3B574DA1894 /* [CP] Check Pods Manifest.lock */, + A3CDCC7F7ED66565F85C110F /* [CP] Check Pods Manifest.lock */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, B77977742B15F1AA76FFF64C /* ShellScript */, - 84FC827691E8838850F20CCD /* [CP] Copy Pods Resources */, - 44E6AEBE1C14ADCC2B50A289 /* [CP-User] [RNFB] Core Configuration */, - CFC5C7DBC9AD2AC2A607FB31 /* [CP-User] [RNFB] Crashlytics Configuration */, + B8118E900049E6EFF8C3DDFF /* [CP] Embed Pods Frameworks */, + A3EBF00F4180AA0ECD74ABCC /* [CP] Copy Pods Resources */, + 806A51D94B9B8A9E860D39F1 /* [CP-User] [RNFB] Core Configuration */, + 536DCC09543A50D84E9982F7 /* [CP-User] [RNFB] Crashlytics Configuration */, ); buildRules = ( ); @@ -390,15 +391,16 @@ isa = PBXNativeTarget; buildConfigurationList = 6182F793250B23D7005B6ECE /* Build configuration list for PBXNativeTarget "HEXA Dev" */; buildPhases = ( - 205B5746B46EEF6FF108EB6B /* [CP] Check Pods Manifest.lock */, + FBB318BF409CED5D18299063 /* [CP] Check Pods Manifest.lock */, 4D3833062600A16700F82BDB /* Start Packager */, 6182F775250B23D7005B6ECE /* Sources */, 6182F77A250B23D7005B6ECE /* Frameworks */, 6182F77D250B23D7005B6ECE /* Resources */, 4D38330B2600BEC000F82BDB /* Bundle React Native code and images */, - B2706983F1D814B0F5FE408F /* [CP] Copy Pods Resources */, - 30247AD03595E409799E2113 /* [CP-User] [RNFB] Core Configuration */, - 7C80CE9A09A1AEAD2EBFE47E /* [CP-User] [RNFB] Crashlytics Configuration */, + 58E49113504567F735ED2978 /* [CP] Embed Pods Frameworks */, + 3C4D7BD64EA3ABE9A196B66D /* [CP] Copy Pods Resources */, + 89CDB23F8024E126B9AD1E88 /* [CP-User] [RNFB] Core Configuration */, + FFE4D63C9BB61282EB1400A7 /* [CP-User] [RNFB] Crashlytics Configuration */, ); buildRules = ( ); @@ -413,16 +415,17 @@ isa = PBXNativeTarget; buildConfigurationList = 6182F7BF250B2742005B6ECE /* Build configuration list for PBXNativeTarget "HEXA Stage" */; buildPhases = ( - E4A670700A7C9A81CCA8BC28 /* [CP] Check Pods Manifest.lock */, + 1F40934891DF7929D5399513 /* [CP] Check Pods Manifest.lock */, 4D260BB12613190A001DA4F9 /* Start Packager */, 6182F7A1250B2742005B6ECE /* Sources */, 6182F7A6250B2742005B6ECE /* Frameworks */, 6182F7A9250B2742005B6ECE /* Resources */, 4D38330D2600BF0500F82BDB /* Bundle React Native code and images */, E5A02DBA22BA388F5357F55F /* ShellScript */, - CAA89D839E9F66D27F881D2C /* [CP] Copy Pods Resources */, - A545F03BB9D38B38EEC9104A /* [CP-User] [RNFB] Core Configuration */, - FD0A097C235151C67539C3C7 /* [CP-User] [RNFB] Crashlytics Configuration */, + 2CE3A7E0949CEF9F06D5DA0A /* [CP] Embed Pods Frameworks */, + B087BB47FD2E41DD9328AFC2 /* [CP] Copy Pods Resources */, + A174CD4ACD875DA196D5DAC3 /* [CP-User] [RNFB] Core Configuration */, + A3AD2750C003BA42A6CA04CD /* [CP-User] [RNFB] Crashlytics Configuration */, ); buildRules = ( ); @@ -580,7 +583,7 @@ shellPath = /bin/sh; shellScript = "cd $PROJECT_DIR/..\nexport NODE_BINARY=node\n./node_modules/react-native/scripts/react-native-xcode.sh\n"; }; - 205B5746B46EEF6FF108EB6B /* [CP] Check Pods Manifest.lock */ = { + 1F40934891DF7929D5399513 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -595,38 +598,80 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-HEXA Dev-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-HEXA Stage-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; 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; }; - 30247AD03595E409799E2113 /* [CP-User] [RNFB] Core Configuration */ = { + 2CE3A7E0949CEF9F06D5DA0A /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", + "${PODS_ROOT}/Target Support Files/Pods-HEXA Stage/Pods-HEXA Stage-frameworks.sh", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", ); - name = "[CP-User] [RNFB] Core Configuration"; runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_JSON_ROOT=\"'react-native'\"\n_JSON_FILE_NAME='firebase.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"info: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"info: '$1' already exists\"\n}\n\nfunction getFirebaseJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"info: -> RNFB build script started\"\necho \"info: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"info: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n _RN_ROOT_EXISTS=$(ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\" || echo '')\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"python3 not found, firebase.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.app_data_collection_default_enabled\n _APP_DATA_COLLECTION_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_data_collection_default_enabled\")\n if [[ $_APP_DATA_COLLECTION_ENABLED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseDataCollectionDefaultEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_DATA_COLLECTION_ENABLED\")\")\n fi\n\n # config.analytics_auto_collection_enabled\n _ANALYTICS_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_auto_collection_enabled\")\n if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_COLLECTION\")\")\n fi\n\n # config.analytics_collection_deactivated\n _ANALYTICS_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_collection_deactivated\")\n if [[ $_ANALYTICS_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_DEACTIVATED\")\")\n fi\n\n # config.analytics_idfv_collection_enabled\n _ANALYTICS_IDFV_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_idfv_collection_enabled\")\n if [[ $_ANALYTICS_IDFV_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_IDFV_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_IDFV_COLLECTION\")\")\n fi\n\n # config.analytics_default_allow_ad_personalization_signals\n _ANALYTICS_PERSONALIZATION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_personalization_signals\")\n if [[ $_ANALYTICS_PERSONALIZATION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_PERSONALIZATION\")\")\n fi\n\n # config.google_analytics_automatic_screen_reporting_enabled\n _ANALYTICS_AUTO_SCREEN_REPORTING=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_automatic_screen_reporting_enabled\")\n if [[ $_ANALYTICS_AUTO_SCREEN_REPORTING ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAutomaticScreenReportingEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_SCREEN_REPORTING\")\")\n fi\n\n # config.perf_auto_collection_enabled\n _PERF_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_auto_collection_enabled\")\n if [[ $_PERF_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_enabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_AUTO_COLLECTION\")\")\n fi\n\n # config.perf_collection_deactivated\n _PERF_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_collection_deactivated\")\n if [[ $_PERF_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_deactivated\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_DEACTIVATED\")\")\n fi\n\n # config.messaging_auto_init_enabled\n _MESSAGING_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"messaging_auto_init_enabled\")\n if [[ $_MESSAGING_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseMessagingAutoInitEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_MESSAGING_AUTO_INIT\")\")\n fi\n\n # config.in_app_messaging_auto_colllection_enabled\n _FIAM_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"in_app_messaging_auto_collection_enabled\")\n if [[ $_FIAM_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseInAppMessagingAutomaticDataCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_FIAM_AUTO_INIT\")\")\n fi\n\n # config.app_check_token_auto_refresh\n _APP_CHECK_TOKEN_AUTO_REFRESH=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_check_token_auto_refresh\")\n if [[ $_APP_CHECK_TOKEN_AUTO_REFRESH ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAppCheckTokenAutoRefreshEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_CHECK_TOKEN_AUTO_REFRESH\")\")\n fi\n\n # config.crashlytics_disable_auto_disabler - undocumented for now - mainly for debugging, document if becomes useful\n _CRASHLYTICS_AUTO_DISABLE_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"crashlytics_disable_auto_disabler\")\n if [[ $_CRASHLYTICS_AUTO_DISABLE_ENABLED == \"true\" ]]; then\n echo \"Disabled Crashlytics auto disabler.\" # do nothing\n else\n _PLIST_ENTRY_KEYS+=(\"FirebaseCrashlyticsCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"NO\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A firebase.json file was not found, whilst this file is optional it is recommended to include it to configure firebase services in React Native Firebase.\"\nfi;\n\necho \"info: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"info: <- RNFB build script finished\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HEXA Stage/Pods-HEXA Stage-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - 44E6AEBE1C14ADCC2B50A289 /* [CP-User] [RNFB] Core Configuration */ = { + 3C4D7BD64EA3ABE9A196B66D /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", + "${PODS_ROOT}/Target Support Files/Pods-HEXA Dev/Pods-HEXA Dev-resources.sh", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Feather.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Fontisto.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", ); - name = "[CP-User] [RNFB] Core Configuration"; runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_JSON_ROOT=\"'react-native'\"\n_JSON_FILE_NAME='firebase.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"info: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"info: '$1' already exists\"\n}\n\nfunction getFirebaseJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"info: -> RNFB build script started\"\necho \"info: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"info: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n _RN_ROOT_EXISTS=$(ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\" || echo '')\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"python3 not found, firebase.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.app_data_collection_default_enabled\n _APP_DATA_COLLECTION_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_data_collection_default_enabled\")\n if [[ $_APP_DATA_COLLECTION_ENABLED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseDataCollectionDefaultEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_DATA_COLLECTION_ENABLED\")\")\n fi\n\n # config.analytics_auto_collection_enabled\n _ANALYTICS_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_auto_collection_enabled\")\n if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_COLLECTION\")\")\n fi\n\n # config.analytics_collection_deactivated\n _ANALYTICS_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_collection_deactivated\")\n if [[ $_ANALYTICS_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_DEACTIVATED\")\")\n fi\n\n # config.analytics_idfv_collection_enabled\n _ANALYTICS_IDFV_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_idfv_collection_enabled\")\n if [[ $_ANALYTICS_IDFV_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_IDFV_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_IDFV_COLLECTION\")\")\n fi\n\n # config.analytics_default_allow_ad_personalization_signals\n _ANALYTICS_PERSONALIZATION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_personalization_signals\")\n if [[ $_ANALYTICS_PERSONALIZATION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_PERSONALIZATION\")\")\n fi\n\n # config.google_analytics_automatic_screen_reporting_enabled\n _ANALYTICS_AUTO_SCREEN_REPORTING=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_automatic_screen_reporting_enabled\")\n if [[ $_ANALYTICS_AUTO_SCREEN_REPORTING ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAutomaticScreenReportingEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_SCREEN_REPORTING\")\")\n fi\n\n # config.perf_auto_collection_enabled\n _PERF_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_auto_collection_enabled\")\n if [[ $_PERF_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_enabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_AUTO_COLLECTION\")\")\n fi\n\n # config.perf_collection_deactivated\n _PERF_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_collection_deactivated\")\n if [[ $_PERF_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_deactivated\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_DEACTIVATED\")\")\n fi\n\n # config.messaging_auto_init_enabled\n _MESSAGING_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"messaging_auto_init_enabled\")\n if [[ $_MESSAGING_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseMessagingAutoInitEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_MESSAGING_AUTO_INIT\")\")\n fi\n\n # config.in_app_messaging_auto_colllection_enabled\n _FIAM_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"in_app_messaging_auto_collection_enabled\")\n if [[ $_FIAM_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseInAppMessagingAutomaticDataCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_FIAM_AUTO_INIT\")\")\n fi\n\n # config.app_check_token_auto_refresh\n _APP_CHECK_TOKEN_AUTO_REFRESH=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_check_token_auto_refresh\")\n if [[ $_APP_CHECK_TOKEN_AUTO_REFRESH ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAppCheckTokenAutoRefreshEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_CHECK_TOKEN_AUTO_REFRESH\")\")\n fi\n\n # config.crashlytics_disable_auto_disabler - undocumented for now - mainly for debugging, document if becomes useful\n _CRASHLYTICS_AUTO_DISABLE_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"crashlytics_disable_auto_disabler\")\n if [[ $_CRASHLYTICS_AUTO_DISABLE_ENABLED == \"true\" ]]; then\n echo \"Disabled Crashlytics auto disabler.\" # do nothing\n else\n _PLIST_ENTRY_KEYS+=(\"FirebaseCrashlyticsCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"NO\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A firebase.json file was not found, whilst this file is optional it is recommended to include it to configure firebase services in React Native Firebase.\"\nfi;\n\necho \"info: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"info: <- RNFB build script finished\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HEXA Dev/Pods-HEXA Dev-resources.sh\"\n"; + showEnvVarsInLog = 0; }; 4D260BB12613190A001DA4F9 /* Start Packager */ = { isa = PBXShellScriptBuildPhase; @@ -700,7 +745,7 @@ shellPath = /bin/sh; shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd $PROJECT_DIR/..\nexport NODE_BINARY=node\n./node_modules/react-native/scripts/react-native-xcode.sh\n"; }; - 7C80CE9A09A1AEAD2EBFE47E /* [CP-User] [RNFB] Crashlytics Configuration */ = { + 536DCC09543A50D84E9982F7 /* [CP-User] [RNFB] Crashlytics Configuration */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -714,7 +759,100 @@ shellPath = /bin/sh; shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\nif [[ ${PODS_ROOT} ]]; then\n echo \"info: Exec FirebaseCrashlytics Run from Pods\"\n \"${PODS_ROOT}/FirebaseCrashlytics/run\"\nelse\n echo \"info: Exec FirebaseCrashlytics Run from framework\"\n \"${PROJECT_DIR}/FirebaseCrashlytics.framework/run\"\nfi\n"; }; - 84FC827691E8838850F20CCD /* [CP] Copy Pods Resources */ = { + 58E49113504567F735ED2978 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HEXA Dev/Pods-HEXA Dev-frameworks.sh", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HEXA Dev/Pods-HEXA Dev-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 806A51D94B9B8A9E860D39F1 /* [CP-User] [RNFB] Core Configuration */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", + ); + name = "[CP-User] [RNFB] Core Configuration"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_JSON_ROOT=\"'react-native'\"\n_JSON_FILE_NAME='firebase.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"info: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"info: '$1' already exists\"\n}\n\nfunction getFirebaseJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"info: -> RNFB build script started\"\necho \"info: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"info: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n _RN_ROOT_EXISTS=$(ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\" || echo '')\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"python3 not found, firebase.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.app_data_collection_default_enabled\n _APP_DATA_COLLECTION_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_data_collection_default_enabled\")\n if [[ $_APP_DATA_COLLECTION_ENABLED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseDataCollectionDefaultEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_DATA_COLLECTION_ENABLED\")\")\n fi\n\n # config.analytics_auto_collection_enabled\n _ANALYTICS_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_auto_collection_enabled\")\n if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_COLLECTION\")\")\n fi\n\n # config.analytics_collection_deactivated\n _ANALYTICS_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_collection_deactivated\")\n if [[ $_ANALYTICS_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_DEACTIVATED\")\")\n fi\n\n # config.analytics_idfv_collection_enabled\n _ANALYTICS_IDFV_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_idfv_collection_enabled\")\n if [[ $_ANALYTICS_IDFV_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_IDFV_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_IDFV_COLLECTION\")\")\n fi\n\n # config.analytics_default_allow_ad_personalization_signals\n _ANALYTICS_PERSONALIZATION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_personalization_signals\")\n if [[ $_ANALYTICS_PERSONALIZATION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_PERSONALIZATION\")\")\n fi\n\n # config.google_analytics_automatic_screen_reporting_enabled\n _ANALYTICS_AUTO_SCREEN_REPORTING=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_automatic_screen_reporting_enabled\")\n if [[ $_ANALYTICS_AUTO_SCREEN_REPORTING ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAutomaticScreenReportingEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_SCREEN_REPORTING\")\")\n fi\n\n # config.perf_auto_collection_enabled\n _PERF_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_auto_collection_enabled\")\n if [[ $_PERF_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_enabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_AUTO_COLLECTION\")\")\n fi\n\n # config.perf_collection_deactivated\n _PERF_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_collection_deactivated\")\n if [[ $_PERF_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_deactivated\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_DEACTIVATED\")\")\n fi\n\n # config.messaging_auto_init_enabled\n _MESSAGING_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"messaging_auto_init_enabled\")\n if [[ $_MESSAGING_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseMessagingAutoInitEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_MESSAGING_AUTO_INIT\")\")\n fi\n\n # config.in_app_messaging_auto_colllection_enabled\n _FIAM_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"in_app_messaging_auto_collection_enabled\")\n if [[ $_FIAM_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseInAppMessagingAutomaticDataCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_FIAM_AUTO_INIT\")\")\n fi\n\n # config.app_check_token_auto_refresh\n _APP_CHECK_TOKEN_AUTO_REFRESH=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_check_token_auto_refresh\")\n if [[ $_APP_CHECK_TOKEN_AUTO_REFRESH ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAppCheckTokenAutoRefreshEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_CHECK_TOKEN_AUTO_REFRESH\")\")\n fi\n\n # config.crashlytics_disable_auto_disabler - undocumented for now - mainly for debugging, document if becomes useful\n _CRASHLYTICS_AUTO_DISABLE_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"crashlytics_disable_auto_disabler\")\n if [[ $_CRASHLYTICS_AUTO_DISABLE_ENABLED == \"true\" ]]; then\n echo \"Disabled Crashlytics auto disabler.\" # do nothing\n else\n _PLIST_ENTRY_KEYS+=(\"FirebaseCrashlyticsCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"NO\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A firebase.json file was not found, whilst this file is optional it is recommended to include it to configure firebase services in React Native Firebase.\"\nfi;\n\necho \"info: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"info: <- RNFB build script finished\"\n"; + }; + 89CDB23F8024E126B9AD1E88 /* [CP-User] [RNFB] Core Configuration */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", + ); + name = "[CP-User] [RNFB] Core Configuration"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_JSON_ROOT=\"'react-native'\"\n_JSON_FILE_NAME='firebase.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"info: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"info: '$1' already exists\"\n}\n\nfunction getFirebaseJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"info: -> RNFB build script started\"\necho \"info: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"info: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n _RN_ROOT_EXISTS=$(ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\" || echo '')\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"python3 not found, firebase.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.app_data_collection_default_enabled\n _APP_DATA_COLLECTION_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_data_collection_default_enabled\")\n if [[ $_APP_DATA_COLLECTION_ENABLED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseDataCollectionDefaultEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_DATA_COLLECTION_ENABLED\")\")\n fi\n\n # config.analytics_auto_collection_enabled\n _ANALYTICS_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_auto_collection_enabled\")\n if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_COLLECTION\")\")\n fi\n\n # config.analytics_collection_deactivated\n _ANALYTICS_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_collection_deactivated\")\n if [[ $_ANALYTICS_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_DEACTIVATED\")\")\n fi\n\n # config.analytics_idfv_collection_enabled\n _ANALYTICS_IDFV_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_idfv_collection_enabled\")\n if [[ $_ANALYTICS_IDFV_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_IDFV_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_IDFV_COLLECTION\")\")\n fi\n\n # config.analytics_default_allow_ad_personalization_signals\n _ANALYTICS_PERSONALIZATION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_personalization_signals\")\n if [[ $_ANALYTICS_PERSONALIZATION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_PERSONALIZATION\")\")\n fi\n\n # config.google_analytics_automatic_screen_reporting_enabled\n _ANALYTICS_AUTO_SCREEN_REPORTING=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_automatic_screen_reporting_enabled\")\n if [[ $_ANALYTICS_AUTO_SCREEN_REPORTING ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAutomaticScreenReportingEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_SCREEN_REPORTING\")\")\n fi\n\n # config.perf_auto_collection_enabled\n _PERF_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_auto_collection_enabled\")\n if [[ $_PERF_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_enabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_AUTO_COLLECTION\")\")\n fi\n\n # config.perf_collection_deactivated\n _PERF_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_collection_deactivated\")\n if [[ $_PERF_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_deactivated\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_DEACTIVATED\")\")\n fi\n\n # config.messaging_auto_init_enabled\n _MESSAGING_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"messaging_auto_init_enabled\")\n if [[ $_MESSAGING_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseMessagingAutoInitEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_MESSAGING_AUTO_INIT\")\")\n fi\n\n # config.in_app_messaging_auto_colllection_enabled\n _FIAM_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"in_app_messaging_auto_collection_enabled\")\n if [[ $_FIAM_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseInAppMessagingAutomaticDataCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_FIAM_AUTO_INIT\")\")\n fi\n\n # config.app_check_token_auto_refresh\n _APP_CHECK_TOKEN_AUTO_REFRESH=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_check_token_auto_refresh\")\n if [[ $_APP_CHECK_TOKEN_AUTO_REFRESH ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAppCheckTokenAutoRefreshEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_CHECK_TOKEN_AUTO_REFRESH\")\")\n fi\n\n # config.crashlytics_disable_auto_disabler - undocumented for now - mainly for debugging, document if becomes useful\n _CRASHLYTICS_AUTO_DISABLE_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"crashlytics_disable_auto_disabler\")\n if [[ $_CRASHLYTICS_AUTO_DISABLE_ENABLED == \"true\" ]]; then\n echo \"Disabled Crashlytics auto disabler.\" # do nothing\n else\n _PLIST_ENTRY_KEYS+=(\"FirebaseCrashlyticsCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"NO\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A firebase.json file was not found, whilst this file is optional it is recommended to include it to configure firebase services in React Native Firebase.\"\nfi;\n\necho \"info: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"info: <- RNFB build script finished\"\n"; + }; + A174CD4ACD875DA196D5DAC3 /* [CP-User] [RNFB] Core Configuration */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", + ); + name = "[CP-User] [RNFB] Core Configuration"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_JSON_ROOT=\"'react-native'\"\n_JSON_FILE_NAME='firebase.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"info: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"info: '$1' already exists\"\n}\n\nfunction getFirebaseJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"info: -> RNFB build script started\"\necho \"info: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"info: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n _RN_ROOT_EXISTS=$(ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\" || echo '')\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"python3 not found, firebase.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.app_data_collection_default_enabled\n _APP_DATA_COLLECTION_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_data_collection_default_enabled\")\n if [[ $_APP_DATA_COLLECTION_ENABLED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseDataCollectionDefaultEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_DATA_COLLECTION_ENABLED\")\")\n fi\n\n # config.analytics_auto_collection_enabled\n _ANALYTICS_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_auto_collection_enabled\")\n if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_COLLECTION\")\")\n fi\n\n # config.analytics_collection_deactivated\n _ANALYTICS_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_collection_deactivated\")\n if [[ $_ANALYTICS_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_DEACTIVATED\")\")\n fi\n\n # config.analytics_idfv_collection_enabled\n _ANALYTICS_IDFV_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_idfv_collection_enabled\")\n if [[ $_ANALYTICS_IDFV_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_IDFV_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_IDFV_COLLECTION\")\")\n fi\n\n # config.analytics_default_allow_ad_personalization_signals\n _ANALYTICS_PERSONALIZATION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_personalization_signals\")\n if [[ $_ANALYTICS_PERSONALIZATION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_PERSONALIZATION\")\")\n fi\n\n # config.google_analytics_automatic_screen_reporting_enabled\n _ANALYTICS_AUTO_SCREEN_REPORTING=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_automatic_screen_reporting_enabled\")\n if [[ $_ANALYTICS_AUTO_SCREEN_REPORTING ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAutomaticScreenReportingEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_SCREEN_REPORTING\")\")\n fi\n\n # config.perf_auto_collection_enabled\n _PERF_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_auto_collection_enabled\")\n if [[ $_PERF_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_enabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_AUTO_COLLECTION\")\")\n fi\n\n # config.perf_collection_deactivated\n _PERF_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_collection_deactivated\")\n if [[ $_PERF_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_deactivated\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_DEACTIVATED\")\")\n fi\n\n # config.messaging_auto_init_enabled\n _MESSAGING_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"messaging_auto_init_enabled\")\n if [[ $_MESSAGING_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseMessagingAutoInitEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_MESSAGING_AUTO_INIT\")\")\n fi\n\n # config.in_app_messaging_auto_colllection_enabled\n _FIAM_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"in_app_messaging_auto_collection_enabled\")\n if [[ $_FIAM_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseInAppMessagingAutomaticDataCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_FIAM_AUTO_INIT\")\")\n fi\n\n # config.app_check_token_auto_refresh\n _APP_CHECK_TOKEN_AUTO_REFRESH=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_check_token_auto_refresh\")\n if [[ $_APP_CHECK_TOKEN_AUTO_REFRESH ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAppCheckTokenAutoRefreshEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_CHECK_TOKEN_AUTO_REFRESH\")\")\n fi\n\n # config.crashlytics_disable_auto_disabler - undocumented for now - mainly for debugging, document if becomes useful\n _CRASHLYTICS_AUTO_DISABLE_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"crashlytics_disable_auto_disabler\")\n if [[ $_CRASHLYTICS_AUTO_DISABLE_ENABLED == \"true\" ]]; then\n echo \"Disabled Crashlytics auto disabler.\" # do nothing\n else\n _PLIST_ENTRY_KEYS+=(\"FirebaseCrashlyticsCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"NO\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A firebase.json file was not found, whilst this file is optional it is recommended to include it to configure firebase services in React Native Firebase.\"\nfi;\n\necho \"info: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"info: <- RNFB build script finished\"\n"; + }; + A3AD2750C003BA42A6CA04CD /* [CP-User] [RNFB] Crashlytics Configuration */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}", + "$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", + ); + name = "[CP-User] [RNFB] Crashlytics Configuration"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\nif [[ ${PODS_ROOT} ]]; then\n echo \"info: Exec FirebaseCrashlytics Run from Pods\"\n \"${PODS_ROOT}/FirebaseCrashlytics/run\"\nelse\n echo \"info: Exec FirebaseCrashlytics Run from framework\"\n \"${PROJECT_DIR}/FirebaseCrashlytics.framework/run\"\nfi\n"; + }; + A3CDCC7F7ED66565F85C110F /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-HEXA-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + 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; + }; + A3EBF00F4180AA0ECD74ABCC /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -764,26 +902,13 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HEXA/Pods-HEXA-resources.sh\"\n"; showEnvVarsInLog = 0; }; - A545F03BB9D38B38EEC9104A /* [CP-User] [RNFB] Core Configuration */ = { + B087BB47FD2E41DD9328AFC2 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", - ); - name = "[CP-User] [RNFB] Core Configuration"; - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_JSON_ROOT=\"'react-native'\"\n_JSON_FILE_NAME='firebase.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"info: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"info: '$1' already exists\"\n}\n\nfunction getFirebaseJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"info: -> RNFB build script started\"\necho \"info: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"info: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n _RN_ROOT_EXISTS=$(ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\" || echo '')\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"python3 not found, firebase.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.app_data_collection_default_enabled\n _APP_DATA_COLLECTION_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_data_collection_default_enabled\")\n if [[ $_APP_DATA_COLLECTION_ENABLED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseDataCollectionDefaultEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_DATA_COLLECTION_ENABLED\")\")\n fi\n\n # config.analytics_auto_collection_enabled\n _ANALYTICS_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_auto_collection_enabled\")\n if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_COLLECTION\")\")\n fi\n\n # config.analytics_collection_deactivated\n _ANALYTICS_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_collection_deactivated\")\n if [[ $_ANALYTICS_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_DEACTIVATED\")\")\n fi\n\n # config.analytics_idfv_collection_enabled\n _ANALYTICS_IDFV_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_idfv_collection_enabled\")\n if [[ $_ANALYTICS_IDFV_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_IDFV_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_IDFV_COLLECTION\")\")\n fi\n\n # config.analytics_default_allow_ad_personalization_signals\n _ANALYTICS_PERSONALIZATION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_personalization_signals\")\n if [[ $_ANALYTICS_PERSONALIZATION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_PERSONALIZATION\")\")\n fi\n\n # config.google_analytics_automatic_screen_reporting_enabled\n _ANALYTICS_AUTO_SCREEN_REPORTING=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_automatic_screen_reporting_enabled\")\n if [[ $_ANALYTICS_AUTO_SCREEN_REPORTING ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAutomaticScreenReportingEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_SCREEN_REPORTING\")\")\n fi\n\n # config.perf_auto_collection_enabled\n _PERF_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_auto_collection_enabled\")\n if [[ $_PERF_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_enabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_AUTO_COLLECTION\")\")\n fi\n\n # config.perf_collection_deactivated\n _PERF_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_collection_deactivated\")\n if [[ $_PERF_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_deactivated\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_DEACTIVATED\")\")\n fi\n\n # config.messaging_auto_init_enabled\n _MESSAGING_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"messaging_auto_init_enabled\")\n if [[ $_MESSAGING_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseMessagingAutoInitEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_MESSAGING_AUTO_INIT\")\")\n fi\n\n # config.in_app_messaging_auto_colllection_enabled\n _FIAM_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"in_app_messaging_auto_collection_enabled\")\n if [[ $_FIAM_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseInAppMessagingAutomaticDataCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_FIAM_AUTO_INIT\")\")\n fi\n\n # config.app_check_token_auto_refresh\n _APP_CHECK_TOKEN_AUTO_REFRESH=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_check_token_auto_refresh\")\n if [[ $_APP_CHECK_TOKEN_AUTO_REFRESH ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAppCheckTokenAutoRefreshEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_CHECK_TOKEN_AUTO_REFRESH\")\")\n fi\n\n # config.crashlytics_disable_auto_disabler - undocumented for now - mainly for debugging, document if becomes useful\n _CRASHLYTICS_AUTO_DISABLE_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"crashlytics_disable_auto_disabler\")\n if [[ $_CRASHLYTICS_AUTO_DISABLE_ENABLED == \"true\" ]]; then\n echo \"Disabled Crashlytics auto disabler.\" # do nothing\n else\n _PLIST_ENTRY_KEYS+=(\"FirebaseCrashlyticsCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"NO\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A firebase.json file was not found, whilst this file is optional it is recommended to include it to configure firebase services in React Native Firebase.\"\nfi;\n\necho \"info: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"info: <- RNFB build script finished\"\n"; - }; - B2706983F1D814B0F5FE408F /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HEXA Dev/Pods-HEXA Dev-resources.sh", + "${PODS_ROOT}/Target Support Files/Pods-HEXA Stage/Pods-HEXA Stage-resources.sh", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf", @@ -824,7 +949,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HEXA Dev/Pods-HEXA Dev-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HEXA Stage/Pods-HEXA Stage-resources.sh\"\n"; showEnvVarsInLog = 0; }; B77977742B15F1AA76FFF64C /* ShellScript */ = { @@ -862,35 +987,33 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HEXA/Pods-HEXA-resources.sh\"\n"; showEnvVarsInLog = 0; }; - BF473A888F35B3B574DA1894 /* [CP] Check Pods Manifest.lock */ = { + B8118E900049E6EFF8C3DDFF /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HEXA/Pods-HEXA-frameworks.sh", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", ); + name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-HEXA-checkManifestLockResult.txt", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - 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"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HEXA/Pods-HEXA-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - CAA89D839E9F66D27F881D2C /* [CP] Copy Pods Resources */ = { + E5A02DBA22BA388F5357F55F /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HEXA Stage/Pods-HEXA Stage-resources.sh", + "${PODS_ROOT}/Target Support Files/Pods-HEXA/Pods-HEXA-resources.sh", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf", @@ -909,46 +1032,15 @@ "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", ); - name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Fontisto.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + "$(DERIVED_FILE_DIR)/Pods-HEXA Dev-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HEXA Stage/Pods-HEXA Stage-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HEXA/Pods-HEXA-resources.sh\"\n"; showEnvVarsInLog = 0; }; - CFC5C7DBC9AD2AC2A607FB31 /* [CP-User] [RNFB] Crashlytics Configuration */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}", - "$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", - ); - name = "[CP-User] [RNFB] Crashlytics Configuration"; - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\nif [[ ${PODS_ROOT} ]]; then\n echo \"info: Exec FirebaseCrashlytics Run from Pods\"\n \"${PODS_ROOT}/FirebaseCrashlytics/run\"\nelse\n echo \"info: Exec FirebaseCrashlytics Run from framework\"\n \"${PROJECT_DIR}/FirebaseCrashlytics.framework/run\"\nfi\n"; - }; - E4A670700A7C9A81CCA8BC28 /* [CP] Check Pods Manifest.lock */ = { + FBB318BF409CED5D18299063 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -962,50 +1054,15 @@ name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-HEXA Stage-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - 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; - }; - E5A02DBA22BA388F5357F55F /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HEXA/Pods-HEXA-resources.sh", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Feather.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", - "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", - ); outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-HEXA Dev-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HEXA/Pods-HEXA-resources.sh\"\n"; + 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; }; - FD0A097C235151C67539C3C7 /* [CP-User] [RNFB] Crashlytics Configuration */ = { + FFE4D63C9BB61282EB1400A7 /* [CP-User] [RNFB] Crashlytics Configuration */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -1069,14 +1126,14 @@ /* Begin XCBuildConfiguration section */ 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FEBDCBEC860393FD1F2FD5BA /* Pods-HEXA.debug.xcconfig */; + baseConfigurationReference = 5607748ACD75E13D9AE3F326 /* Pods-HEXA.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = HEXA/Hexa.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 491; + CURRENT_PROJECT_VERSION = 496; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; @@ -1086,7 +1143,7 @@ "$(SDKROOT)/usr/lib/swift", "$(inherited)", ); - MARKETING_VERSION = 2.0.80; + MARKETING_VERSION = 2.0.90; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1104,14 +1161,14 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B27D7E2452C6075107753AFE /* Pods-HEXA.release.xcconfig */; + baseConfigurationReference = 2EF112C156ACEA9B1E96067C /* Pods-HEXA.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = HEXA/Hexa.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 491; + CURRENT_PROJECT_VERSION = 496; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = Y5TCB759QL; INFOPLIST_FILE = HEXA/Info.plist; @@ -1120,7 +1177,7 @@ "$(SDKROOT)/usr/lib/swift", "$(inherited)", ); - MARKETING_VERSION = 2.0.80; + MARKETING_VERSION = 2.0.90; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1137,14 +1194,14 @@ }; 6182F794250B23D7005B6ECE /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F2496DA6CFA61C7679165390 /* Pods-HEXA Dev.debug.xcconfig */; + baseConfigurationReference = 957F492D5DAE5687C8F7BFC3 /* Pods-HEXA Dev.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Development"; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = HEXA/Hexa.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 491; + CURRENT_PROJECT_VERSION = 496; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = Y5TCB759QL; ENABLE_BITCODE = NO; @@ -1158,7 +1215,7 @@ "$(SDKROOT)/usr/lib/swift", "$(inherited)", ); - MARKETING_VERSION = 2.0.80; + MARKETING_VERSION = 2.0.90; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1177,14 +1234,14 @@ }; 6182F795250B23D7005B6ECE /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2F7BBC47285586986E0B3457 /* Pods-HEXA Dev.release.xcconfig */; + baseConfigurationReference = 8BDB9E6B365CFE2857EBA7C1 /* Pods-HEXA Dev.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Development"; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = HEXA/Hexa.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 491; + CURRENT_PROJECT_VERSION = 496; DEVELOPMENT_TEAM = Y5TCB759QL; INFOPLIST_FILE = "HEXA/HEXA.Dev-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -1192,7 +1249,7 @@ "$(SDKROOT)/usr/lib/swift", "$(inherited)", ); - MARKETING_VERSION = 2.0.80; + MARKETING_VERSION = 2.0.90; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1210,14 +1267,14 @@ }; 6182F7C0250B2742005B6ECE /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 92235FD800ABA6B3CFCEB66C /* Pods-HEXA Stage.debug.xcconfig */; + baseConfigurationReference = 3501CBAA58A753A24DA25D88 /* Pods-HEXA Stage.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Staging"; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = HEXA/Hexa.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 491; + CURRENT_PROJECT_VERSION = 496; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = Y5TCB759QL; ENABLE_BITCODE = NO; @@ -1227,7 +1284,7 @@ "$(SDKROOT)/usr/lib/swift", "$(inherited)", ); - MARKETING_VERSION = 2.0.80; + MARKETING_VERSION = 2.0.90; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1246,14 +1303,14 @@ }; 6182F7C1250B2742005B6ECE /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EE54A51947F968A5EF54D42E /* Pods-HEXA Stage.release.xcconfig */; + baseConfigurationReference = 152B23CF7F362750A3583C5C /* Pods-HEXA Stage.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Staging"; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = HEXA/Hexa.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 491; + CURRENT_PROJECT_VERSION = 496; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = Y5TCB759QL; INFOPLIST_FILE = "HEXA/HEXA.Stage-Info.plist"; @@ -1262,7 +1319,7 @@ "$(SDKROOT)/usr/lib/swift", "$(inherited)", ); - MARKETING_VERSION = 2.0.80; + MARKETING_VERSION = 2.0.90; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/ios/Podfile b/ios/Podfile index c19114aab5..5da439aff7 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -7,6 +7,7 @@ require_relative '../node_modules/react-native-unimodules/cocoapods.rb' platform :ios, '10.0' def all_pods + use_flipper!({'Flipper' => '0.140.0'}) config = use_native_modules! use_react_native!(:path => config["reactNativePath"]) use_unimodules! diff --git a/ios/Podfile.lock b/ios/Podfile.lock index bfa00a1e72..425df9b942 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2,6 +2,7 @@ PODS: - boost-for-react-native (1.63.0) - BVLinearGradient (2.5.6): - React + - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - EXConstants (9.1.1): - UMConstantsInterface @@ -102,6 +103,66 @@ PODS: - FirebaseStorage (8.15.0): - FirebaseCore (~> 8.0) - GTMSessionFetcher/Core (~> 1.5) + - Flipper (0.140.0): + - Flipper-Folly (~> 2.6) + - Flipper-Boost-iOSX (1.76.0.1.11) + - Flipper-DoubleConversion (1.1.7) + - Flipper-Fmt (7.1.7) + - Flipper-Folly (2.6.10): + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt (= 7.1.7) + - Flipper-Glog + - libevent (~> 2.1.12) + - OpenSSL-Universal (= 1.1.1100) + - Flipper-Glog (0.3.6) + - Flipper-PeerTalk (0.0.4) + - Flipper-RSocket (1.4.3): + - Flipper-Folly (~> 2.6) + - FlipperKit (0.140.0): + - FlipperKit/Core (= 0.140.0) + - FlipperKit/Core (0.140.0): + - Flipper (~> 0.140.0) + - FlipperKit/CppBridge + - FlipperKit/FBCxxFollyDynamicConvert + - FlipperKit/FBDefines + - FlipperKit/FKPortForwarding + - SocketRocket (~> 0.6.0) + - FlipperKit/CppBridge (0.140.0): + - Flipper (~> 0.140.0) + - FlipperKit/FBCxxFollyDynamicConvert (0.140.0): + - Flipper-Folly (~> 2.6) + - FlipperKit/FBDefines (0.140.0) + - FlipperKit/FKPortForwarding (0.140.0): + - CocoaAsyncSocket (~> 7.6) + - Flipper-PeerTalk (~> 0.0.4) + - FlipperKit/FlipperKitHighlightOverlay (0.140.0) + - FlipperKit/FlipperKitLayoutHelpers (0.140.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutTextSearchable + - FlipperKit/FlipperKitLayoutIOSDescriptors (0.140.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - YogaKit (~> 1.18) + - FlipperKit/FlipperKitLayoutPlugin (0.140.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - FlipperKit/FlipperKitLayoutIOSDescriptors + - FlipperKit/FlipperKitLayoutTextSearchable + - YogaKit (~> 1.18) + - FlipperKit/FlipperKitLayoutTextSearchable (0.140.0) + - FlipperKit/FlipperKitNetworkPlugin (0.140.0): + - FlipperKit/Core + - FlipperKit/FlipperKitReactPlugin (0.140.0): + - FlipperKit/Core + - FlipperKit/FlipperKitUserDefaultsPlugin (0.140.0): + - FlipperKit/Core + - FlipperKit/SKIOSNetworkPlugin (0.140.0): + - FlipperKit/Core + - FlipperKit/FlipperKitNetworkPlugin - Folly (2020.01.13.00): - boost-for-react-native - DoubleConversion @@ -161,11 +222,13 @@ PODS: - GTMSessionFetcher/Core (1.7.2) - jail-monkey (2.6.0): - React-Core + - libevent (2.1.12) - nanopb (2.30908.0): - nanopb/decode (= 2.30908.0) - nanopb/encode (= 2.30908.0) - nanopb/decode (2.30908.0) - nanopb/encode (2.30908.0) + - OpenSSL-Universal (1.1.1100) - PDFGenerator (3.1.0) - pkce-utils (0.1.0): - React-Core @@ -355,6 +418,8 @@ PODS: - React-Core - react-native-contacts (5.2.8): - React-Core + - react-native-flipper (0.158.0): + - React-Core - react-native-get-random-values (1.7.2): - React-Core - react-native-image-picker (4.7.3): @@ -377,8 +442,9 @@ PODS: - React-Core - react-native-screen-corner-radius (0.1.1): - React - - react-native-udp (2.7.0): - - React + - react-native-udp (4.1.5): + - CocoaAsyncSocket + - React-Core - react-native-video (4.4.5): - React - react-native-video/Video (= 4.4.5) @@ -507,7 +573,9 @@ PODS: - React-Core - RNVectorIcons (7.1.0): - React - - TcpSockets (3.3.2): + - SocketRocket (0.6.0) + - TcpSockets (4.0.0): + - CocoaAsyncSocket - React - UMAppLoader (1.2.0) - UMBarCodeScannerInterface (5.2.1) @@ -527,6 +595,8 @@ PODS: - UMSensorsInterface (5.2.1) - UMTaskManagerInterface (5.2.1) - Yoga (1.14.0) + - YogaKit (1.18.1): + - Yoga (~> 1.14) DEPENDENCIES: - BVLinearGradient (from `../node_modules/react-native-linear-gradient`) @@ -541,6 +611,25 @@ DEPENDENCIES: - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) - Firebase/Analytics - Firebase/Crashlytics + - Flipper (= 0.140.0) + - Flipper-DoubleConversion (= 1.1.7) + - Flipper-Folly (~> 2.2) + - Flipper-Glog (= 0.3.6) + - Flipper-PeerTalk (~> 0.0.4) + - Flipper-RSocket (~> 1.1) + - FlipperKit (= 0.140.0) + - FlipperKit/Core (= 0.140.0) + - FlipperKit/CppBridge (= 0.140.0) + - FlipperKit/FBCxxFollyDynamicConvert (= 0.140.0) + - FlipperKit/FBDefines (= 0.140.0) + - FlipperKit/FKPortForwarding (= 0.140.0) + - FlipperKit/FlipperKitHighlightOverlay (= 0.140.0) + - FlipperKit/FlipperKitLayoutPlugin (= 0.140.0) + - FlipperKit/FlipperKitLayoutTextSearchable (= 0.140.0) + - FlipperKit/FlipperKitNetworkPlugin (= 0.140.0) + - FlipperKit/FlipperKitReactPlugin (= 0.140.0) + - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.140.0) + - FlipperKit/SKIOSNetworkPlugin (= 0.140.0) - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - jail-monkey (from `../node_modules/jail-monkey`) @@ -564,6 +653,7 @@ DEPENDENCIES: - react-native-camera (from `../node_modules/react-native-camera`) - react-native-config (from `../node_modules/react-native-config`) - react-native-contacts (from `../node_modules/react-native-contacts`) + - react-native-flipper (from `../node_modules/react-native-flipper`) - react-native-get-random-values (from `../node_modules/react-native-get-random-values`) - react-native-image-picker (from `../node_modules/react-native-image-picker`) - react-native-in-app-utils (from `../node_modules/react-native-in-app-utils`) @@ -631,6 +721,7 @@ DEPENDENCIES: SPEC REPOS: trunk: - boost-for-react-native + - CocoaAsyncSocket - Firebase - FirebaseAnalytics - FirebaseCore @@ -640,15 +731,28 @@ SPEC REPOS: - FirebaseInstallations - FirebaseMessaging - FirebaseStorage + - Flipper + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt + - Flipper-Folly + - Flipper-Glog + - Flipper-PeerTalk + - Flipper-RSocket + - FlipperKit - GCDWebServer - GoogleAppMeasurement - GoogleDataTransport - GoogleUtilities - GTMSessionFetcher + - libevent - nanopb + - OpenSSL-Universal - PDFGenerator - PromisesObjC - QRCoder + - SocketRocket + - YogaKit EXTERNAL SOURCES: BVLinearGradient: @@ -709,6 +813,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-config" react-native-contacts: :path: "../node_modules/react-native-contacts" + react-native-flipper: + :path: "../node_modules/react-native-flipper" react-native-get-random-values: :path: "../node_modules/react-native-get-random-values" react-native-image-picker: @@ -839,6 +945,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872 + CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: cde416483dac037923206447da6e1454df403714 EXConstants: f907b3b6ce16e20d1750f22af1e095e924574bcb EXContacts: dbc32dd1e2798cce1beeced230da989931b47890 @@ -857,6 +964,15 @@ SPEC CHECKSUMS: FirebaseInstallations: 40bd9054049b2eae9a2c38ef1c3dd213df3605cd FirebaseMessaging: 5e5118a2383b3531e730d974680954c679ca0a13 FirebaseStorage: 8019af461599b2c3bc61c6a5dbdfa3d2de66a4d9 + Flipper: 997954148b0653aeea8664d62fc1342480f8e31e + Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c + Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 + Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b + Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 + Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 + Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 + Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 + FlipperKit: c77621ee0eaccc778a4439e120f3836ecd983234 Folly: b73c3869541e86821df3c387eb0af5f65addfab4 GCDWebServer: 2c156a56c8226e2d5c0c3f208a3621ccffbe3ce4 glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 @@ -865,7 +981,9 @@ SPEC CHECKSUMS: GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1 GTMSessionFetcher: 5595ec75acf5be50814f81e9189490412bad82ba jail-monkey: 07b83767601a373db876e939b8dbf3f5eb15f073 + libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96 + OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c PDFGenerator: 17d6bc525db0a3fcd156fbf00f9d1b8d5cc75d1e pkce-utils: 436648edb29e323ce0ad0d9043499fb90c3574ce PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb @@ -885,6 +1003,7 @@ SPEC CHECKSUMS: react-native-camera: b8cc03e2feec0c04403d0998e37cf519d8fd4c6f react-native-config: f309b9ac19456dea12325699af51e0fa0217ce6a react-native-contacts: 7b5e16196278636030c3fbbb9505543984b01697 + react-native-flipper: bbe3c862a02dab5e0f71b639855a180b699a590a react-native-get-random-values: 30b3f74ca34e30e2e480de48e4add2706a40ac8f react-native-image-picker: 4e6008ad8c2321622affa2c85432a5ebd02d480c react-native-in-app-utils: 96cdefc90ad74a79a95d19239a183995a6face0b @@ -896,7 +1015,7 @@ SPEC CHECKSUMS: react-native-randombytes: 421f1c7d48c0af8dbcd471b0324393ebf8fe7846 react-native-safe-area-context: 9e40fb181dac02619414ba1294d6c2a807056ab9 react-native-screen-corner-radius: 57b6dea3c024035bff8377618df6e5056e6c6f27 - react-native-udp: ff9d13e523f2b58e6bc5d4d32321ac60671b5dc9 + react-native-udp: 8864b1211857e9d8224ae5cbaf8580970fb99de1 react-native-video: eee541262ada11bc7ffe8ec5508e6a877937c462 react-native-view-shot: 4475fde003fe8a210053d1f98fb9e06c1d834e1c React-RCTActionSheet: 53ea72699698b0b47a6421cb1c8b4ab215a774aa @@ -933,7 +1052,8 @@ SPEC CHECKSUMS: RNShare: 7e22ba3bf66294ff7c122a1f2da8a8ec642091a0 RNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8 RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59 - TcpSockets: 14306fb79f9750ea7d2ddd02d8bed182abb01797 + SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 + TcpSockets: a8eb6b5867fe643e6cfed5db2e4de62f4d1e8fd0 UMAppLoader: 61049c8d55590b74e9ae1d5429bf68d96b4a2528 UMBarCodeScannerInterface: e5e4c87797d3d01214e25cd1618866caf5d4f17f UMCameraInterface: 415ac060034edecacdbbaa739c223e3f276e0056 @@ -948,7 +1068,8 @@ SPEC CHECKSUMS: UMSensorsInterface: cb5bf31d52c4349f0ff9e3c049bbe4df0d80d383 UMTaskManagerInterface: 80653f25c55d9e6d79d6a0a65589fa213feaee11 Yoga: 7d13633d129fd179e01b8953d38d47be90db185a + YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 5f0d9fcdc8824a21e2c22482263b7bad68ebd692 +PODFILE CHECKSUM: d175bf812d100300d85afb5366251a795c4dad1a COCOAPODS: 1.11.3 diff --git a/package.json b/package.json index 22149133a7..548f2074a2 100644 --- a/package.json +++ b/package.json @@ -149,8 +149,8 @@ "react-native-slider": "^0.11.0", "react-native-snap-carousel": "^4.0.0-beta.5", "react-native-svg": "^12.1.1", - "react-native-tcp": "^3.3.2", - "react-native-udp": "^2.7.0", + "react-native-tcp": "^4.0.0", + "react-native-udp": "^4.1.5", "react-native-unimodules": "^0.10.1", "react-native-vector-icons": "^7.0.0", "react-native-video": "^4.4.5", @@ -205,8 +205,10 @@ "jest": "^26.4.2", "jetifier": "^1.6.4", "metro-react-native-babel-preset": "^0.63.0", + "react-native-flipper": "^0.158.0", "react-native-svg-transformer": "^0.14.3", "react-test-renderer": "16.13.1", + "redux-flipper": "^2.0.2", "rn-nodeify": "github:tradle/rn-nodeify", "typescript": "^3.7.2" }, diff --git a/rnPatchFiles/TcpSockets.podspec b/rnPatchFiles/TcpSockets.podspec new file mode 100644 index 0000000000..1db1821d7d --- /dev/null +++ b/rnPatchFiles/TcpSockets.podspec @@ -0,0 +1,24 @@ +require 'json' + +package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) + +Pod::Spec.new do |s| + + s.name = 'TcpSockets' + s.version = package['version'] + s.summary = package['description'] + s.homepage = package['repository']['url'] + s.license = package['license'] + s.author = package['author'] + s.source = { :git => s.homepage, :tag => 'v#{s.version}' } + + s.requires_arc = true + s.ios.deployment_target = '8.0' + s.tvos.deployment_target = '9.0' + + s.preserve_paths = 'README.md', 'package.json', '**/*.js' + s.source_files = 'ios/**/*.{h,m}' + s.dependency 'React' + s.dependency 'CocoaAsyncSocket' + +end diff --git a/setup.sh b/setup.sh index f667ae3eef..12a264a67a 100755 --- a/setup.sh +++ b/setup.sh @@ -11,6 +11,9 @@ echo "patch cocoapods" cp ./rnPatchFiles/RNLocalize.podspec ./node_modules/react-native-localize/RNLocalize.podspec cp ./rnPatchFiles/react-native-netinfo.podspec ./node_modules/@react-native-community/netinfo/react-native-netinfo.podspec +rm -rf ./node_modules/react-native-tcp/ios/CocoaAsyncSocket/ +cp ./rnPatchFiles/TcpSockets.podspec ./node_modules/react-native-tcp/TcpSockets.podspec + # ios dependency installation cd ios && pod deintegrate && rm -f Podfile.lock && pod install diff --git a/src/assets/images/svgs/icons_close.svg b/src/assets/images/svgs/icons_close.svg new file mode 100644 index 0000000000..1078c0740d --- /dev/null +++ b/src/assets/images/svgs/icons_close.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/bitcoin/utilities/accounts/AccountOperations.ts b/src/bitcoin/utilities/accounts/AccountOperations.ts index 528c380217..3233d1715f 100644 --- a/src/bitcoin/utilities/accounts/AccountOperations.ts +++ b/src/bitcoin/utilities/accounts/AccountOperations.ts @@ -1,32 +1,36 @@ -import * as bitcoinJS from 'bitcoinjs-lib' import * as bip32 from 'bip32' -import crypto from 'crypto' -import coinselect from 'coinselect' -import coinselectSplit from 'coinselect/split' +import * as bitcoinJS from 'bitcoinjs-lib' + import { - Transaction, - TransactionPrerequisite, - InputUTXOs, - AverageTxFees, - TransactionPrerequisiteElements, Account, - TxPriority, - MultiSigAccount, - Accounts, AccountType, - DonationAccount, - ActiveAddresses, + Accounts, ActiveAddressAssignee, + ActiveAddresses, + AverageTxFees, Balances, + DerivationPurpose, + DonationAccount, Gift, - GiftType, GiftStatus, GiftThemeId, - DerivationPurpose, + GiftType, + InputUTXOs, + MultiSigAccount, + Transaction, + TransactionPrerequisite, + TransactionPrerequisiteElements, + TxPriority, } from '../Interface' + import AccountUtilities from './AccountUtilities' +import coinselect from 'coinselect' +import coinselectSplit from 'coinselect/split' import config from '../../HexaConfig' +import crypto from 'crypto' import idx from 'idx' +import wif from 'wif' + export default class AccountOperations { static getNextFreeExternalAddress = ( account: Account | MultiSigAccount, requester?: ActiveAddressAssignee ): { updatedAccount: Account | MultiSigAccount, receivingAddress: string} => { @@ -673,17 +677,13 @@ export default class AccountOperations { customTxFeePerByte: number, ): TransactionPrerequisiteElements => { const inputUTXOs = account.confirmedUTXOs - console.log( { - inputUTXOs, outputUTXOs, customTxFeePerByte - } ) + const { inputs, outputs, fee } = coinselect( inputUTXOs, outputUTXOs, customTxFeePerByte, ) - console.log( { - inputs, outputs, fee - } ) + if ( !inputs ) return { fee } @@ -1022,6 +1022,84 @@ export default class AccountOperations { } }; + static sweepPrivateKey = async ( + privateKey: string, + address:string, + recipientAddress: string, + averageTxFees: AverageTxFees, + network: bitcoinJS.networks.Network, + derivationPurpose: DerivationPurpose = DerivationPurpose.BIP84, + ): Promise<{ + txid: string; + }> => { + + console.log( 'skk1 privateKey==', privateKey ) + console.log( 'skk1 recipientAddress==', recipientAddress ) + console.log( 'skk1 averageTxFees==', averageTxFees ) + console.log( 'skk1 network==', network ) + console.log( 'skk1 derivationPurpose===', derivationPurpose ) + + const keyPair = AccountUtilities.getKeyPair( privateKey, network ) + console.log( 'skk1211 privatekey', JSON.stringify( keyPair.privateKey ) ) + console.log( 'skk1211 privatekey', wif.encode( 128, keyPair.privateKey, false ) ) + console.log( 'skk1211 privatekey', wif.encode( 128, keyPair.privateKey, true ) ) + console.log( 'skk1211 publickey', keyPair.publicKey ) + + // fetch input utxos against the address + const { confirmedUTXOs } = await AccountUtilities.fetchBalanceTransactionByAddresses( [ address ], network ) + if( confirmedUTXOs.length === 0 ) throw new Error( 'Insufficient balance to perform send' ) + const inputUTXOs: InputUTXOs[] = confirmedUTXOs + + console.log( 'skk13' ) + // prepare outputs + const outputUTXOs = [ { + address: recipientAddress + } ] + + console.log( 'skk14' ) + // perform coinselection + const defaultTxPriority = TxPriority.LOW + const defaultFeePerByte = averageTxFees[ defaultTxPriority ].feePerByte + const { inputs, outputs } = coinselectSplit( inputUTXOs, outputUTXOs, defaultFeePerByte ) + + console.log( 'skk15' ) + // build trasaction + const txb: bitcoinJS.TransactionBuilder = new bitcoinJS.TransactionBuilder( + network, + ) + + console.log( 'skk16' ) + for ( const input of inputs ) { + if( derivationPurpose === DerivationPurpose.BIP84 ){ + // native segwit + const p2wpkh = bitcoinJS.payments.p2wpkh( { + pubkey: keyPair.publicKey, + network, + } ) + txb.addInput( input.txId, input.vout, null, p2wpkh.output ) + } else txb.addInput( input.txId, input.vout, null ) + } + for ( const output of outputs ) txb.addOutput( output.address, output.value ) + + console.log( 'skk17' ) + // sign transaction + let vin = 0 + for ( const input of inputs ) { + const redeemScript = derivationPurpose === DerivationPurpose.BIP84? null: AccountUtilities.getP2SH( keyPair, network ).redeem.output + txb.sign( vin, keyPair, redeemScript, null, input.value ) // native segwit + vin++ + } + + console.log( 'skk before1 txid' ) + // broadcast transaciton + const { txid } = await AccountUtilities.broadcastTransaction( txb.build().toHex(), network ) + console.log( 'skk before2 txid', JSON.stringify( txid ) ) + + return { + txid + } + } + static generateGifts = async ( walletDetails: { walletId: string, diff --git a/src/bitcoin/utilities/accounts/AccountUtilities.ts b/src/bitcoin/utilities/accounts/AccountUtilities.ts index 67d78aee76..a48a9a832f 100644 --- a/src/bitcoin/utilities/accounts/AccountUtilities.ts +++ b/src/bitcoin/utilities/accounts/AccountUtilities.ts @@ -12,6 +12,7 @@ import Toast from '../../../components/Toast' import { SATOSHIS_IN_BTC } from '../../../common/constants/Bitcoin' import { BH_AXIOS, SIGNING_AXIOS } from '../../../services/api' import idx from 'idx' +import { generateRandomString } from '../../../common/CommonFunctions' const { REQUEST_TIMEOUT } = config @@ -62,6 +63,9 @@ export default class AccountUtilities { network: bitcoinJS.Network, purpose: DerivationPurpose = DerivationPurpose.BIP49, ): string => { + console.log( 'skk purpose', purpose ) + console.log( 'skk network', network ) + if ( purpose === DerivationPurpose.BIP44 ) { return bitcoinJS.payments.p2pkh( { pubkey: keyPair.publicKey, @@ -831,6 +835,71 @@ export default class AccountUtilities { } } + static fetchBalanceTransactionByAddresses = async ( addresses: string[], network: bitcoinJS.networks.Network ): Promise<{ + confirmedUTXOs: any[]; + unconfirmedUTXOs: any[]; + balances: { + confirmed: number; + unconfirmed: number; + }; +}> => { + const identifier = generateRandomString( 10 ) + const accountToAddressMapping= { + [ identifier ]:{ + External: addresses, + Internal: [], + Owned: [], + } + } + + let res + try{ + if ( network === bitcoinJS.networks.testnet ) { + res = await accAxios.post( + config.ESPLORA_API_ENDPOINTS.TESTNET.NEWMULTIUTXOTXN, + accountToAddressMapping, + ) + } else { + res = await accAxios.post( + config.ESPLORA_API_ENDPOINTS.MAINNET.NEWMULTIUTXOTXN, + accountToAddressMapping, + ) + } + } catch( err ){ console.log( err ) } + + const accountToResponseMapping = res.data + const { Utxos } = accountToResponseMapping[ identifier ] + const confirmedUTXOs = [] + const unconfirmedUTXOs = [] + const balances = { + confirmed: 0, unconfirmed: 0 + } + + if( Utxos ){ + for ( const addressSpecificUTXOs of Utxos ) { + for ( const utxo of addressSpecificUTXOs ) { + const { value, Address, status, vout, txid } = utxo + if( status.confirmed ){ + confirmedUTXOs.push( { + txId: txid, vout, value, address: Address, status + } ) + balances.confirmed += utxo.value + + } else { + unconfirmedUTXOs.push( { + txId: txid, vout, value, address: Address, status + } ) + balances.unconfirmed += utxo.value + } + } + } + } + + return { + confirmedUTXOs, unconfirmedUTXOs, balances + } + } + static getTxCounts = async ( addresses: string[], network: bitcoinJS.Network ) => { const txCounts = { } diff --git a/src/common/content/language/bn.json b/src/common/content/language/bn.json index 84407bce25..d4f5511ff9 100644 --- a/src/common/content/language/bn.json +++ b/src/common/content/language/bn.json @@ -113,6 +113,7 @@ "Next": "পরবর্তী", "info": "আপনার বন্ধু এবং পরিবারের পরিচিতিদের কাছে পাঠানো বার্তাগুলিতে ওয়ালেটের নাম ব্যবহার করা হয়", "Creatingyourwallet": "আপনার মানিব্যাগ তৈরি করা", + "Importingyourwallet": "আপনার মানিব্যাগ তৈরি করা", "Thismay": "এটি একটি স্বল্প সময় নিতে পারে, যখন অ্যাপ্লিকেশনটি আপনার জন্য সবকিছু সেট করে:", "Hexaencrypts": "হেক্সা অ্যাপের সমস্ত ডেটা এনক্রিপ্ট এবং সুরক্ষিত করে এবং যে কোনও যোগাযোগ যা বাইরে চলে যায়", "creatingbackup": "ক্লাউডে স্বয়ংক্রিয়ভাবে ব্যাকআপ তৈরি করা", @@ -594,7 +595,7 @@ "BackupusingPDF": "পিডিএফ ব্যবহার করে ব্যাকআপ করুন", "BackupusingPDFSub": "রিকভারি কী পিডিএফ -এ সংরক্ষিত থাকে। এটি প্রিন্ট আউট হিসাবে ডিজিটাল বা শারীরিকভাবে নিরাপদ রাখুন", "ShareRecoveryKey": "রিকভারি কী শেয়ার করুন", - "Creatingyourwallet": "আপনার মানিব্যাগ তৈরি করা", + "Creatingyourwallet": "আপনার ওয়ালেট আমদানি করা হচ্ছে", "Thismaytake": "এটি একটি স্বল্প সময় নিতে পারে, যখন অ্যাপ্লিকেশনটি আপনার জন্য সবকিছু সেট করে:", "Hexaencrypts": "হেক্সা অ্যাপের সমস্ত ডেটা এনক্রিপ্ট এবং সুরক্ষিত করে এবং যে কোনও যোগাযোগ যা বাইরে চলে যায়", "Settingupmultipleaccounts": "একাধিক অ্যাকাউন্ট সেট আপ করা", diff --git a/src/common/content/language/de.json b/src/common/content/language/de.json index 2290455bb7..00fd75c6c9 100644 --- a/src/common/content/language/de.json +++ b/src/common/content/language/de.json @@ -591,6 +591,7 @@ "BackupusingPDFSub": "Der Wiederherstellungsschlüssel wird in einem PDF gespeichert. Bewahren Sie es digital oder physisch als Ausdruck sicher auf", "ShareRecoveryKey": "Wiederherstellungsschlüssel teilen", "Creatingyourwallet": "Erstellen Sie Ihre Brieftasche", + "Importingyourwallet": "Importerer din tegnebog", "Thismaytake": "Dies kann eine kurze Zeit dauern, während die App alles für Sie einrichtet:", "Hexaencrypts": "Hexa verschlüsselt und sichert alle Daten in der App und jede ausgehende Kommunikation", "Settingupmultipleaccounts": "Mehrere Konten einrichten", diff --git a/src/common/content/language/en.json b/src/common/content/language/en.json index c5e3ddcf1a..0b5f21b7a1 100644 --- a/src/common/content/language/en.json +++ b/src/common/content/language/en.json @@ -649,6 +649,7 @@ "BackupusingPDFSub": "The Recovery Key gets stored in a PDF. Keep it safe digitally or physically as a print out", "ShareRecoveryKey": "Share Recovery Key", "Creatingyourwallet": "Creating your wallet", + "Importingyourwallet": "Importing your wallet", "Thismaytake": "This may take a short time, while the app sets it all up for you:", "Hexaencrypts": "Hexa encrypts and secures all the data on the app and any communication that goes out", "Settingupmultipleaccounts": "Setting up multiple accounts", diff --git a/src/common/content/language/es.json b/src/common/content/language/es.json index 25c5726e41..b8e238ba88 100644 --- a/src/common/content/language/es.json +++ b/src/common/content/language/es.json @@ -111,6 +111,7 @@ "Next": "próximo", "info": "El nombre de la billetera se usa en los mensajes que envía a sus contactos de amigos y familiares", "Creatingyourwallet": "Creando tu billetera", + "Importingyourwallet": "Importado de via monujo", "Thismay": "Esto puede llevar un poco de tiempo, mientras que la aplicación lo configura todo para usted:", "Hexaencrypts": "Hexa encripta y asegura todos los datos de la aplicación y cualquier comunicación que salga", "creatingbackup": "Creación automática de copias de seguridad en la nube", diff --git a/src/common/content/language/fr.json b/src/common/content/language/fr.json index 1c950b459f..237203ee31 100644 --- a/src/common/content/language/fr.json +++ b/src/common/content/language/fr.json @@ -111,6 +111,7 @@ "Next": "Suivant", "info": "Le nom du portefeuille est utilisé pour les messages que vous envoyez à vos contacts Amis & Famille", "Creatingyourwallet": "Création de votre portefeuille", + "Importingyourwallet": "Importation de votre portefeuille", "Thismay": "Cela peut prendre un peu de temps, pendant que l'application configure tout cela pour vous :", "Hexaencrypts": "Hexa chiffre et sécurise toutes les données de l'application et toute communication sortante", "creatingbackup": "Création automatique d'une sauvegarde sur le cloud", diff --git a/src/common/content/language/gu.json b/src/common/content/language/gu.json index 7ea7b339af..b7fcd9c3b8 100644 --- a/src/common/content/language/gu.json +++ b/src/common/content/language/gu.json @@ -594,6 +594,7 @@ "BackupusingPDFSub": "પુનoveryપ્રાપ્તિ કી PDF માં સંગ્રહિત થાય છે. પ્રિન્ટ આઉટ તરીકે તેને ડિજિટલ અથવા શારીરિક રીતે સુરક્ષિત રાખો", "ShareRecoveryKey": "શેર રિકવરી કી", "Creatingyourwallet": "તમારું વletલેટ બનાવવું", + "Importingyourwallet": "તમારું વૉલેટ આયાત કરી રહ્યાં છીએ", "Thismaytake": "આમાં થોડો સમય લાગી શકે છે, જ્યારે એપ્લિકેશન તમારા માટે બધું સેટ કરે છે:", "Hexaencrypts": "હેક્સા એપ્લિકેશન પરનો તમામ ડેટા એન્ક્રિપ્ટ અને સુરક્ષિત કરે છે અને કોઈપણ સંદેશાવ્યવહાર જે બહાર જાય છે", "Settingupmultipleaccounts": "બહુવિધ ખાતાઓ સુયોજિત કરી રહ્યા છે", diff --git a/src/common/content/language/hi.json b/src/common/content/language/hi.json index e71ec2796a..2fa8355721 100644 --- a/src/common/content/language/hi.json +++ b/src/common/content/language/hi.json @@ -591,6 +591,7 @@ "BackupusingPDFSub": "पुनर्प्राप्ति कुंजी एक PDF में संग्रहीत हो जाती है। प्रिंट आउट के रूप में इसे डिजिटल या भौतिक रूप से सुरक्षित रखें", "ShareRecoveryKey": "रिकवरी कुंजी साझा करें", "Creatingyourwallet": "अपना बटुआ बनाना", + "Importingyourwallet": "अपना बटुआ आयात करना", "Thismaytake": "इसमें थोड़ा समय लग सकता है, जबकि ऐप आपके लिए यह सब सेट करता है:", "Hexaencrypts": "हेक्सा ऐप के सभी डेटा और बाहर जाने वाले किसी भी संचार को एन्क्रिप्ट और सुरक्षित करता है", "Settingupmultipleaccounts": "एकाधिक खाते सेट करना", diff --git a/src/common/content/language/mr.json b/src/common/content/language/mr.json index 7a6d6cd0b6..55751bb8a1 100644 --- a/src/common/content/language/mr.json +++ b/src/common/content/language/mr.json @@ -594,6 +594,7 @@ "BackupusingPDFSub": "पुनर्प्राप्ती की PDF मध्ये साठवली जाते. प्रिंट आउट म्हणून डिजिटल किंवा शारीरिकदृष्ट्या सुरक्षित ठेवा", "ShareRecoveryKey": "पुनर्प्राप्ती की सामायिक करा", "Creatingyourwallet": "तुमचे पाकीट तयार करणे", + "Importingyourwallet": "तुमचे वॉलेट आयात करत आहे", "Thismaytake": "यास थोडा वेळ लागू शकतो, तर अॅप हे सर्व तुमच्यासाठी सेट करतो:", "Hexaencrypts": "हेक्सा अॅपवरील सर्व डेटा एन्क्रिप्ट करतो आणि सुरक्षित करतो आणि कोणताही संवाद बाहेर जातो", "Settingupmultipleaccounts": "अनेक खाती सेट करत आहे", diff --git a/src/common/content/language/pt.json b/src/common/content/language/pt.json index 1db0712c95..122f125f93 100644 --- a/src/common/content/language/pt.json +++ b/src/common/content/language/pt.json @@ -111,6 +111,7 @@ "Next": "Próximo", "info": "O nome da carteira é usado nas mensagens que você envia para seus contatos de amigos e familiares", "Creatingyourwallet": "Criando sua carteira", + "Importingyourwallet": "Importando sua carteira", "Thismay": "Isso pode demorar um pouco, enquanto o aplicativo configura tudo para você:", "Hexaencrypts": "Hexa criptografa e protege todos os dados no aplicativo e qualquer comunicação que sai", "creatingbackup": "Criação automática de backup na nuvem", diff --git a/src/common/content/language/ru.json b/src/common/content/language/ru.json index d0c9074d07..2b31a993a3 100644 --- a/src/common/content/language/ru.json +++ b/src/common/content/language/ru.json @@ -111,6 +111,7 @@ "Next": "Продолжить", "info": "Имя кошелька используется в сообщениях, которые вы отправляете своим контактам во вкладке «Друзья и семья»", "Creatingyourwallet": "Создание кошелька", + "Importingyourwallet": "Импорт вашего кошелька", "Thismay": "Это может занять некоторое время, пока приложение все настроит для вас:", "Hexaencrypts": "Hexa шифрует и защищает все данные в приложении и любую передаваемую информацию", "creatingbackup": "Автоматическое создание резервной копии в облаке", diff --git a/src/common/data/models/AccountShell.ts b/src/common/data/models/AccountShell.ts index 85fdfaeaf8..c9dff30bbc 100644 --- a/src/common/data/models/AccountShell.ts +++ b/src/common/data/models/AccountShell.ts @@ -108,9 +108,11 @@ export default class AccountShell { static getAllTransactions = ( shell: AccountShell, ): TransactionDescribing[] => { - return AccountShell + const data = AccountShell .getSubAccounts( shell ) .flatMap( subAccount => subAccount.transactions ) + console.log( 'skk data', JSON.stringify( data ) ) + return data }; static getVisibility( shell: AccountShell ): AccountVisibility { diff --git a/src/components/ClipboardAutoRead.tsx b/src/components/ClipboardAutoRead.tsx new file mode 100644 index 0000000000..658237c0bb --- /dev/null +++ b/src/components/ClipboardAutoRead.tsx @@ -0,0 +1,99 @@ +import Clipboard from "@react-native-clipboard/clipboard"; +import React, { useState, useEffect } from "react"; +import { useDispatch, useSelector } from "react-redux"; +import AccountUtilities from "../bitcoin/utilities/accounts/AccountUtilities"; +import { + Account, + AccountType, +} from "../bitcoin/utilities/Interface"; +import ModalContainer from "./home/ModalContainer"; +import useAccountByAccountShell from "../utils/hooks/state-selectors/accounts/UseAccountByAccountShell"; +import { AccountsState } from "../store/reducers/accounts"; +import NotificationInfoContents from "./NotificationInfoContents"; +import { makeAddressRecipientDescription } from "../utils/sending/RecipientFactories"; +import { addRecipientForSending, amountForRecipientUpdated, recipientSelectedForAmountSetting, sourceAccountSelectedForSending } from "../store/actions/sending"; +import { resetStackToSend } from "../navigation/actions/NavigationActions"; +import { SATOSHIS_IN_BTC } from "../common/constants/Bitcoin"; +import { Satoshis } from "../common/data/typealiases/UnitAliases"; +import { clipboardReadAction } from "../store/actions/doNotStore"; + +export type IClipboardAutoReadProps = {navigation: any}; + +const ClipboardAutoRead: React.FC = ({navigation}) => { + const [modalShow, setModalShow] = useState(false); + const [address, setAddress] = useState(""); + const didAccess = useSelector((state) => state.doNotStore.didAccess); + const accountsState: AccountsState = useSelector((state) => state.accounts); + const defaultSourceAccount = accountsState.accountShells.find( + (shell) => + shell.primarySubAccount.type == AccountType.CHECKING_ACCOUNT && + !shell.primarySubAccount.instanceNumber + ); + const account: Account = useAccountByAccountShell(defaultSourceAccount); + const network = AccountUtilities.getNetworkByType(account.networkType); + const dispatcher = useDispatch(); + + function onSend( address: string, amount: Satoshis ) { + const recipient = makeAddressRecipientDescription( { + address + } ) + + dispatcher( sourceAccountSelectedForSending( + defaultSourceAccount + ) ) + dispatcher( addRecipientForSending( recipient ) ) + dispatcher( recipientSelectedForAmountSetting( recipient ) ) + dispatcher( amountForRecipientUpdated( { + recipient, + amount: amount < 1 ? amount * SATOSHIS_IN_BTC : amount + } ) ) + + navigation.dispatch( + resetStackToSend( { + selectedRecipientID: recipient.id, + } ) + ) + } + + const checkClipboard = async () => { + const data = await Clipboard.getString(); + const isAddressValid = AccountUtilities.isValidAddress(data, network); + console.log("VALID_ADDRESS", isAddressValid); + setAddress(!didAccess && isAddressValid ? data : ""); + setModalShow(!didAccess && isAddressValid); + dispatcher(clipboardReadAction()); + }; + + useEffect(() => { + checkClipboard(); + }, []); + + return ( + setModalShow(false)} + > + onSend(address, 0)} + onPressIgnore={() => { + setModalShow(false); + }} + onPressClose={() => { + setModalShow(false); + }} + proceedButtonText={"Tranfer"} + cancelButtonText={""} + cancelButtonText1={"Close"} + isIgnoreButton={false} + note={null} + bottomSheetRef={undefined} + releaseNotes={null} + /> + + ); +}; + +export default ClipboardAutoRead; diff --git a/src/components/NotificationInfoContents.tsx b/src/components/NotificationInfoContents.tsx index 86518ebf8d..2467001992 100644 --- a/src/components/NotificationInfoContents.tsx +++ b/src/components/NotificationInfoContents.tsx @@ -210,6 +210,40 @@ export default function NotificationInfoContents( props ) { ) } + { + props.cancelButtonText1 !== '' && ( + { + props.onPressIgnore() + // if ( isOpenFromNotificationList ) props.navigation.goBack() + // else + // onClick( false, true ) + }} + style={{ + height: wp( '13%' ), + width: wp( '35%' ), + justifyContent: 'center', + alignItems: 'center', + marginLeft: 15, + }} + > + { + props.onPressIgnore() + // if ( isOpenFromNotificationList ) props.navigation.goBack() + // else + // onClick( false, true ) + }} + style={{ + ...styles.proceedButtonText, color: Colors.blue + }} + > + {props.cancelButtonText1} + + + ) + } + diff --git a/src/components/PassCodeTextBox.tsx b/src/components/PassCodeTextBox.tsx new file mode 100644 index 0000000000..de7ac3984f --- /dev/null +++ b/src/components/PassCodeTextBox.tsx @@ -0,0 +1,156 @@ +import React, { useRef, useState, Dispatch, SetStateAction, useEffect } from "react"; +import { + View, + Text, + TextInput, + TouchableOpacity, + StyleSheet, +} from "react-native"; +import Clipboard from '@react-native-clipboard/clipboard'; +import { + widthPercentageToDP as wp, +} from "react-native-responsive-screen"; +import Colors from "../common/Colors"; +import { RFValue } from "react-native-responsive-fontsize"; + +export type IPassCodeTextBoxProps = { + passcode: string; + setPasscode: Dispatch>; + setDisabled: Dispatch>; +}; + +const PassCodeTextBox: React.FC = ({passcode, setPasscode, setDisabled}) => { + const ref = useRef(); + + const [errMsg, setErrmsg] = useState(""); + + const [active, setActive] = useState(false); + + useEffect(() => { + if (passcode.length === 6) { + setErrmsg(''); + setDisabled(false); + } + }, [passcode]); + + return ( + + { + if (text.length <= 6) { + setPasscode(text); + } + }} + /> + {errMsg} + { + setTimeout(() => ref.current.focus(), 0); + setActive(true); + }} + onLongPress={async () => { + const data = await Clipboard.getString(); + if (data.length !== 6) { + setErrmsg("You are trying to copy invalid OTP"); + } else { + setPasscode(data.toUpperCase()); + } + }} + > + + + {passcode.length >= 1 ? passcode[0] : active ? "|" : ""} + + + {passcode.length >= 2 + ? passcode[1] + : active && passcode.length === 1 + ? "|" + : ""} + + + {passcode.length >= 3 + ? passcode[2] + : active && passcode.length === 2 + ? "|" + : ""} + + + {passcode.length >= 4 + ? passcode[3] + : active && passcode.length === 3 + ? "|" + : ""} + + + {passcode.length >= 5 + ? passcode[4] + : active && passcode.length === 4 + ? "|" + : ""} + + + {passcode.length >= 6 + ? passcode[5] + : active && passcode.length === 5 + ? "|" + : ""} + + + + + ); +}; + +export default PassCodeTextBox; + +const styles = StyleSheet.create({ + textBoxStyles: { + borderWidth: 0.5, + height: wp("12%"), + width: wp("12%"), + borderRadius: 7, + borderColor: Colors.borderColor, + alignItems: "center", + justifyContent: "center", + backgroundColor: Colors.white, + marginLeft: 8, + color: Colors.black, + fontSize: RFValue(20), + textAlign: "center", + textAlignVertical: 'center' + }, + textBoxActive: { + flexDirection: 'row', + borderWidth: 0.5, + height: wp("12%"), + width: wp("12%"), + borderRadius: 7, + elevation: 10, + shadowColor: Colors.borderColor, + shadowOpacity: 0.35, + shadowOffset: { + width: 0, + height: 3, + }, + borderColor: Colors.borderColor, + alignItems: "center", + justifyContent: "center", + backgroundColor: Colors.white, + marginLeft: 8, + color: Colors.black, + fontSize: RFValue(20), + textAlign: "center", + textAlignVertical: 'center' + }, +}); diff --git a/src/components/account-details/AccountDetailsTransactionsList.tsx b/src/components/account-details/AccountDetailsTransactionsList.tsx index a10acf209b..2f55cf70c2 100644 --- a/src/components/account-details/AccountDetailsTransactionsList.tsx +++ b/src/components/account-details/AccountDetailsTransactionsList.tsx @@ -54,7 +54,8 @@ const AccountDetailsTransactionsList: React.FC = ( { } return ( b.date.localeCompare( a.date ) ) : transactions.sort( ( a, b ) => b.date.localeCompare( a.date ) ).slice( 0, 3 )} + // data={ showAll ? transactions.sort( ( a, b ) => b.date.localeCompare( a.date ) ) : transactions.sort( ( a, b ) => b.date.localeCompare( a.date ) ).slice( 0, 3 )} + data={ showAll ? transactions : transactions.slice( 0, 3 )} // data={transactions} keyExtractor={keyExtractor} renderItem={renderItem} diff --git a/src/components/home/BottomInputModalContainer.tsx b/src/components/home/BottomInputModalContainer.tsx index 6d5a8e31b6..cf2856cfb2 100644 --- a/src/components/home/BottomInputModalContainer.tsx +++ b/src/components/home/BottomInputModalContainer.tsx @@ -82,6 +82,7 @@ const BottomInputModalContainer = ( { resetScrollToCoords={{ x: 0, y: 0 }} + keyboardShouldPersistTaps='always' > {showBlurView && - - + {/* */} + - {children} - - + {children} + + {/* */} diff --git a/src/components/home/home-header_update.tsx b/src/components/home/home-header_update.tsx index da8a83c445..843014bcc5 100644 --- a/src/components/home/home-header_update.tsx +++ b/src/components/home/home-header_update.tsx @@ -130,7 +130,7 @@ const HomeHeader = ( { const getMessage = () => { const { messageOne, messageTwo, isFirstMessageBold, isError, isInit } = getMessageToShow() return {navigation.navigate( 'Securiy' ), { + onPress={()=> {navigation.navigate( 'WalletBackup' ), { messageOne, messageTwo, isFirstMessageBold, isError, isInit }}} activeOpacity={0.6} diff --git a/src/components/send/RecipientAddressTextInputSection.tsx b/src/components/send/RecipientAddressTextInputSection.tsx index 2b197e009e..84270b390c 100644 --- a/src/components/send/RecipientAddressTextInputSection.tsx +++ b/src/components/send/RecipientAddressTextInputSection.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import React, { useEffect, useState } from 'react' import { View, Text, StyleSheet, TouchableOpacity } from 'react-native' import { Input } from 'react-native-elements' import FormStyles from '../../common/Styles/FormStyles' @@ -16,6 +16,7 @@ export type Props = { accountShell: AccountShell, onAddressEntered: ( address: string ) => void; onPaymentURIEntered: ( uri: string ) => void; + address: string; }; const RecipientAddressTextInputSection: React.FC = ( { @@ -25,12 +26,18 @@ const RecipientAddressTextInputSection: React.FC = ( { accountShell, onAddressEntered, onPaymentURIEntered, + address, }: Props ) => { const [ recipientAddress, setRecipientAddress ] = useState( '' ) const [ isAddressInvalid, setIsAddressInvalid ] = useState( false ) const account: Account = useAccountByAccountShell( accountShell ) const network = AccountUtilities.getNetworkByType( account.networkType ) + useEffect( ()=>{ + console.log( 'skk update didmount' ) + handleTextChange( address ) + }, [] ) + function handleTextChange( newValue: string ) { const { type: scannedAddressKind }: { type: ScannedAddressKind } = AccountUtilities.addressDiff( newValue.trim(), network ) setRecipientAddress( newValue ) diff --git a/src/components/send/SendConfirmationCurrentTotalHeader.tsx b/src/components/send/SendConfirmationCurrentTotalHeader.tsx index dc7b1e518e..f1d45abc2b 100644 --- a/src/components/send/SendConfirmationCurrentTotalHeader.tsx +++ b/src/components/send/SendConfirmationCurrentTotalHeader.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { View, Text, StyleSheet, Image } from 'react-native' +import { View, Text, StyleSheet, Image, Dimensions } from 'react-native' import Colors from '../../common/Colors' import Fonts from '../../common/Fonts' import useFormattedAmountText from '../../utils/hooks/formatting/UseFormattedAmountText' @@ -13,6 +13,8 @@ export type Props = { Unit }; +const {height} = Dimensions.get('window') + const SendConfirmationCurrentTotalHeader: React.FC = ( {Unit}: Props ) => { const totalAmount = useTotalSpendingAmount() @@ -48,7 +50,7 @@ const SendConfirmationCurrentTotalHeader: React.FC = ( {Unit}: Props ) => const styles = StyleSheet.create( { rootContainer: { paddingHorizontal: 24, - paddingVertical: heightPercentageToDP( '2.5%' ), + paddingVertical: height > 720 ? heightPercentageToDP( 2.5 ) : 0, }, headingText: { diff --git a/src/navigation/Navigator.tsx b/src/navigation/Navigator.tsx index c535d294a1..e3cd0fc522 100644 --- a/src/navigation/Navigator.tsx +++ b/src/navigation/Navigator.tsx @@ -265,7 +265,7 @@ const Bottomtab = createBottomTabNavigator( tabBarIcon: ( { focused } ) => { return ( {/* */} {focused ? diff --git a/src/navigation/stacks/Header.tsx b/src/navigation/stacks/Header.tsx index 024de179cd..31ef4fba27 100644 --- a/src/navigation/stacks/Header.tsx +++ b/src/navigation/stacks/Header.tsx @@ -126,6 +126,7 @@ import { ContactRecipientDescribing } from '../../common/data/models/interfaces/ import { makeContactRecipientDescription } from '../../utils/sending/RecipientFactories' import ContactTrustKind from '../../common/data/enums/ContactTrustKind' import Relay from '../../bitcoin/utilities/Relay' +// import ClipboardAutoRead from '../../components/ClipboardAutoRead' export const BOTTOM_SHEET_OPENING_ON_LAUNCH_DELAY: Milliseconds = 500 export enum BottomSheetState { @@ -270,6 +271,7 @@ interface HomePropsTypes { trustedContacts: Trusted_Contacts; IsCurrentLevel0: boolean; walletId: string; + // clipboardAccess: boolean; } class Home extends PureComponent { @@ -1679,6 +1681,7 @@ class Home extends PureComponent { render() { const { netBalance, notificationData, currencyCode } = this.state + const { navigation, exchangeRates, @@ -1731,6 +1734,9 @@ class Home extends PureComponent { resizeMode: 'stretch', }} > + { + // this.props.clipboardAccess && + } { approvalContactData: idx( state, ( _ ) => _.bhr.approvalContactData ), trustedContacts: idx( state, ( _ ) => _.trustedContacts.contacts ), IsCurrentLevel0: idx( state, ( _ ) => _.bhr.IsCurrentLevel0 ), - walletId: - idx( state, ( _ ) => _.storage.wallet.walletId ) + walletId: idx( state, ( _ ) => _.storage.wallet.walletId ), + // clipboardAccess: idx(state, ( _ ) => _.misc.clipboardAccess ), } } diff --git a/src/navigation/stacks/gift/GiftStack.tsx b/src/navigation/stacks/gift/GiftStack.tsx index defbf05d07..375ec18e9d 100644 --- a/src/navigation/stacks/gift/GiftStack.tsx +++ b/src/navigation/stacks/gift/GiftStack.tsx @@ -1,22 +1,22 @@ import React from 'react' -import { createStackNavigator, StackViewTransitionConfigs } from 'react-navigation-stack' -import HomeScreen from '../../../pages/Home/Home' -import FriendsAndFamilyScreen from '../../../pages/FriendsAndFamily/FriendsAndFamilyScreen' -import HomeQRScannerScreen from '../../../pages/Home/HomeQRScannerScreen' -import SmallNavHeaderCloseButton from '../../../components/navigation/SmallNavHeaderCloseButton' -import MoreOptionsStack from '../more-options/MoreOptionsStack' -import AllTransactionsStack from '../transactions/AllTransactionsStack' -import defaultStackScreenNavigationOptions from '../../options/DefaultStackScreenNavigationOptions' -import AddNewAccountStack from '../accounts/AddNewAccountStack' -import NewWyreAccountDetailsScreen from '../../../pages/Accounts/AddNew/WyreAccount/NewWyreAccountDetailsScreen' -import WyreOrderFormScreen from '../../../pages/WyreIntegration/WyreOrderFormScreen' -import NewRampAccountDetailsScreen from '../../../pages/Accounts/AddNew/RampAccount/NewRampAccountDetailsScreen' -import RampOrderFormScreen from '../../../pages/RampIntegration/RampOrderFormScreen' +import { createStackNavigator } from 'react-navigation-stack' +// import HomeScreen from '../../../pages/Home/Home' +// import FriendsAndFamilyScreen from '../../../pages/FriendsAndFamily/FriendsAndFamilyScreen' +// import HomeQRScannerScreen from '../../../pages/Home/HomeQRScannerScreen' +// import SmallNavHeaderCloseButton from '../../../components/navigation/SmallNavHeaderCloseButton' +// import MoreOptionsStack from '../more-options/MoreOptionsStack' +// import AllTransactionsStack from '../transactions/AllTransactionsStack' +// import defaultStackScreenNavigationOptions from '../../options/DefaultStackScreenNavigationOptions' +// import AddNewAccountStack from '../accounts/AddNewAccountStack' +// import NewWyreAccountDetailsScreen from '../../../pages/Accounts/AddNew/WyreAccount/NewWyreAccountDetailsScreen' +// import WyreOrderFormScreen from '../../../pages/WyreIntegration/WyreOrderFormScreen' +// import NewRampAccountDetailsScreen from '../../../pages/Accounts/AddNew/RampAccount/NewRampAccountDetailsScreen' +// import RampOrderFormScreen from '../../../pages/RampIntegration/RampOrderFormScreen' import QRStack from '../home/QRStack' -import Home from '../../../pages/Home/Home' -import TabNavigator from '../../TabNavigator' +// import Home from '../../../pages/Home/Home' +// import TabNavigator from '../../TabNavigator' import ContactDetails from '../../../pages/Contacts/ContactDetails' -import Header from '../Header' +// import Header from '../Header' import AddContactSendRequest from '../../../pages/Contacts/AddContactSendRequest' import QrAndLink from '../../../pages/NewBHR/QrAndLink' import AddContactAddressBook from '../../../pages/Contacts/AddContactAddressBook' @@ -39,16 +39,16 @@ import SetUpSatCardScreen from '../../../pages/Gift/SetUpSatCardScreen' import SetUpSatNextCardScreen from '../../../pages/Gift/SetUpSatNextCardScreen' import GiftCreatedScreen from '../../../pages/Gift/GiftCreatedScreen' import ClaimSatsScreen from '../../../pages/Gift/ClaimSatsScreen' -const strings = translations[ 'stackTitle' ] +// const strings = translations[ 'stackTitle' ] -const MODAL_ROUTES = [ - 'AllTransactions', - 'QRScanner', - 'FriendsAndFamily', - 'MoreOptions', - 'PlaceWyreOrder', - 'PlaceRampOrder' -] +// const MODAL_ROUTES = [ +// 'AllTransactions', +// 'QRScanner', +// 'FriendsAndFamily', +// 'MoreOptions', +// 'PlaceWyreOrder', +// 'PlaceRampOrder' +// ] const GiftStack = createStackNavigator( { diff --git a/src/navigation/stacks/home/HomeStack.tsx b/src/navigation/stacks/home/HomeStack.tsx index 8eea42cdf8..07e73366a8 100644 --- a/src/navigation/stacks/home/HomeStack.tsx +++ b/src/navigation/stacks/home/HomeStack.tsx @@ -64,6 +64,7 @@ import Login from '../../../pages/Login' import { translations } from '../../../common/content/LocContext' import SmallNavHeaderBackButton from '../../../components/navigation/SmallNavHeaderBackButton' import defaultStackScreenNavigationOptions from '../../options/DefaultStackScreenNavigationOptions' +import WalletBackup from '../../../pages/MoreOptions/WalletBackup' const strings = translations[ 'stackTitle' ] @@ -211,6 +212,12 @@ const HomeStack = createStackNavigator( // tabBarVisibl }, }, + WalletBackupAlert: { + screen: WalletBackup, + navigationOptions: { + header: null, + }, + }, PairNewWallet, // ManageBackupKeeper, ManageBackupNewBHR, diff --git a/src/navigation/stacks/more-options/MoreOptionsStack.tsx b/src/navigation/stacks/more-options/MoreOptionsStack.tsx index b3402f082d..a2d65a5e8a 100644 --- a/src/navigation/stacks/more-options/MoreOptionsStack.tsx +++ b/src/navigation/stacks/more-options/MoreOptionsStack.tsx @@ -28,6 +28,7 @@ import TransactionDetailsContainerScreen from '../../../pages/Accounts/Transacti import WalletBackup from '../../../pages/MoreOptions/WalletBackup' import WalletBackupStack from './WalletBackupStack' import WalletOption from '../../../pages/MoreOptions/WalletOption/WalletOption' +import EnableClipboardAutoRead from '../../../pages/EnableClipboardAutoRead' const strings = translations[ 'stackTitle' ] @@ -136,6 +137,12 @@ const MoreOptionsStack = createStackNavigator( header: null, }, }, + EnableClipboard: { + screen: EnableClipboardAutoRead, + navigationOptions: { + header: null + } + } }, { initialRouteName: 'Home', diff --git a/src/navigation/stacks/more-options/WalletBackupStack.tsx b/src/navigation/stacks/more-options/WalletBackupStack.tsx index 474bf6e8a5..cb89bf6030 100644 --- a/src/navigation/stacks/more-options/WalletBackupStack.tsx +++ b/src/navigation/stacks/more-options/WalletBackupStack.tsx @@ -14,6 +14,13 @@ import BackupSeedWordsContent from '../../../pages/NewBHR/BackupSeedWordsContent import RestoreSeedWordsContent from '../../../pages/RestoreHexaWithKeeper/RestoreSeedWordsContent' import SecurityQuestionHistoryNewBHR from '../../../pages/NewBHR/SecurityQuestionHistory' import SetNewPassword from '../../../pages/NewBHR/SetNewPassword' +import AccountSendContainerScreen from '../../../pages/Accounts/Send/AccountSendContainerScreen' +import TwoFASetup from '../../../pages/Accounts/TwoFASetup' +import TwoFAValidation from '../../../pages/Accounts/TwoFAValidation' +import AccountDetailsStack from '../accounts/AccountDetailsStack' +import SentAmountForContactFormScreen from '../../../pages/Accounts/Send/SentAmountForContactFormScreen' +import AccountSendConfirmationContainerScreen from '../../../pages/Accounts/Send/AccountSendConfirmationContainerScreen' +import OTPAuthenticationScreen from '../../../pages/Accounts/Send/OTPAuthentication' const strings = translations[ 'stackTitle' ] @@ -55,6 +62,43 @@ const WalletBackupStack = createStackNavigator( }, PersonalCopyHistoryNewBHR, SecurityQuestionHistoryNewBHR, + AccountSend: { + screen: AccountSendContainerScreen, + }, + TwoFAValidation, + TwoFASetup: { + screen: TwoFASetup, + navigationOptions: { + gesturesEnabled: false, + header: null + }, + }, + AccountDetails: { + screen: AccountDetailsStack, + navigationOptions: { + header: null, + // tabBarVisibl + }, + }, + SentAmountForContactForm: { + screen: SentAmountForContactFormScreen, + navigationOptions: { + title: 'Send To' + }, + }, + SendConfirmation: { + screen: AccountSendConfirmationContainerScreen, + navigationOptions: { + title: 'Send Confirmation', + + }, + }, + OTPAuthentication: { + screen: OTPAuthenticationScreen, + navigationOptions: { + header: null, + }, + } }, { defaultNavigationOptions: ( { navigation } ) => { diff --git a/src/pages/Accounts/Receive.tsx b/src/pages/Accounts/Receive.tsx index 9411705760..cace2715e5 100644 --- a/src/pages/Accounts/Receive.tsx +++ b/src/pages/Accounts/Receive.tsx @@ -47,18 +47,20 @@ import idx from 'idx' import TwoFASetupWarningModal from './TwoFASetupWarningModal' import DeviceInfo from 'react-native-device-info' import AccountShell from '../../common/data/models/AccountShell' -import { Account, AccountType } from '../../bitcoin/utilities/Interface' +import { Account, AccountType, LevelData } from '../../bitcoin/utilities/Interface' import AccountUtilities from '../../bitcoin/utilities/accounts/AccountUtilities' import useAccountByAccountShell from '../../utils/hooks/state-selectors/accounts/UseAccountByAccountShell' import ModalContainer from '../../components/home/ModalContainer' import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view' import { getNextFreeAddress } from '../../store/sagas/accounts' import { translations } from '../../common/content/LocContext' +import ErrorModalContents from '../../components/ErrorModalContents' export default function Receive( props ) { const dispatch = useDispatch() const [ receiveHelper, showReceiveHelper ] = useState( false ) const [ receiveModal, setReceiveModal ] = useState( false ) + const [ backupReminder, setBackupReminder ] = useState( false ) const [ isReceiveHelperDone, setIsReceiveHelperDone ] = useState( true ) const isReceiveHelperDoneValue = useSelector( ( state ) => idx( state, ( _ ) => _.preferences.isReceiveHelperDoneValue ), @@ -74,6 +76,7 @@ export default function Receive( props ) { const account: Account = useAccountByAccountShell( accountShell ) const [ receivingAddress, setReceivingAddress ] = useState( null ) const [ paymentURI, setPaymentURI ] = useState( null ) + const levelData: LevelData[] = useSelector( ( state ) => state.bhr.levelData ) const { present: presentBottomSheet, @@ -127,6 +130,12 @@ export default function Receive( props ) { //await AsyncStorage.setItem('savingsWarning', 'true'); } } + + if( levelData[ 0 ].keeper1.status === 'notSetup' ){ + setTimeout( () => { + setBackupReminder( true ) + }, 500 ) + } //})(); }, [] ) @@ -326,6 +335,29 @@ export default function Receive( props ) { /> )} /> + setBackupReminder( false )} visible={backupReminder} closeBottomSheet={() => setBackupReminder( false )}> + { + setBackupReminder( false ) + props.navigation.navigate( 'WalletBackupAlert' ) + }} + onPressIgnore={() => setTimeout( () => { setBackupReminder( false ) }, 500 )} + proceedButtonText={'Backup now'} + cancelButtonText={'Later'} + isIgnoreButton={true} + isBottomImage={false} + isBottomImageStyle={{ + width: wp( '35%' ), + height: wp( '27%' ), + marginLeft: 'auto', + resizeMode: 'stretch', + marginBottom: hp( '-3%' ), + }} + /> + ) } diff --git a/src/pages/Accounts/Send/AccountSendConfirmationContainerScreen.tsx b/src/pages/Accounts/Send/AccountSendConfirmationContainerScreen.tsx index b4c71168df..f0e58d716a 100644 --- a/src/pages/Accounts/Send/AccountSendConfirmationContainerScreen.tsx +++ b/src/pages/Accounts/Send/AccountSendConfirmationContainerScreen.tsx @@ -1,5 +1,5 @@ import React, { useMemo, useState, useCallback, useEffect } from 'react' -import { View, Text, StyleSheet, TouchableOpacity, TextInput, Platform } from 'react-native' +import { View, Text, StyleSheet, TouchableOpacity, TextInput, Platform, Dimensions } from 'react-native' import { RFValue } from 'react-native-responsive-fontsize' import Colors from '../../../common/Colors' import Fonts from '../../../common/Fonts' @@ -46,6 +46,8 @@ export type Props = { navigation: NavigationProp; }; +const {height} = Dimensions.get('window') + const AccountSendConfirmationContainerScreen: React.FC = ( { navigation }: Props ) => { const dispatch = useDispatch() const strings = translations[ 'accounts' ] @@ -71,6 +73,7 @@ const AccountSendConfirmationContainerScreen: React.FC = ( { navigation } const [ note, setNote ] = useState( '' ) const [ transactionPriority, setTransactionPriority ] = useState( TxPriority.LOW ) const formattedAvailableBalanceAmountText = useFormattedAmountText( availableBalance ) + const fromWallet = navigation?.getParam( 'fromWallet' ) || false const sourceAccountHeadlineText = useMemo( () => { const title = sourcePrimarySubAccount.customDisplayName || sourcePrimarySubAccount.defaultTitle @@ -158,7 +161,8 @@ const AccountSendConfirmationContainerScreen: React.FC = ( { navigation } if( sourceAccountShell.primarySubAccount.isTFAEnabled && !( account as MultiSigAccount ).xprivs?.secondary ) navigation.navigate( 'OTPAuthentication', { txnPriority: transactionPriority, - note + note, + fromWallet } ) else { setHandleButton( false ) @@ -240,8 +244,8 @@ const AccountSendConfirmationContainerScreen: React.FC = ( { navigation } justifyContent: 'center', alignItems: 'center', paddingHorizontal: 24, - marginBottom: heightPercentageToDP( '1%' ), - marginTop: heightPercentageToDP( '2%' ) + marginBottom: height > 720 ? heightPercentageToDP( '1%' ) : 0, + marginTop: height > 720 ? heightPercentageToDP( '2%' ) : 5 }}> 720 ? 10 : 5, borderColor: Colors.white, backgroundColor: Colors.bgColor, width: widthPercentageToDP( 90 ) @@ -371,13 +375,13 @@ const styles = StyleSheet.create( { }, modalInputBox: { flex: 1, - height: 50, + height: height > 720 ? 50 : 40, fontSize: RFValue( 13 ), color: Colors.textColorGrey, fontFamily: Fonts.FiraSansRegular, paddingLeft: 15, width: '90%', - paddingTop:17 + paddingTop: height > 720 ? 17 : 0 }, modalInfoText: { width: widthPercentageToDP( 90 ), @@ -387,14 +391,14 @@ const styles = StyleSheet.create( { textAlign: 'justify', lineHeight: 18, marginLeft: widthPercentageToDP( 5 ), - paddingVertical: heightPercentageToDP( 1 ) + paddingVertical: height > 720 ? heightPercentageToDP( 1 ) : 5 }, rootContainer: { flex: 1, }, headerSection: { - paddingVertical: heightPercentageToDP( '1%' ), + paddingVertical: height > 720 ? heightPercentageToDP( '1%' ) : 0, }, footerSection: { diff --git a/src/pages/Accounts/Send/AccountSendContainerScreen.tsx b/src/pages/Accounts/Send/AccountSendContainerScreen.tsx index 62f22adf2a..199a520de4 100644 --- a/src/pages/Accounts/Send/AccountSendContainerScreen.tsx +++ b/src/pages/Accounts/Send/AccountSendContainerScreen.tsx @@ -51,6 +51,8 @@ const AccountSendContainerScreen: React.FC = ( { navigation }: Props ) => const primarySubAccount = usePrimarySubAccountForShell( accountShell ) const sendableAccountShells = useSendableAccountShells( accountShell ) const sendableContacts = useSendableTrustedContactRecipients() + const fromWallet = navigation?.getParam( 'fromWallet' ) || false + const address = navigation?.getParam( 'address' ) || '' const accountsState = useAccountsState() const sendingState = useSendingState() @@ -86,6 +88,7 @@ const AccountSendContainerScreen: React.FC = ( { navigation }: Props ) => function navigateToSendDetails( selectedRecipient: RecipientDescribing ) { navigation.navigate( 'SentAmountForContactForm', { selectedRecipientID: selectedRecipient.id, + fromWallet: fromWallet } ) } @@ -225,6 +228,8 @@ const AccountSendContainerScreen: React.FC = ( { navigation }: Props ) => if ( twoFASetupDetails && !twoFAValid ) navigation.navigate( 'TwoFASetup', { twoFASetup: twoFASetupDetails, + fromWallet: fromWallet, + address } ) } }, [ primarySubAccount.sourceKind ] ) @@ -232,6 +237,7 @@ const AccountSendContainerScreen: React.FC = ( { navigation }: Props ) => return ( void; onPaymentURIEntered: ( uri: string ) => void; onRecipientSelected: ( recipient: RecipientDescribing ) => void; + address: string; }; export enum SectionKind { @@ -44,6 +45,7 @@ const AccountSendScreen: React.FC = ( { onAddressSubmitted, onPaymentURIEntered, onRecipientSelected, + address, }: Props ) => { const selectedRecipients = useSelectedRecipientsForSending() const common = translations[ 'common' ] @@ -103,6 +105,7 @@ const AccountSendScreen: React.FC = ( { width: widthPercentageToDP( 95 ), alignSelf: 'center' }} + address={address} placeholder={strings.Enteraddressmanually} accountShell={accountShell} onAddressEntered={onAddressSubmitted} diff --git a/src/pages/Accounts/Send/BalanceEntryFormGroup.tsx b/src/pages/Accounts/Send/BalanceEntryFormGroup.tsx index 8d404e42d2..88b7616b1d 100644 --- a/src/pages/Accounts/Send/BalanceEntryFormGroup.tsx +++ b/src/pages/Accounts/Send/BalanceEntryFormGroup.tsx @@ -33,7 +33,8 @@ export type Props = { spendableBalance: Satoshis; onAmountChanged: ( amount: Satoshis ) => void; onSendMaxPressed: ( ) => void; - showSendMax: boolean + showSendMax: boolean; + fromWallet: boolean; }; @@ -44,6 +45,7 @@ const BalanceEntryFormGroup: React.FC = ( { onAmountChanged, onSendMaxPressed, showSendMax= true, + fromWallet=false, }: Props ) => { const exchangeRates = useExchangeRates() const currencyCode = useCurrencyCode() @@ -109,6 +111,12 @@ const BalanceEntryFormGroup: React.FC = ( { } } + useEffect( ()=>{ + if( fromWallet ){ + handleSendMaxPress() + } + }, [] ) + useEffect( ()=>{ if( isSendingMax && sendMaxFee ){ const sendMaxAmount = remainingSpendableBalance @@ -248,7 +256,7 @@ const BalanceEntryFormGroup: React.FC = ( { borderBottomColor: 'transparent', }} inputStyle={styles.textInputContent} - editable={currencyKindForEntry == CurrencyKind.BITCOIN} + editable={!fromWallet && currencyKindForEntry == CurrencyKind.BITCOIN} placeholder={ currencyKindForEntry == CurrencyKind.BITCOIN ? subAccountKind == SubAccountKind.TEST_ACCOUNT diff --git a/src/pages/Accounts/Send/OTPAuthentication.tsx b/src/pages/Accounts/Send/OTPAuthentication.tsx index 80d4050053..9f014a93a4 100644 --- a/src/pages/Accounts/Send/OTPAuthentication.tsx +++ b/src/pages/Accounts/Send/OTPAuthentication.tsx @@ -33,6 +33,7 @@ import LoaderModal from '../../../components/LoaderModal' export default function OTPAuthenticationScreen( { navigation } ) { + const fromWallet = navigation?.getParam( 'fromWallet' ) || false const txnPriority = navigation.getParam( 'txnPriority' ) const note = navigation.getParam( 'note' ) const [ Elevation, setElevation ] = useState( 10 ) @@ -76,6 +77,7 @@ export default function OTPAuthenticationScreen( { navigation } ) { infoText={'bitcoin successfully sent to Contact'} isFromContact={false} recipients={sendingState.selectedRecipients} + // okButtonText={fromWallet ? 'Back to Wallet' : 'View Account'} okButtonText={'View Account'} cancelButtonText={'Back'} isCancel={false} @@ -84,11 +86,15 @@ export default function OTPAuthenticationScreen( { navigation } ) { // dispatch( resetSendState() ) // need to delay reset as other background sagas read from the send state dispatch( refreshAccountShells( [ sourceAccountShell ], { } ) ) + // if( fromWallet ){ + // navigation.navigate( 'WalletBackup' ) + // } else { navigation.dispatch( resetStackToAccountDetails( { accountShellID: sourceAccountShell.id, } ) ) + // } }} onPressCancel={dismissBottomSheet} isSuccess={true} @@ -115,12 +121,15 @@ export default function OTPAuthenticationScreen( { navigation } ) { onPressOk={dismissBottomSheet} onPressCancel={() => { dismissBottomSheet() - - navigation.dispatch( - resetStackToAccountDetails( { - accountShellID: sourceAccountShell.id, - } ) - ) + if( fromWallet ) { + navigation.navigate( 'WalletBackup' ) + } else { + navigation.dispatch( + resetStackToAccountDetails( { + accountShellID: sourceAccountShell.id, + } ) + ) + } }} isUnSuccess={true} accountKind={sourcePrimarySubAccount.kind} diff --git a/src/pages/Accounts/Send/SelectedRecipientsCarousel.tsx b/src/pages/Accounts/Send/SelectedRecipientsCarousel.tsx index d764990de4..001a596b78 100644 --- a/src/pages/Accounts/Send/SelectedRecipientsCarousel.tsx +++ b/src/pages/Accounts/Send/SelectedRecipientsCarousel.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from 'react' -import { StyleSheet, FlatList } from 'react-native' +import { StyleSheet, FlatList, Dimensions } from 'react-native' import { TEST_ACCOUNT } from '../../../common/constants/wallet-service-types' import CurrencyKind from '../../../common/data/enums/CurrencyKind' import SubAccountKind from '../../../common/data/enums/SubAccountKind' @@ -7,6 +7,8 @@ import { RecipientDescribing } from '../../../common/data/models/interfaces/Reci import SelectedRecipientCarouselItem from '../../../components/send/SelectedRecipientCarouselItem' import useCurrencyKind from '../../../utils/hooks/state-selectors/UseCurrencyKind' +const {height} = Dimensions.get('window') + export type Props = { recipients: RecipientDescribing[]; subAccountKind: SubAccountKind; @@ -61,7 +63,7 @@ const SelectedRecipientsCarousel: React.FC = ( { const styles = StyleSheet.create( { listContentContainer: { - paddingVertical: 24, + paddingVertical: height > 720 ? 24 : 5, } } ) diff --git a/src/pages/Accounts/Send/SentAmountForContactFormScreen.tsx b/src/pages/Accounts/Send/SentAmountForContactFormScreen.tsx index 3a52db2085..d1527dd185 100644 --- a/src/pages/Accounts/Send/SentAmountForContactFormScreen.tsx +++ b/src/pages/Accounts/Send/SentAmountForContactFormScreen.tsx @@ -71,6 +71,7 @@ const SentAmountForContactFormScreen: React.FC = ( { navigation }: Props const availableBalance = useMemo( () => { return AccountShell.getSpendableBalance( sourceAccountShell ) }, [ sourceAccountShell ] ) + const fromWallet = navigation?.getParam( 'fromWallet' ) || false const formattedAvailableBalanceAmountText = useFormattedAmountText( availableBalance ) @@ -171,7 +172,9 @@ const SentAmountForContactFormScreen: React.FC = ( { navigation }: Props useAccountSendST1CompletionEffect( { onSuccess: () => { console.log( 'skk inside use account success' ) - navigation.navigate( 'SendConfirmation' ) + navigation.navigate( 'SendConfirmation', { + fromWallet + } ) }, onFailure: ( error ) => { console.log( 'skk inside use account' ) @@ -185,7 +188,9 @@ const SentAmountForContactFormScreen: React.FC = ( { navigation }: Props useEffect( ()=> { if ( sendingState.feeIntelMissing ) { // missing fee intel: custom fee-fallback - navigation.navigate( 'SendConfirmation' ) + navigation.navigate( 'SendConfirmation', { + fromWallet + } ) } }, [ sendingState.feeIntelMissing ] ) @@ -234,6 +239,7 @@ const SentAmountForContactFormScreen: React.FC = ( { navigation }: Props setSelectedAmount( amount ) }} onSendMaxPressed={handleSendMaxPress} + fromWallet={fromWallet} /> diff --git a/src/pages/Accounts/TwoFASetup.tsx b/src/pages/Accounts/TwoFASetup.tsx index 961073374c..b7dd9b458a 100644 --- a/src/pages/Accounts/TwoFASetup.tsx +++ b/src/pages/Accounts/TwoFASetup.tsx @@ -24,6 +24,8 @@ const TwoFASetup = props => { const twoFASetup = props.navigation.getParam( 'twoFASetup' ) // const [ twoFAValidationModal, showTwoFAValidationModal ] = useState( false ) const { twoFAKey } = twoFASetup + const fromWallet = props.navigation?.getParam( 'fromWallet' ) || false + const address = props.navigation?.getParam( 'address' ) || null return ( { { - props.navigation.navigate( 'TwoFAValidation' ) + props.navigation.navigate( 'TwoFAValidation', { + fromWallet:fromWallet, + address + } ) // showTwoFAValidationModal( true ) } } diff --git a/src/pages/Accounts/TwoFAValidation.tsx b/src/pages/Accounts/TwoFAValidation.tsx index 2f7339d9e9..1110b4eab2 100644 --- a/src/pages/Accounts/TwoFAValidation.tsx +++ b/src/pages/Accounts/TwoFAValidation.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState, } from 'react' +import React, { useCallback, useEffect, useState, } from 'react' import { View, TouchableOpacity, @@ -26,6 +26,10 @@ import SendConfirmationContent from './SendConfirmationContent' import DeviceInfo from 'react-native-device-info' import { validateTwoFA } from '../../store/actions/accounts' import ModalContainer from '../../components/home/ModalContainer' +import { makeAddressRecipientDescription } from '../../utils/sending/RecipientFactories' +import useSendingState from '../../utils/hooks/state-selectors/sending/UseSendingState' +import { RecipientDescribing } from '../../common/data/models/interfaces/RecipientDescribing' +import { addRecipientForSending, recipientSelectedForAmountSetting } from '../../store/actions/sending' export default function TwoFAValidation( props ) { const [ Elevation, setElevation ] = useState( 10 ) @@ -38,19 +42,55 @@ export default function TwoFAValidation( props ) { const [ isConfirmDisabled, setIsConfirmDisabled ] = useState( true ) const twoFAHelpFlags = useSelector( ( state ) => state.accounts.twoFAHelpFlags ) + const fromWallet = props.navigation?.getParam( 'fromWallet' ) || false + const address = props.navigation?.getParam( 'address' ) || null + + const sendingState = useSendingState() + + const isRecipientSelectedForSending = useCallback( ( recipient: RecipientDescribing ) => { + return ( + sendingState + .selectedRecipients + .some( r => r.id == recipient.id ) + ) + }, [ sendingState ] ) useEffect( ()=>{ if ( token && twoFAHelpFlags ) { const validationSucccessful = twoFAHelpFlags.twoFAValid if( validationSucccessful ){ - props.navigation.navigate( 'AccountDetails' ) - } else if( validationSucccessful === false ) { + if( fromWallet ){ + const addressRecipient = makeAddressRecipientDescription( { + address + } ) + if ( isRecipientSelectedForSending( addressRecipient ) == false ) { + handleRecipientSelection( addressRecipient ) + } + } else props.navigation.navigate( 'AccountDetails' ) + }else if( validationSucccessful === false ) { // SendUnSuccessBottomSheet.current.snapTo( 1 ) setUnsuccessModal( true ) } } }, [ twoFAHelpFlags ] ) + function handleRecipientSelection( recipient: RecipientDescribing ) { + if ( isRecipientSelectedForSending( recipient ) == false ) { + dispatch( addRecipientForSending( recipient ) ) + } + + dispatch( recipientSelectedForAmountSetting( recipient ) ) + navigateToSendDetails( recipient ) + } + + function navigateToSendDetails( selectedRecipient: RecipientDescribing ) { + console.log( 'skk fromWallet', fromWallet ) + props.navigation.navigate( 'SentAmountForContactForm', { + selectedRecipientID: selectedRecipient.id, + fromWallet: fromWallet + } ) + } + function onPressNumber( text ) { const tmpToken = [ ...tokenArray ] diff --git a/src/pages/Contacts/TrustedContactRequest.tsx b/src/pages/Contacts/TrustedContactRequest.tsx index 70283b95d4..064575218e 100644 --- a/src/pages/Contacts/TrustedContactRequest.tsx +++ b/src/pages/Contacts/TrustedContactRequest.tsx @@ -20,6 +20,7 @@ import { import { AppBottomSheetTouchableWrapper } from '../../components/AppBottomSheetTouchableWrapper' import { ScrollView } from 'react-native-gesture-handler' import { DeepLinkEncryptionType } from '../../bitcoin/utilities/Interface' +import PassCodeTextBox from '../../components/PassCodeTextBox' export default function TrustedContactRequest( props ) { const [ WrongInputError, setWrongInputError ] = useState( '' ) @@ -155,106 +156,107 @@ export default function TrustedContactRequest( props ) { ) } else if ( props.inputType === DeepLinkEncryptionType.OTP ){ return ( - - {[ 0, 1, 2, 3, 4, 5 ].map( ( i ) => { - return ( - { - if ( i == 0 ) this.textInput = input - if ( i == 1 ) this.textInput2 = input - if ( i == 2 ) this.textInput3 = input - if ( i == 3 ) this.textInput4 = input - if ( i == 4 ) this.textInput5 = input - if ( i == 5 ) this.textInput6 = input - }} - style={getStyle( i )} - onChangeText={( value ) => { - if ( value && i == 0 ) { - onPressNumber( value, 0 ) - this.textInput2.focus() - } - if ( value && i == 1 ) { - onPressNumber( value, 1 ) - this.textInput3.focus() - } - if ( value && i == 2 ) { - onPressNumber( value, 2 ) - this.textInput4.focus() - } - if ( value && i == 3 ) { - onPressNumber( value, 3 ) - this.textInput5.focus() - } - if ( value && i == 4 ) { - onPressNumber( value, 4 ) - this.textInput6.focus() - } - if ( value && i == 5 ) { - onPressNumber( value, 5 ) - this.textInput6.focus() + + // + // {[ 0, 1, 2, 3, 4, 5 ].map( ( i ) => { + // return ( + // { + // if ( i == 0 ) this.textInput = input + // if ( i == 1 ) this.textInput2 = input + // if ( i == 2 ) this.textInput3 = input + // if ( i == 3 ) this.textInput4 = input + // if ( i == 4 ) this.textInput5 = input + // if ( i == 5 ) this.textInput6 = input + // }} + // style={getStyle( i )} + // onChangeText={( value ) => { + // if ( value && i == 0 ) { + // onPressNumber( value, 0 ) + // this.textInput2.focus() + // } + // if ( value && i == 1 ) { + // onPressNumber( value, 1 ) + // this.textInput3.focus() + // } + // if ( value && i == 2 ) { + // onPressNumber( value, 2 ) + // this.textInput4.focus() + // } + // if ( value && i == 3 ) { + // onPressNumber( value, 3 ) + // this.textInput5.focus() + // } + // if ( value && i == 4 ) { + // onPressNumber( value, 4 ) + // this.textInput6.focus() + // } + // if ( value && i == 5 ) { + // onPressNumber( value, 5 ) + // this.textInput6.focus() - } - }} - onKeyPress={( e ) => { - if ( e.nativeEvent.key === 'Backspace' && i == 0 ) { - this.textInput.focus() - onPressNumber( '', 0 ) - } - if ( e.nativeEvent.key === 'Backspace' && i == 1 ) { - this.textInput.focus() - onPressNumber( '', 1 ) - } - if ( e.nativeEvent.key === 'Backspace' && i == 2 ) { - this.textInput2.focus() - onPressNumber( '', 2 ) - } - if ( e.nativeEvent.key === 'Backspace' && i == 3 ) { - this.textInput3.focus() - onPressNumber( '', 3 ) - } - if ( e.nativeEvent.key === 'Backspace' && i == 4 ) { - this.textInput4.focus() - onPressNumber( '', 4 ) - } - if ( e.nativeEvent.key === 'Backspace' && i == 5 ) { - this.textInput5.focus() - onPressNumber( '', 5 ) - } - }} - onFocus={() => { - // if ( Platform.OS == 'ios' ) { - props.bottomSheetRef.current?.expand() - setIsDisabled( true ) - // } - }} - onBlur={() => { - // if ( Platform.OS == 'ios' ) { - if ( - ( passcodeArray.length == 0 || - passcodeArray.length == 6 ) && - i == 5 - ) { - props.bottomSheetRef.current?.snapTo( 1 ) - setIsDisabled( false ) - } - // } - }} - autoCorrect={false} - autoCompleteType="off" - //value={passcodeArray[i] && passcodeArray[i].length ? passcodeArray[i] : ""} - /> - ) - } )} - + // } + // }} + // onKeyPress={( e ) => { + // if ( e.nativeEvent.key === 'Backspace' && i == 0 ) { + // this.textInput.focus() + // onPressNumber( '', 0 ) + // } + // if ( e.nativeEvent.key === 'Backspace' && i == 1 ) { + // this.textInput.focus() + // onPressNumber( '', 1 ) + // } + // if ( e.nativeEvent.key === 'Backspace' && i == 2 ) { + // this.textInput2.focus() + // onPressNumber( '', 2 ) + // } + // if ( e.nativeEvent.key === 'Backspace' && i == 3 ) { + // this.textInput3.focus() + // onPressNumber( '', 3 ) + // } + // if ( e.nativeEvent.key === 'Backspace' && i == 4 ) { + // this.textInput4.focus() + // onPressNumber( '', 4 ) + // } + // if ( e.nativeEvent.key === 'Backspace' && i == 5 ) { + // this.textInput5.focus() + // onPressNumber( '', 5 ) + // } + // }} + // onFocus={() => { + // // if ( Platform.OS == 'ios' ) { + // props.bottomSheetRef.current?.expand() + // setIsDisabled( true ) + // // } + // }} + // onBlur={() => { + // // if ( Platform.OS == 'ios' ) { + // if ( + // ( passcodeArray.length == 0 || + // passcodeArray.length == 6 ) && + // i == 5 + // ) { + // props.bottomSheetRef.current?.snapTo( 1 ) + // setIsDisabled( false ) + // } + // // } + // }} + // autoCorrect={false} + // autoCompleteType="off" + // //value={passcodeArray[i] && passcodeArray[i].length ? passcodeArray[i] : ""} + // /> + // ) + // } )} + // ) } } diff --git a/src/pages/EnableClipboardAutoRead.tsx b/src/pages/EnableClipboardAutoRead.tsx new file mode 100644 index 0000000000..fd88a94052 --- /dev/null +++ b/src/pages/EnableClipboardAutoRead.tsx @@ -0,0 +1,101 @@ +import React, { useEffect } from "react"; +import { + SafeAreaView, + StatusBar, + StyleSheet, + TouchableOpacity, + View, +} from "react-native"; +import { Button } from "react-native-elements"; +import FontAwesome from "react-native-vector-icons/FontAwesome"; +import CommonStyles from "../common/Styles/Styles"; +import Colors from "../common/Colors"; +import ButtonStyles from "../common/Styles/ButtonStyles"; +import HeaderTitle from "../components/HeaderTitle"; +import { widthPercentageToDP } from "react-native-responsive-screen"; +import { useDispatch, useSelector } from "react-redux"; +import { toggleClipboardAccess } from "../store/actions/misc"; + +const EnableClipboardAutoRead = (props) => { + const dispatcher = useDispatch(); + + const enabled = useSelector((state) => state.misc.clipboardAccess); + + useEffect(() => { + console.log(enabled); + }, [enabled]); + + const changePermission = () => { + dispatcher(toggleClipboardAccess()); + }; + + return ( + + + + { + props.navigation.goBack(); + }} + > + + + + + + + + - - ): null} - - - - ) - } + // const closeBottomSheet = () => { + // setDebugModalVisible( false ) + // } + + // const getWalletDebugData = ( wallet: Wallet ) => { + // delete wallet.security + // // delete wallet.primaryMnemonic + // // delete wallet.primarySeed + // // delete wallet.secondaryXpub + // // delete wallet.details2FA + // delete wallet.smShare + + // return + // + // Wallet Info + // + + // {Object.keys( wallet ).map( key => { + // return ( + // <> + // {key.toUpperCase()} + // {JSON.stringify( wallet[ key ], null, 8 )} + // + // ) + // } )} + + + // + // } + + // const getAccountDebugData = ( shell: AccountShell, index: number ) => { + // const primarySubAcc = shell.primarySubAccount + // const account: Account = accounts[ primarySubAcc.id ] + + // const debugPrimarySub: SubAccountDescribing = { + // ...primarySubAcc, + // } + // // drop unnecessary properties + // delete debugPrimarySub.transactions + // delete debugPrimarySub.utxoCompatibilityGroup + // delete debugPrimarySub.hasNewTxn + + // const debugAccount: Account = { + // ...account, + // } + // // drop unnecessary and private properties + // delete debugAccount.transactions + // delete debugAccount.xpriv + // delete ( debugAccount as MultiSigAccount ).xprivs + // delete debugAccount.txIdMap + // delete debugAccount.hasNewTxn + // delete debugAccount.transactionsNote + // delete debugAccount.activeAddresses + + // return ( + // + // + // Account Shell {index + 1} + // + // {debugPrimarySub.id} + // {JSON.stringify( debugPrimarySub, null, 8 )} + // + // Account + // + // {debugAccount.id} + // {JSON.stringify( debugAccount, null, 8 )} + // + // ) + // } + + // const RenderDebugModal = () => { + // const [ debugModalTaps, setDebugModalTaps ] = useState( 0 ) + // const [ debugSweepAddress, setDebugSweepAddress ] = useState( '' ) + // const [ debugSweepToken, setDebugSweepToken ] = useState( '' ) + + // return ( + // + // + // + // + // + // setDebugModalTaps( prev => prev+1 )}> + // {getWalletDebugData( { + // ...wallet + // } )} + // {accountShells.map( ( shell: AccountShell, index ) => { + // return getAccountDebugData( shell, index ) + // } )} + // + + // { debugModalTaps > 4? + // ( + // <> + // {Object.keys( synchedDebugMissingAccounts ).length? ( + // <> + // { + // setDebugSweepAddress( text ) + // }} + // /> + + // { + // setDebugSweepToken( text ) + // }} + // /> + // + // ): null} + // + // + // ): null} + + // + // + // ) + // } return ( - setNumberOfTabs( prev => prev+1 )}> + //TouchableOpacity style={styles.rootContainer} activeOpacity={1} onPress={()=>setNumberOfTabs( prev => prev+1 )}> + showUnHideArchiveModal( false )} visible={unHideArchiveModal} closeBottomSheet={() => { showUnHideArchiveModal( false ) }} > @@ -618,11 +619,11 @@ const AccountManagementContainerScreen: React.FC = ( { navigation, }: Pro /> )} - + {/* - + */} ) diff --git a/src/pages/MoreOptions/MoreOptionsContainerScreen.tsx b/src/pages/MoreOptions/MoreOptionsContainerScreen.tsx index 2a4d00da50..10abb9bd05 100644 --- a/src/pages/MoreOptions/MoreOptionsContainerScreen.tsx +++ b/src/pages/MoreOptions/MoreOptionsContainerScreen.tsx @@ -109,7 +109,7 @@ const MoreOptionsContainerScreen: React.FC = ( { navigation }: Props ) => subtitle: levelData[ 0 ].keeper1.status == 'notSetup' ? bhrStrings[ 'WalletBackupInfo1' ] : levelData[ 0 ].keeper1ButtonText?.toLowerCase() == 'seed' - ? 'seed backup commpleted' + ? 'seed backup completed' :'cloud backup completed', title: bhrStrings[ 'WalletBackup' ], screenName: 'WalletBackup', @@ -126,6 +126,12 @@ const MoreOptionsContainerScreen: React.FC = ( { navigation }: Props ) => subtitle: strings.AppInfoSub, screenName: 'AppInfo', }, + // { + // title: 'Enable Auto Read from Clipboard', + // imageSource: require( '../../assets/images/icons/icon_info.png' ), + // subtitle: 'App will prompt to send sats to copied address', + // screenName: 'EnableClipboard' + // }, ] const listItemKeyExtractor = ( item: MenuOption ) => item.title @@ -153,7 +159,15 @@ const MoreOptionsContainerScreen: React.FC = ( { navigation }: Props ) => case strings.AppInfo: return ( ) case bhrStrings[ 'WalletBackup' ]: - return ( ) + return ( ) + // case 'Enable Auto Read from Clipboard': + // return ( ) default: return null } diff --git a/src/pages/MoreOptions/WalletBackup.tsx b/src/pages/MoreOptions/WalletBackup.tsx index d06f93547b..b743584b15 100644 --- a/src/pages/MoreOptions/WalletBackup.tsx +++ b/src/pages/MoreOptions/WalletBackup.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect, useCallback } from 'react' +import React, { useState, useEffect } from 'react' import { View, Text, @@ -13,12 +13,9 @@ import { Platform } from 'react-native' import { useDispatch, useSelector } from 'react-redux' -import idx from 'idx' -import DeviceInfo from 'react-native-device-info' import { widthPercentageToDP as wp, heightPercentageToDP as hp, - widthPercentageToDP, } from 'react-native-responsive-screen' import FontAwesome from 'react-native-vector-icons/FontAwesome' import CommonStyles from '../../common/Styles/Styles' @@ -27,23 +24,17 @@ import Fonts from '../../common/Fonts' import Colors from '../../common/Colors' import HeaderTitle from '../../components/HeaderTitle' import { AppBottomSheetTouchableWrapper } from '../../components/AppBottomSheetTouchableWrapper' -import { getVersions } from '../../common/utilities' import ModalContainer from '../../components/home/ModalContainer' import AsyncStorage from '@react-native-async-storage/async-storage' -import { updateWalletName } from '../../store/actions/trustedContacts' import CloudBackupStatus from '../../common/data/enums/CloudBackupStatus' -import { NavigationActions, StackActions } from 'react-navigation' -// import { goHomeAction } from '../../../navigation/actions/NavigationActions' import { translations } from '../../common/content/LocContext' -// import Options from '../../../assets/images/svgs/options.svg' -import { LevelData, LevelHealthInterface, MetaShare, TrustedContactRelationTypes, Trusted_Contacts } from '../../bitcoin/utilities/Interface' +import { AccountType, KeeperType, LevelData, LevelHealthInterface, MetaShare, TrustedContactRelationTypes, Trusted_Contacts } from '../../bitcoin/utilities/Interface' import { autoShareToLevel2Keepers, deletePrivateData, generateMetaShare, keeperProcessStatus, modifyLevelData, onPressKeeper, setHealthStatus, setIsKeeperTypeBottomSheetOpen, setLevelCompletionError, setLevelToNotSetupStatus, updateKeeperInfoToChannel, downloadSMShare, setApprovalStatus, upgradeLevelOneKeeper } from '../../store/actions/BHR' import { makeContactRecipientDescription } from '../../utils/sending/RecipientFactories' import ContactTrustKind from '../../common/data/enums/ContactTrustKind' import KeeperProcessStatus from '../../common/data/enums/KeeperProcessStatus' import LevelStatus from '../../common/data/enums/LevelStatus' import { setCloudData, setCloudErrorMessage, updateCloudData } from '../../store/actions/cloud' -import { ContactRecipientDescribing } from '../../common/data/models/interfaces/RecipientDescribing' import { PermanentChannelsSyncKind, syncPermanentChannels } from '../../store/actions/trustedContacts' import ErrorModalContents from '../../components/ErrorModalContents' import SeedBacupModalContents from '../NewBHR/SeedBacupModalContents' @@ -51,9 +42,20 @@ import BackupTypeModalContent from '../NewBHR/BackupTypeModalContent' import KeeperTypeModalContents from '../NewBHR/KeeperTypeModalContent' import QRModal from '../Accounts/QRModal' import MBNewBhrKnowMoreSheetContents from '../../components/know-more-sheets/MBNewBhrKnowMoreSheetContents' +import { Shadow } from 'react-native-shadow-2' +import accounts, { AccountsState } from '../../store/reducers/accounts' +import AccountArchiveModal from '../../pages/Accounts/AccountSettings/AccountArchiveModal' +import AccountVisibility from '../../common/data/enums/AccountVisibility' +import { updateAccountSettings } from '../../store/actions/accounts' +import { sourceAccountSelectedForSending } from '../../store/actions/sending' +import usePrimarySubAccountForShell from '../../utils/hooks/account-utils/UsePrimarySubAccountForShell' +import AccountShell from '../../common/data/models/AccountShell' +import idx from 'idx' +import { getNextFreeAddress } from '../../store/sagas/accounts' +import useAccountByAccountShell from '../../utils/hooks/state-selectors/accounts/UseAccountByAccountShell' -const WalletBackup = ( props ) => { +const WalletBackup = ( props, navigation ) => { const dispatch = useDispatch() const strings = translations[ 'bhr' ] const headerStrings = translations[ 'header' ] @@ -79,6 +81,13 @@ const WalletBackup = ( props ) => { const isKeeperInfoUpdated2: boolean = useSelector( ( state ) => state.bhr.isKeeperInfoUpdated2 ) const isKeeperInfoUpdated3: boolean = useSelector( ( state ) => state.bhr.isKeeperInfoUpdated3 ) const cloudErrorMessage: string = useSelector( ( state ) => state.cloud.cloudErrorMessage ) + const accountsState: AccountsState = useSelector( ( state ) => state.accounts, ) + const accountState: AccountsState = useSelector( ( state ) => idx( state, ( _ ) => _.accounts ) ) + const accountShells: AccountShell[] = accountState.accountShells + + const [ accType, setAccType ] = useState( AccountType.CHECKING_ACCOUNT ) + const sendingAccount = accountShells.find( shell => shell.primarySubAccount.type == accType && shell.primarySubAccount.instanceNumber === 0 ) + const sourcePrimarySubAccount = usePrimarySubAccountForShell( sendingAccount ) const iCloudErrors = translations[ 'iCloudErrors' ] const driveErrors = translations[ 'driveErrors' ] const defaultKeeperObj: { @@ -140,6 +149,24 @@ const WalletBackup = ( props ) => { const [ localLevelData, setLocalLevelData ] = useState( [] ) const [ isUpgrade, setIsUpgrade ] = useState( false ) + const [ showAccountArchiveModal, setShowAccountArchiveModal ] = useState( false ) + const [ primarySubAccount, setPrimarySubAccount ] = useState( null ) + const [ accountShell, setAccountShell ] = useState( null ) + const [ emptyAccountErrorModal, setEmptyAccountErrorModal ] = useState( false ) + const [ checkingAddress, setCheckingAddress ] = useState( null ) + + let localPrimarySubAccount = null + let localAccountShell = null + + function handleAccountArchive() { + const settings = { + visibility: AccountVisibility.ARCHIVED + } + dispatch( updateAccountSettings( { + accountShell: accountShell, settings + } ) ) + props.navigation.navigate( 'Home' ) + } // After Mount didMount useEffect( () => { @@ -152,6 +179,8 @@ const WalletBackup = ( props ) => { } } ) } ) + console.log( 'accountsState on walletbackup====>' + JSON.stringify( accountsState.accountShells ) ) + const focusListener = props.navigation.addListener( 'didFocus', () => { updateAddressBook() } ) @@ -166,7 +195,7 @@ const WalletBackup = ( props ) => { const init = async () => { await onRefresh() - // dispatch( modifyLevelData() ) + // dispatch( modifyLevelData() ) } const updateAddressBook = async () => { @@ -387,7 +416,7 @@ const WalletBackup = ( props ) => { // Contact or Device type if ( contacts ) { for ( const ck of Object.keys( contacts ) ) { - if ( contacts [ ck ].relationType == TrustedContactRelationTypes.KEEPER || contacts[ ck ].relationType == TrustedContactRelationTypes.PRIMARY_KEEPER ) { + if ( contacts[ ck ].relationType == TrustedContactRelationTypes.KEEPER || contacts[ ck ].relationType == TrustedContactRelationTypes.PRIMARY_KEEPER ) { // initiate permanent channel const channelUpdate = { contactInfo: { @@ -397,7 +426,7 @@ const WalletBackup = ( props ) => { channelUpdates.push( channelUpdate ) } } - dispatch( syncPermanentChannels ( { + dispatch( syncPermanentChannels( { permanentChannelsSyncKind: PermanentChannelsSyncKind.SUPPLIED_CONTACTS, channelUpdates: channelUpdates, metaSync: true @@ -412,9 +441,9 @@ const WalletBackup = ( props ) => { // autoCloudUpload() } - const autoCloudUpload = () =>{ - if( levelHealth[ 0 ] && levelHealth[ 1 ] ){ - if( levelHealth[ 1 ].levelInfo.length == 4 && + const autoCloudUpload = () => { + if ( levelHealth[ 0 ] && levelHealth[ 1 ] ) { + if ( levelHealth[ 1 ].levelInfo.length == 4 && levelHealth[ 1 ].levelInfo[ 1 ].updatedAt == 0 && levelHealth[ 1 ].levelInfo[ 2 ].updatedAt > 0 && levelHealth[ 1 ].levelInfo[ 3 ].updatedAt > 0 && @@ -443,7 +472,9 @@ const WalletBackup = ( props ) => { } } - const onKeeperButtonPress = ( value, keeperNumber ) => { + const onKeeperButtonPress = ( value, keeperNumber, showSeedAcion ) => { + if ( showSeedAcion ) + return // if ( ( currentLevel == 0 && levelHealth.length == 0 ) || ( currentLevel == 0 && levelHealth.length && levelHealth[ 0 ].levelInfo.length && levelHealth[ 0 ].levelInfo[ 0 ].status == 'notSetup' ) ) { // setBackupTypeModal( true ) // return @@ -534,7 +565,7 @@ const WalletBackup = ( props ) => { const tempData = [] levelData.map( ( item, index ) => { if ( item.keeper1.status != 'notSetup' || index == 0 ) { - if ( item.keeper1.shareType == 'seed' ) { + if ( item.keeper1.shareType == 'seed' || item.keeper1ButtonText == 'Write down seed-words' ) { tempData.push( item ) return } @@ -544,7 +575,8 @@ const WalletBackup = ( props ) => { else if ( index >= 1 && levelData[ index - 1 ].keeper1.status == 'accessible' && levelData[ index - 1 ].keeper2.status == 'accessible' ) { // For Upgrade Functionality // setIsUpgrade(true) - } } ) + } + } ) setLocalLevelData( tempData ) }, [ levelData ] ) @@ -576,21 +608,21 @@ const WalletBackup = ( props ) => { } else { return require( '../../assets/images/icons/seedwords.png' ) } - case 'securityQuestion' : + case 'securityQuestion': if ( status == 'notSetup' ) { return require( '../../assets/images/icons/icon_password.png' ) } else { return require( '../../assets/images/icons/icon_password.png' ) } - case 'cloud' : + case 'cloud': return Platform.OS == 'ios' ? require( '../../assets/images/icons/logo_brand_brands_logos_icloud.png' ) : require( '../../assets/images/icons/icon_google_drive.png' ) - case 'device' : - case 'primaryKeeper' : + case 'device': + case 'primaryKeeper': if ( status == 'accessible' ) return require( '../../assets/images/icons/icon_ipad_blue.png' ) else return Platform.OS == 'ios' ? require( '../../assets/images/icons/icon_secondarydevice.png' ) : require( '../../assets/images/icons/icon_secondarydevice.png' ) - case 'contact' : - case 'existingContact' : + case 'contact': + case 'existingContact': if ( updatedAt != 0 ) { if ( chosenContact && chosenContact.displayedName && chosenContact.avatarImageSource ) { return { @@ -599,7 +631,7 @@ const WalletBackup = ( props ) => { } else return require( '../../assets/images/icons/icon_user.png' ) } return require( '../../assets/images/icons/icon_contact.png' ) - case 'pdf' : + case 'pdf': if ( status == 'accessible' ) if ( valueStatus == 'notSetup' ) return require( '../../assets/images/icons/files-and-folders-2.png' ) @@ -629,7 +661,7 @@ const WalletBackup = ( props ) => { focusListener.remove() } }, [] ) - const showBackupMessage = () =>{ + const showBackupMessage = () => { const { messageOne, messageTwo, isFirstMessageBold, isError, isInit } = getMessageToShow() return ( <> @@ -645,65 +677,95 @@ const WalletBackup = ( props ) => { ) } + const onChangeSeedWordBackUp = () => { + let isAccountArchived = false + let isBalanceFilled = false + + + console.log( 'skk before psa', JSON.stringify( primarySubAccount ) ) + accountsState?.accountShells?.map( ( item, index )=>{ + if( item?.primarySubAccount?.type == AccountType.SAVINGS_ACCOUNT ){ + localPrimarySubAccount = item.primarySubAccount + localAccountShell = item + setAccountShell( localAccountShell ) + setPrimarySubAccount( localPrimarySubAccount ) + if( item?.primarySubAccount?.balances?.confirmed + item?.primarySubAccount?.balances?.unconfirmed != 0 ) { + isBalanceFilled = true + } else if( item?.primarySubAccount?.visibility == AccountVisibility.ARCHIVED ){ + isAccountArchived = true + } + } + if( item?.primarySubAccount?.type == AccountType.CHECKING_ACCOUNT ){ + const nextFreeAddress = getNextFreeAddress( dispatch, + accountsState.accounts[ item.primarySubAccount.id ] ) + setCheckingAddress( nextFreeAddress ) + } + } ) + if( isBalanceFilled ){ + setEmptyAccountErrorModal( true ) + } else if( isAccountArchived || currentLevel < 2 ) + setSeedBackupModal( true ) + else setShowAccountArchiveModal( true ) + } const getMessageToShow = () => { - if( levelData[ 0 ].keeper2.updatedAt == 0 && currentLevel == 0 && cloudBackupStatus === CloudBackupStatus.IN_PROGRESS ) { + if ( levelData[ 0 ].keeper2.updatedAt == 0 && currentLevel == 0 && cloudBackupStatus === CloudBackupStatus.IN_PROGRESS ) { return { isFirstMessageBold: false, messageOne: headerStrings.init, messageTwo: '', isError: false, isInit: true } } - if( levelData ){ + if ( levelData ) { let messageOneName = '' for ( let i = 0; i < levelData.length; i++ ) { const element = levelData[ i ] - if( element.keeper1.name && element.keeper1.status == 'notAccessible' ){ + if ( element.keeper1.name && element.keeper1.status == 'notAccessible' ) { return { isFirstMessageBold: true, messageOne: element.keeper1.name, messageTwo: headerStrings.needAttention, isError: true } } - if( element.keeper2.name && element.keeper2.status == 'notAccessible' ){ + if ( element.keeper2.name && element.keeper2.status == 'notAccessible' ) { return { isFirstMessageBold: true, messageOne: element.keeper2.name, messageTwo: headerStrings.needAttention, isError: true } } - if( element.keeper1.status == 'accessible' && element.keeper1.shareType == 'seed' ){ - messageOneName = 'Seed ' +headerStrings.backupIsCompleted + if ( element.keeper1.status == 'accessible' && element.keeper1.shareType == 'seed' ) { + messageOneName = 'Seed ' + headerStrings.backupIsCompleted } - if( element.keeper2.status == 'accessible' ){ + if ( element.keeper2.status == 'accessible' ) { messageOneName = element.keeper2.name } } - if( currentLevel == 0 && levelData[ 0 ].keeper1.shareType != 'seed' ){ + if ( currentLevel == 0 && levelData[ 0 ].keeper1.shareType != 'seed' ) { return { isFirstMessageBold: false, messageOne: headerStrings.Backupyour, messageTwo: '', isError: true } - } else if( currentLevel === 1 ){ - if( messageOneName ) { + } else if ( currentLevel === 1 ) { + if ( messageOneName ) { return { - isFirstMessageBold: false, messageOne: `${messageOneName} `+headerStrings.backupIsCompleted, messageTwo: '', isError: false + isFirstMessageBold: false, messageOne: `${messageOneName} ` + headerStrings.backupIsCompleted, messageTwo: '', isError: false } } return { isFirstMessageBold: false, messageOne: Platform.OS == 'ios' ? headerStrings.l1 : headerStrings.l1Drive, messageTwo: '', isError: false } - } else if( currentLevel === 2 ){ + } else if ( currentLevel === 2 ) { return { isFirstMessageBold: false, messageOne: headerStrings.l2, messageTwo: '', isError: false } - } else if( currentLevel == 3 ){ + } else if ( currentLevel == 3 ) { return { isFirstMessageBold: true, messageOne: headerStrings.l3, messageTwo: '', isError: false } } } - if( currentLevel === 1 ){ + if ( currentLevel === 1 ) { return { isFirstMessageBold: false, messageOne: Platform.OS == 'ios' ? headerStrings.l1 : headerStrings.l1Drive, messageTwo: '', isError: false } - } else if( currentLevel == 0 && levelData[ 0 ].keeper1.shareType == 'seed' ) { + } else if ( currentLevel == 0 && levelData[ 0 ].keeper1.shareType == 'seed' ) { return { - isFirstMessageBold: false, messageOne: 'Seed ' +headerStrings.backupIsCompleted, messageTwo: '', isError: true + isFirstMessageBold: false, messageOne: 'Seed ' + headerStrings.backupIsCompleted, messageTwo: '', isError: true } - }else { + } else { return { isFirstMessageBold: false, messageOne: headerStrings.Backupyour, messageTwo: '', isError: true } @@ -743,7 +805,7 @@ const WalletBackup = ( props ) => { /> {'No backup created'} + }}>{( levelData && levelData[ 0 ]?.status == 'notSetup' ) ? 'No backup created' : 'Backup created'} {/* {getMessageToShow()} */} @@ -755,13 +817,16 @@ const WalletBackup = ( props ) => { extraData={localLevelData} showsVerticalScrollIndicator={false} renderItem={( { item, index } ) => { - if ( index == 0 && item.keeper1ButtonText == 'Encryption Password' ){ + if ( index == 0 && item.keeper1ButtonText == 'Encryption Password' ) { return null } else { + const showSeedAcion = ( levelData && ( levelData[ 0 ]?.status != 'notSetup' && levelData[ 0 ]?.keeper1?.shareType !== 'seed' ) + || ( levelData[ 0 ]?.status == 'notSetup' && levelData[ 0 ]?.keeper1?.shareType == KeeperType.SECURITY_QUESTION ) ) return ( onKeeperButtonPress( item, ( ( index % 2 ) + 1 ) )} + style={showSeedAcion ? styles.disableAddModalView : styles.addModalView} + activeOpacity={showSeedAcion ? 1 : 0} + onPress={() => onKeeperButtonPress( item, ( ( index % 2 ) + 1 ), showSeedAcion )} > { {'Encrypt and backup wallet on your cloud'} + }}>{index == 0 && item.keeper1ButtonText == 'Seed' ? 'BackedUp your wallet with seed word' : 'Encrypt and backup wallet on your cloud'} - + { + showSeedAcion ? + null + : + + } ) } }} /> + + { + ( levelData && ( levelData[ 0 ]?.status != 'notSetup' && levelData[ 0 ]?.keeper1?.shareType != 'seed' ) + || ( levelData[ 0 ]?.status == 'notSetup' && levelData[ 0 ]?.keeper1?.shareType == KeeperType.SECURITY_QUESTION ) ) && + + + + {'Change to Seed Words Backup'} + + + + } setKeeperTypeModal( false )} visible={keeperTypeModal} closeBottomSheet={() => setKeeperTypeModal( false )}> { props.navigation.navigate( 'SetNewPassword', { isFromManageBackup: true, } ) - } else if( onPressBackupType == 2 ) { + } else if ( onPressBackupType == 2 ) { setSeedBackupModal( true ) } }} @@ -876,10 +975,13 @@ const WalletBackup = ( props ) => { setSeedBackupModal( false )} visible={seedBackupModal} closeBottomSheet={() => setSeedBackupModal( false )}> { setSeedBackupModal( false ) props.navigation.navigate( 'BackupSeedWordsContent' ) @@ -942,6 +1044,37 @@ const WalletBackup = ( props ) => { bottomImage={require( '../../assets/images/icons/cloud_ilustration.png' )} /> + setEmptyAccountErrorModal( false )} visible={emptyAccountErrorModal} closeBottomSheet={() => setEmptyAccountErrorModal( false )}> + { + setEmptyAccountErrorModal( false ) + dispatch( sourceAccountSelectedForSending( accountShell ) ) + + props.navigation.navigate( 'AccountSend', { + subAccountKind: primarySubAccount.kind, + accountShellID: accountShell.id, + fromWallet: true, + address: checkingAddress + } ) + }} + onPressIgnore={() => setTimeout( () => { setEmptyAccountErrorModal( false ) }, 500 )} + proceedButtonText={'Sweep funds'} + cancelButtonText={'Not now'} + isIgnoreButton={true} + isBottomImage={true} + isBottomImageStyle={{ + width: wp( '27%' ), + height: wp( '27%' ), + marginLeft: 'auto', + resizeMode: 'stretch', + marginBottom: hp( '-3%' ), + }} + // bottomImage={require( '../../assets/images/icons/cloud_ilustration.png' )} + /> + { }} > { }} /> + setShowAccountArchiveModal( false )} visible={showAccountArchiveModal} closeBottomSheet={() => { }}> + { + handleAccountArchive() + // closeArchiveModal() + setShowAccountArchiveModal( false ) + }} + onBack={() => setShowAccountArchiveModal( false )} + onViewAccount={() => setShowAccountArchiveModal( false )} + account={primarySubAccount} + /> + ) } @@ -996,6 +1142,16 @@ const styles = StyleSheet.create( { marginTop: 40, marginHorizontal: 20 }, + disableAddModalView: { + backgroundColor: Colors.white, + paddingVertical: 34, + paddingHorizontal: 16, + flexDirection: 'row', + borderRadius: wp( '4' ), + marginBottom: hp( '1' ), + marginTop: 40, + marginHorizontal: 20 + }, modalElementInfoView: { flex: 1, }, @@ -1013,6 +1169,25 @@ const styles = StyleSheet.create( { marginTop: 5, fontFamily: Fonts.FiraSansRegular }, + successModalButtonView: { + height: wp( '12%' ), + // minWidth: wp( '22%' ), + paddingLeft: wp( '5%' ), + paddingRight: wp( '5%' ), + justifyContent: 'center', + alignItems: 'center', + borderRadius: 8, + backgroundColor: Colors.blue, + // alignSelf: 'center', + marginLeft: wp( '6%' ), + marginBottom: hp( '2%' ), + marginTop: hp( '2%' ) + }, + proceedButtonText: { + color: Colors.white, + fontSize: RFValue( 13 ), + fontFamily: Fonts.FiraSansMedium, + }, } ) export default WalletBackup diff --git a/src/pages/NewBHR/BackupSeedWordsContent.tsx b/src/pages/NewBHR/BackupSeedWordsContent.tsx index f6d8851c33..17d27e4c62 100644 --- a/src/pages/NewBHR/BackupSeedWordsContent.tsx +++ b/src/pages/NewBHR/BackupSeedWordsContent.tsx @@ -36,6 +36,21 @@ const BackupSeedWordsContent = ( props ) => { const isChangeKeeperType = props.navigation.getParam( 'isChangeKeeperType' ) useEffect( ()=>{ RNPreventScreenshot.enabled( true ) + + //set random number + const i = 12, ranNums = [] + for( let j=0; j<2; j++ ){ + const tempNumber = ( Math.floor( Math.random() * ( i ) ) ) + if( ranNums.length == 0 || ( ranNums.length > 0 && ranNums[ j ] != tempNumber ) ){ + if ( tempNumber == undefined || tempNumber == 0 ) { + ranNums.push( 1 ) + } + else { + ranNums.push( tempNumber ) + } + } else j-- + } + setSeedRandomNumber( ranNums ) }, [] ) return ( { infoBoxTitle={'Note'} infoBoxInfo={'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt'} onPressConfirm={( seed, seedData )=>{ - const i = 12, ranNums = [] setSeedPosition( 0 ) setSeedData( seedData ) - for( let j=0; j<2; j++ ){ - const tempNumber = ( Math.floor( Math.random() * ( i ) ) ) - if( ranNums.length == 0 || ( ranNums.length > 0 && ranNums[ j ] != tempNumber ) ){ - if ( tempNumber == undefined || tempNumber == 0 ) { - ranNums.push( 1 ) - } - else { - ranNums.push( tempNumber ) - } - } else j-- - } - setSeedRandomNumber( ranNums ) setTimeout( () => { setConfirmSeedWordModal( true ) diff --git a/src/pages/NewBHR/SecurityQuestion.tsx b/src/pages/NewBHR/SecurityQuestion.tsx index f4753b1b10..105703b9e5 100644 --- a/src/pages/NewBHR/SecurityQuestion.tsx +++ b/src/pages/NewBHR/SecurityQuestion.tsx @@ -103,6 +103,7 @@ function SecurityQuestion( props ) { resetScrollToCoords={{ x: 0, y: 0 }} + keyboardShouldPersistTaps='always' scrollEnabled={false} style={{ ...styles.modalContentContainer diff --git a/src/pages/NewBHR/SeedBackupHistory.tsx b/src/pages/NewBHR/SeedBackupHistory.tsx index 6c81020d92..8edea4d991 100644 --- a/src/pages/NewBHR/SeedBackupHistory.tsx +++ b/src/pages/NewBHR/SeedBackupHistory.tsx @@ -104,6 +104,18 @@ const SeedBackupHistory = ( props ) => { useEffect( ()=>{ setInfoOnBackup() + + //set random number + const i = 12, ranNums = [] + for( let j=0; j<2; j++ ){ + const tempNumber = ( Math.floor( Math.random() * ( i ) ) ) + if( ranNums.length == 0 || ( ranNums.length > 0 && ranNums[ j ] != tempNumber ) ){ + if( tempNumber == undefined || tempNumber == 0 ) + ranNums.push( 1 ) + else ranNums.push( tempNumber ) + } else j-- + } + setSeedRandomNumber( ranNums ) }, [] ) useEffect( () =>{ @@ -111,8 +123,6 @@ const SeedBackupHistory = ( props ) => { }, [ cloudBackupStatus, cloudBackupInitiated ] ) const setInfoOnBackup = () =>{ - console.log( 'skk levelhealth', levelHealth ) - console.log( 'skk levelhealth', JSON.stringify( levelHealth ) ) // if( levelHealth[ 0 ] && levelHealth[ 0 ].levelInfo.length && levelHealth[ 0 ].levelInfo[ 1 ].status == 'accessible' && currentLevel > 0 ){ if( levelHealth[ 0 ] && levelHealth[ 0 ].levelInfo.length && levelHealth[ 0 ].levelInfo[ 0 ].status == 'accessible' ){ setButtonText( common.backup ) @@ -333,21 +343,9 @@ const SeedBackupHistory = ( props ) => { // if( !seed ) seed = name // else seed = seed + ' ' + name // } ) - - const i = 12, ranNums = [] setSeedPosition( 0 ) setSeedData( seedData ) - for( let j=0; j<2; j++ ){ - const tempNumber = ( Math.floor( Math.random() * ( i ) ) ) - if( ranNums.length == 0 || ( ranNums.length > 0 && ranNums[ j ] != tempNumber ) ){ - if( tempNumber == undefined || tempNumber == 0 ) - ranNums.push( 1 ) - else ranNums.push( tempNumber ) - } else j-- - } - setSeedRandomNumber( ranNums ) - setTimeout( () => { setConfirmSeedWordModal( true ) }, 500 ) @@ -362,7 +360,7 @@ const SeedBackupHistory = ( props ) => { showButton={showButton} changeButtonText={'Change'} showSeedHistoryNote={true} - isChangeKeeperAllow={true} + isChangeKeeperAllow={false} /> setConfirmationModal( false )} visible={confirmationModal} closeBottomSheet={() => {}}> diff --git a/src/pages/NewBHR/SeedBacupModalContents.tsx b/src/pages/NewBHR/SeedBacupModalContents.tsx index 7d6db593a3..eedf24a1f0 100644 --- a/src/pages/NewBHR/SeedBacupModalContents.tsx +++ b/src/pages/NewBHR/SeedBacupModalContents.tsx @@ -98,6 +98,7 @@ export default function SeedBacupModalContents( props ) { marginTop: 'auto', letterSpacing: 0.11, fontSize: RFValue( 11 ), + color: Colors.blue }} > {props.note} diff --git a/src/pages/NewBHR/SeedPageComponent.tsx b/src/pages/NewBHR/SeedPageComponent.tsx index 4484d1d810..9f2f1dd6ac 100644 --- a/src/pages/NewBHR/SeedPageComponent.tsx +++ b/src/pages/NewBHR/SeedPageComponent.tsx @@ -27,6 +27,8 @@ import dbManager from '../../storage/realm/dbManager' const AnimatedPagerView = Animated.createAnimatedComponent( PagerView ) +const {height} = Dimensions.get('window'); + const SeedPageComponent = ( props ) => { const strings = translations[ 'bhr' ] const wallet: Wallet = useSelector( ( state: RootStateOrAny ) => state.storage.wallet ) @@ -403,10 +405,12 @@ const styles = StyleSheet.create( { // justifyContent: 'center', // paddingLeft: wp( '3%' ), // paddingRight: wp( '3%' ), + paddingHorizontal: wp(2), + paddingVertical: height > 760 ? hp(1) : 0, alignSelf: 'center', flexDirection: 'row', alignItems: 'center', - marginBottom: 20, + marginBottom: height > 720 ? 20 : height > 650 ? 15 : 10, borderRadius: 10, // borderColor: '#E3E3E3', // borderWidth: 1 @@ -433,9 +437,9 @@ const styles = StyleSheet.create( { }, numberContainer: { margin: 5, - height: ( 50 ), - width: ( 50 ), - borderRadius: ( 25 ), + height: height > 720 ? (50) : height > 650 ? ( 45 ) : ( 30 ), + width: height > 720 ? (50) : height > 650 ? ( 45 ) : ( 30 ), + borderRadius: height > 720 ? (25) : ( 15 ), backgroundColor: Colors.white, shadowColor: Colors.shadowBlack, // elevation: 10, @@ -451,8 +455,8 @@ const styles = StyleSheet.create( { numberInnerContainer: { backgroundColor: Colors.numberBg, borderRadius: ( 23 ), - height: ( 46 ), - width: ( 46 ), + height: height > 720 ? (46) : height > 650 ? ( 41 ) : ( 26 ), + width: height > 720 ? (46) : height > 650 ? ( 41 ) : ( 26 ), margin: ( 4 ), justifyContent: 'center', alignItems: 'center' diff --git a/src/pages/NewBHR/SetNewPassword.tsx b/src/pages/NewBHR/SetNewPassword.tsx index 4bef0fe953..30e94ae8c0 100644 --- a/src/pages/NewBHR/SetNewPassword.tsx +++ b/src/pages/NewBHR/SetNewPassword.tsx @@ -473,7 +473,6 @@ export default function SetNewPassword(props: { navigation: { getParam: (arg0: s showEncryptionPswd(false) setShowAGSPmodal(false) setAnswerError('') - props.navigation.goBack() }} > {common['knowMore']} */} + showEncryptionPswd(false)}> + x + { if ( walletSetupCompleted ) { @@ -290,7 +291,7 @@ export default function NewWalletName( props ) { setTimeout( () => { setSignUpStarted( true ) dispatch( updateCloudPermission( false ) ) - dispatch( setupWallet( walletName, null ) ) + dispatch( setupWallet( walletName, null, mnemonic ) ) dispatch( initNewBHRFlow( true ) ) dispatch( setVersion( 'Current' ) ) const current = Date.now() diff --git a/src/pages/PasscodeConfirm.tsx b/src/pages/PasscodeConfirm.tsx index 65667cecdf..0986dd6c52 100755 --- a/src/pages/PasscodeConfirm.tsx +++ b/src/pages/PasscodeConfirm.tsx @@ -80,8 +80,8 @@ export default function PasscodeConfirm( props ) { setPasscodeFlag( false ) setConfirmPasscodeFlag( 1 ) } else if ( !confirmPasscode && passcode.length > 0 && passcode.length <= 4 && confirmPasscodeFlag == 2 ) { - setPasscodeFlag( true ) - setConfirmPasscodeFlag( 0 ) + // setPasscodeFlag( true ) + setConfirmPasscodeFlag( 1 ) } else if ( !confirmPasscode && passcode.length > 0 && passcode.length <= 4 ) { setPasscodeFlag( true ) setConfirmPasscodeFlag( 0 ) diff --git a/src/pages/RestoreHexaWithKeeper/RestoreSeedWordsContent.tsx b/src/pages/RestoreHexaWithKeeper/RestoreSeedWordsContent.tsx index 0d9eebadb8..f5bace76a3 100644 --- a/src/pages/RestoreHexaWithKeeper/RestoreSeedWordsContent.tsx +++ b/src/pages/RestoreHexaWithKeeper/RestoreSeedWordsContent.tsx @@ -18,7 +18,7 @@ import RestoreSeedPageComponent from './RestoreSeedPageComponent' import RestoreSeedHeaderComponent from './RestoreSeedHeaderComponent' import * as bip39 from 'bip39' import { RootStateOrAny, useDispatch, useSelector } from 'react-redux' -import { recoverWalletUsingMnemonic } from '../../store/actions/BHR' +import { recoverWalletUsingMnemonic, restoreSeedWordFailed } from '../../store/actions/BHR' import { completedWalletSetup } from '../../store/actions/setupAndAuth' import { setVersion } from '../../store/actions/versionHistory' import AsyncStorage from '@react-native-async-storage/async-storage' @@ -33,27 +33,36 @@ import { NavigationContext } from 'react-navigation' const RestoreSeedWordsContent = ( props ) => { const [ seedWordModal, setSeedWordModal ] = useState( false ) const [ confirmSeedWordModal, setConfirmSeedWordModal ] = useState( false ) - const [ showSeedError, setShowSeedError ]= useState(false) + const [ showSeedError, setShowSeedError ] = useState( false ) const [ showLoader, setShowLoader ] = useState( false ) const [ loaderModal, setLoaderModal ] = useState( false ) const [ showAlertModal, setShowAlertModal ] = useState( false ) + const [ showSeedFailedModal, setSeedFailedModal ] = useState( false ) const [ seedRecovered, setSeedRecovered ] = useState( false ) const loaderMessage = { - heading: translations[ 'bhr' ].Creatingyourwallet, + heading: translations[ 'bhr' ].Importingyourwallet, text: translations[ 'bhr' ].Thismaytake } const subPoints = [ translations[ 'bhr' ].Settingupmultipleaccounts, translations[ 'bhr' ].Preloading, ] - const bottomTextMessage = translations[ 'bhr' ].Hexaencrypts + const bottomTextMessage = translations[ 'bhr' ].Hexaencrypts const dispatch = useDispatch() const wallet: Wallet = useSelector( ( state: RootStateOrAny ) => state.storage.wallet ) + const restoreSeedData = useSelector( ( state ) => state.bhr.loading.restoreSeedData ) + const [ mnemonic, setMnemonic ] = useState( null ) + + useEffect( () => { + return () => { + dispatch( restoreSeedWordFailed( false ) ) + } + }, [] ) useEffect( () => { setLoaderModal( false ) - if( wallet ){ + if ( wallet ) { dispatch( completedWalletSetup() ) AsyncStorage.setItem( 'walletRecovered', 'true' ) dispatch( setVersion( 'Restored' ) ) @@ -61,29 +70,39 @@ const RestoreSeedWordsContent = ( props ) => { } }, [ wallet ] ) - const renderSeedErrorModal = () =>{ - return( + useEffect( () => { + if( restoreSeedData == 'restoreSeedDataFailed' ){ + setLoaderModal( false ) + props.navigation.navigate( 'NewWalletName', { + mnemonic, + } ) + } + }, [ restoreSeedData ] ) + + const renderSeedErrorModal = () => { + return ( props.navigation.goBack()} + onPressProceed={() => props.navigation.goBack()} /> ) } const recoverWalletViaSeed = ( mnemonic: string ) => { setShowLoader( true ) + setMnemonic( mnemonic ) setTimeout( () => { const isValidMnemonic = bip39.validateMnemonic( mnemonic ) - if( !isValidMnemonic ){ + if ( !isValidMnemonic ) { setShowLoader( false ) // Alert.alert( 'Invalid mnemonic, try again!' ) setShowAlertModal( true ) return } setShowLoader( false ) - setLoaderModal ( true ) + setLoaderModal( true ) setTimeout( () => { dispatch( recoverWalletUsingMnemonic( mnemonic ) ) }, 500 ) @@ -103,18 +122,18 @@ const RestoreSeedWordsContent = ( props ) => { }}> { showLoader && - - - + + + } { previousButtonText={'Previous'} isChangeKeeperAllow={true} /> - setShowSeedError}> + setShowSeedError}> {renderSeedErrorModal()} - {}} > + { }} > - {setShowAlertModal( false )}} visible={showAlertModal} closeBottomSheet={() => { }}> + { setShowAlertModal( false ) }} visible={showAlertModal} closeBottomSheet={() => { }}> { setShowAlertModal( false ) }} isBottomImage={false} - // bottomImage={require( '../../assets/images/icons/errorImage.png' )} + // bottomImage={require( '../../assets/images/icons/errorImage.png' )} + /> + + { setSeedFailedModal( false ) }} visible={showSeedFailedModal} closeBottomSheet={() => { }}> + { + setSeedFailedModal( false ) + props.navigation.goBack() + }} + isBottomImage={false} + // bottomImage={require( '../../assets/images/icons/errorImage.png' )} /> diff --git a/src/pages/RestoreHexaWithKeeper/RestoreWithICloud.tsx b/src/pages/RestoreHexaWithKeeper/RestoreWithICloud.tsx index bb5604f591..cf46286cf2 100644 --- a/src/pages/RestoreHexaWithKeeper/RestoreWithICloud.tsx +++ b/src/pages/RestoreHexaWithKeeper/RestoreWithICloud.tsx @@ -202,8 +202,8 @@ class RestoreWithICloud extends Component< bottomTextMessage: string subPoints: string[] - constructor(props) { - super(props) + constructor( props ) { + super( props ) this.RestoreFromICloud = React.createRef() this.ContactListForRestore = React.createRef() this.RestoreSuccess = React.createRef() @@ -241,8 +241,8 @@ class RestoreWithICloud extends Component< renderTimer: false, walletName: '', loaderMessage: { - heading: translations['bhr'].Creatingyourwallet, - text: translations['bhr'].Thismaytake + heading: translations[ 'bhr' ].Importingyourwallet, + text: translations[ 'bhr' ].Thismaytake }, question: '', encryptionType: '', @@ -260,34 +260,35 @@ class RestoreWithICloud extends Component< backupModal: false, errorModalTitle: '', errorModalInfo: '', - strings: translations['bhr'], - common: translations['common'], + strings: translations[ 'bhr' ], + common: translations[ 'common' ], restoreStarted: false, isWithoutCloud: false, - loading: {} + loading: { + } } - this.bottomTextMessage = translations['bhr'].Hexaencrypts + this.bottomTextMessage = translations[ 'bhr' ].Hexaencrypts this.subPoints = [ - translations['bhr'].Settingupmultipleaccounts, - Platform.OS == 'ios' ? translations['bhr'].Automaticallycreatingbackup : translations['bhr'].AutomaticallycreatingbackupDrive, - translations['bhr'].Preloading, + translations[ 'bhr' ].Settingupmultipleaccounts, + Platform.OS == 'ios' ? translations[ 'bhr' ].Automaticallycreatingbackup : translations[ 'bhr' ].AutomaticallycreatingbackupDrive, + translations[ 'bhr' ].Preloading, ] } componentDidMount = () => { - this.props.setDownloadedBackupData([]) + this.props.setDownloadedBackupData( [] ) this.cloudData() }; cloudData = () => { // console.log( 'INSIDE cloudData componentDidMount' ) - this.setState({ + this.setState( { showLoader: true - }) + } ) this.props.getCloudDataRecovery() }; - componentDidUpdate = async (prevProps, prevState) => { + componentDidUpdate = async ( prevProps, prevState ) => { const { walletRecoveryFailed, cloudData, @@ -297,8 +298,8 @@ class RestoreWithICloud extends Component< setVersion, cloudBackupStatus } = this.props - if (prevProps.cloudData !== cloudData && cloudData) { - this.getData(cloudData) + if ( prevProps.cloudData !== cloudData && cloudData ) { + this.getData( cloudData ) } // if ( prevProps.cloudBackupStatus !== cloudBackupStatus && cloudBackupStatus === CloudBackupStatus.FAILED ) { @@ -311,60 +312,60 @@ class RestoreWithICloud extends Component< // backupModal: true // } ) // } - if (prevProps.cloudErrorMessage !== this.props.cloudErrorMessage) { - this.setState((state) => ({ + if ( prevProps.cloudErrorMessage !== this.props.cloudErrorMessage ) { + this.setState( ( state ) => ( { showLoader: false, backupModal: false - })) + } ) ) this.showCloudRestoreError() - this.props.setCloudBackupStatus(CloudBackupStatus.PENDING) + this.props.setCloudBackupStatus( CloudBackupStatus.PENDING ) } - if (prevProps.wallet != this.props.wallet) { + if ( prevProps.wallet != this.props.wallet ) { completedWalletSetup() - await AsyncStorage.setItem('walletRecovered', 'true') - setVersion('Restored') - initNewBHRFlow(true) - this.setState({ + await AsyncStorage.setItem( 'walletRecovered', 'true' ) + setVersion( 'Restored' ) + initNewBHRFlow( true ) + this.setState( { loaderModal: false - }) - this.props.navigation.navigate('HomeNav') + } ) + this.props.navigation.navigate( 'HomeNav' ) } // if ( JSON.stringify( prevProps.downloadedBackupData ) != JSON.stringify( this.props.downloadedBackupData ) ) { - if (prevProps.downloadedBackupData != this.props.downloadedBackupData) { - if (this.props.downloadedBackupData.length) { + if ( prevProps.downloadedBackupData != this.props.downloadedBackupData ) { + if ( this.props.downloadedBackupData.length ) { this.updateList() } } - if (prevProps.walletRecoveryFailed !== walletRecoveryFailed) { + if ( prevProps.walletRecoveryFailed !== walletRecoveryFailed ) { // if ( this.loaderBottomSheet as any ) // ( this.loaderBottomSheet as any ).current.snapTo( 0 ) - this.setState({ + this.setState( { loaderModal: false - }) + } ) } - if (prevProps.errorReceiving !== this.props.errorReceiving && this.props.errorReceiving === true) { - this.setState({ + if ( prevProps.errorReceiving !== this.props.errorReceiving && this.props.errorReceiving === true ) { + this.setState( { showLoader: false - }) + } ) // ( this.BackupNotFound as any ).current.snapTo( 1 ) - this.setState({ + this.setState( { backupModal: true - }) + } ) // if ( this.loaderBottomSheet as any ) // ( this.loaderBottomSheet as any ).current.snapTo( 0 ) - this.setState({ + this.setState( { loaderModal: false - }) + } ) } - if (prevProps.downloadedBackupData.length == 0 && prevProps.downloadedBackupData != this.props.downloadedBackupData && this.props.downloadedBackupData.length == 1) { - if (this.props.downloadedBackupData[0].backupData.keeperInfo[this.props.downloadedBackupData[0].backupData.keeperInfo.length - 1].scheme == '1of1') { - this.updateList(); console.log('this.updateList();') - } else this.setKeeperInfoList(0, this.props.downloadedBackupData[0].backupData.keeperInfo) + if ( prevProps.downloadedBackupData.length == 0 && prevProps.downloadedBackupData != this.props.downloadedBackupData && this.props.downloadedBackupData.length == 1 ) { + if ( this.props.downloadedBackupData[ 0 ].backupData.keeperInfo[ this.props.downloadedBackupData[ 0 ].backupData.keeperInfo.length - 1 ].scheme == '1of1' ) { + this.updateList(); console.log( 'this.updateList();' ) + } else this.setKeeperInfoList( 0, this.props.downloadedBackupData[ 0 ].backupData.keeperInfo ) } // if ( prevProps.s3Service != this.props.s3Service && this.props.s3Service.levelhealth ) { @@ -386,35 +387,35 @@ class RestoreWithICloud extends Component< secondaryData?: SecondaryStreamData; }[] = [] - if (downloadedBackupData.length == 1) { - if (downloadedBackupData[0].backupData.keeperInfo[1].currentLevel == 1) { - this.setState({ + if ( downloadedBackupData.length == 1 ) { + if ( downloadedBackupData[ 0 ].backupData.keeperInfo[ 1 ].currentLevel == 1 ) { + this.setState( { isWithoutCloud: true, securityQuestionModal: true, - question: downloadedBackupData[0].backupData.primaryMnemonicShard.meta.question - }) + question: downloadedBackupData[ 0 ].backupData.primaryMnemonicShard.meta.question + } ) } } - updatedListData = [...listData] - for (let i = 0; i < updatedListData.length; i++) { - if (downloadedBackupData.find(value => value.backupData.primaryMnemonicShard.shareId == updatedListData[i].shareId)) { - updatedListData[i].status = 'received' - shares.push(downloadedBackupData.find(value => value.backupData.primaryMnemonicShard.shareId == updatedListData[i].shareId)) + updatedListData = [ ...listData ] + for ( let i = 0; i < updatedListData.length; i++ ) { + if ( downloadedBackupData.find( value => value.backupData.primaryMnemonicShard.shareId == updatedListData[ i ].shareId ) ) { + updatedListData[ i ].status = 'received' + shares.push( downloadedBackupData.find( value => value.backupData.primaryMnemonicShard.shareId == updatedListData[ i ].shareId ) ) } } - this.setState({ + this.setState( { listData: updatedListData, showLoader: false }, () => { - }) - if (shares.length === 2 || shares.length === 3) { - this.checkForRecoverWallet(shares, selectedBackup) + } ) + if ( shares.length === 2 || shares.length === 3 ) { + this.checkForRecoverWallet( shares, selectedBackup ) } }; - checkForRecoverWallet = (shares, selectedBackup) => { - const key = BHROperations.strechKey(this.state.answer) - const decryptedCloudDataJson = decrypt(selectedBackup.data, key) - if ((shares.length >= 2 && selectedBackup.levelStatus === 2) || (shares.length >= 3 && selectedBackup.levelStatus === 3)) { + checkForRecoverWallet = ( shares, selectedBackup ) => { + const key = BHROperations.strechKey( this.state.answer ) + const decryptedCloudDataJson = decrypt( selectedBackup.data, key ) + if ( ( shares.length >= 2 && selectedBackup.levelStatus === 2 ) || ( shares.length >= 3 && selectedBackup.levelStatus === 3 ) ) { this.showLoaderModal() this.recoverWallet( selectedBackup.levelStatus, @@ -424,97 +425,97 @@ class RestoreWithICloud extends Component< } }; - recoverWallet = (level, image, shares) => { - setTimeout(() => { - this.props.recoverWallet({ + recoverWallet = ( level, image, shares ) => { + setTimeout( () => { + this.props.recoverWallet( { level, answer: this.state.answer, selectedBackup: this.state.selectedBackup, image, shares - }) - }, 2) + } ) + }, 2 ) }; - getData = (result) => { - if (result) { + getData = ( result ) => { + if ( result ) { let arr = [] const newArray = [] try { - arr = JSON.parse(result) + arr = JSON.parse( result ) arr = arr.reverse() - } catch (error) { + } catch ( error ) { //console.log('ERROR', error); } - if (arr && arr.length) { - for (let i = 0; i < arr.length; i++) { - newArray.push(arr[i]) + if ( arr && arr.length ) { + for ( let i = 0; i < arr.length; i++ ) { + newArray.push( arr[ i ] ) } } - this.setState((state) => ({ - selectedBackup: newArray[0], + this.setState( ( state ) => ( { + selectedBackup: newArray[ 0 ], walletsArray: newArray, showLoader: false, - })) + } ) ) // ( this.RestoreFromICloud as any ).current.snapTo( 1 ) - this.setState({ + this.setState( { restoreModal: true - }) + } ) } else { - this.setState((state) => ({ + this.setState( ( state ) => ( { showLoader: false, - })) + } ) ) // ( this.BackupNotFound as any ).current.snapTo( 1 ) // this.setState({ // backupModal: true // }) - this.props.navigation.navigate('ScanRecoveryKey', { + this.props.navigation.navigate( 'ScanRecoveryKey', { walletName: 'newArray[ 0 ].walletName', - scannedData: (scannedData) => { - if (semver.lte(JSON.parse(scannedData).version, '1.4.6')) { - this.props.navigation.navigate('RestoreSelectedContactsList') + scannedData: ( scannedData ) => { + if ( semver.lte( JSON.parse( scannedData ).version, '1.4.6' ) ) { + this.props.navigation.navigate( 'RestoreSelectedContactsList' ) } else { - this.handleScannedData(scannedData) + this.handleScannedData( scannedData ) } } - }) + } ) // ( this.BackupNotFound as any ).current.snapTo( 1 ) } }; - getQuestion = (questionId) => { - return translations.login.questionList.filter(item => { - if (item.id === questionId) return item.question - }) + getQuestion = ( questionId ) => { + return translations.login.questionList.filter( item => { + if ( item.id === questionId ) return item.question + } ) } restoreWallet = () => { const { selectedBackup } = this.state - this.setState({ + this.setState( { walletName: selectedBackup.walletName - }) - this.getSecurityQuestion(selectedBackup.questionId, selectedBackup.question) + } ) + this.getSecurityQuestion( selectedBackup.questionId, selectedBackup.question ) }; - getSecurityQuestion = (questionId, question1) => { - if (Number(questionId) === 100) { - this.setState({ + getSecurityQuestion = ( questionId, question1 ) => { + if ( Number( questionId ) === 100 ) { + this.setState( { question: 'App generated password', encryptionType: 'password' - }) - } else if (Number(questionId) > 0) { - const question = this.getQuestion(questionId) - this.setState({ - question: question[0].question, + } ) + } else if ( Number( questionId ) > 0 ) { + const question = this.getQuestion( questionId ) + this.setState( { + question: question[ 0 ].question, encryptionType: 'question' - }) - } else if (questionId == '0') { - this.setState({ + } ) + } else if ( questionId == '0' ) { + this.setState( { question: question1, encryptionType: 'password' - }) + } ) } // ( this.SecurityQuestionBottomSheet as any ).current.snapTo( 1 ) - this.setState({ + this.setState( { securityQuestionModal: true - }) + } ) } // setSecurityQuestionAndName = async () => { @@ -530,19 +531,19 @@ class RestoreWithICloud extends Component< // } showCloudRestoreError = () => { - if (this.props.cloudErrorMessage !== '') { - setTimeout(() => { - this.setState({ + if ( this.props.cloudErrorMessage !== '' ) { + setTimeout( () => { + this.setState( { errorModal: true, - errorModalTitle: Platform.OS == 'ios' ? this.state.strings['CloudRestorefailed'] : this.state.strings['DriveRestorefailed'], - errorModalInfo: Platform.select({ - ios: translations.iCloudErrors[this.props.cloudErrorMessage], - android: translations.driveErrors[this.props.cloudErrorMessage], - }), + errorModalTitle: Platform.OS == 'ios' ? this.state.strings[ 'CloudRestorefailed' ] : this.state.strings[ 'DriveRestorefailed' ], + errorModalInfo: Platform.select( { + ios: translations.iCloudErrors[ this.props.cloudErrorMessage ], + android: translations.driveErrors[ this.props.cloudErrorMessage ], + } ), }, () => { - this.props.setCloudErrorMessage('') - }) - }, 500) + this.props.setCloudErrorMessage( '' ) + } ) + }, 500 ) } } @@ -550,17 +551,17 @@ class RestoreWithICloud extends Component< const { recoverWalletUsingIcloud } = this.props const { answer, selectedBackup }: { answer: string, selectedBackup: any } = this.state try { - const key = BHROperations.strechKey(answer) - const decryptedCloudDataJson = decrypt(selectedBackup.data, key) + const key = BHROperations.strechKey( answer ) + const decryptedCloudDataJson = decrypt( selectedBackup.data, key ) // if ( decryptedCloudDataJson ) this.setSecurityQuestionAndName() - const KeeperData: KeeperInfoInterface[] = JSON.parse(selectedBackup.keeperData) - this.setKeeperInfoList(selectedBackup.levelStatus, KeeperData, selectedBackup.dateTime) + const KeeperData: KeeperInfoInterface[] = JSON.parse( selectedBackup.keeperData ) + this.setKeeperInfoList( selectedBackup.levelStatus, KeeperData, selectedBackup.dateTime ) if ( - decryptedCloudDataJson && (selectedBackup.levelStatus == 2 || selectedBackup.levelStatus == 3) + decryptedCloudDataJson && ( selectedBackup.levelStatus == 2 || selectedBackup.levelStatus == 3 ) ) { - this.setState({ + this.setState( { cloudBackup: true - }) + } ) const backupData: BackupStreamData = { } const secondaryData: SecondaryStreamData = { @@ -573,95 +574,95 @@ class RestoreWithICloud extends Component< } = { backupData, secondaryData } - downloadedBackupDataTmp.backupData.primaryMnemonicShard = JSON.parse(selectedBackup.shares) + downloadedBackupDataTmp.backupData.primaryMnemonicShard = JSON.parse( selectedBackup.shares ) downloadedBackupDataTmp.backupData.keeperInfo = KeeperData downloadedBackupDataTmp.secondaryData.secondaryMnemonicShard = selectedBackup.secondaryShare downloadedBackupDataTmp.secondaryData.bhXpub = selectedBackup.bhXpub downloadedBackupDataTmp.isCloud = true - this.props.downloadBackupData({ + this.props.downloadBackupData( { backupData: downloadedBackupDataTmp - }) - this.setState({ + } ) + this.setState( { restoreModal: false - }) - this.setState({ + } ) + this.setState( { securityQuestionModal: false - }) - } else if (decryptedCloudDataJson && selectedBackup.levelStatus == 1) { + } ) + } else if ( decryptedCloudDataJson && selectedBackup.levelStatus == 1 ) { this.showLoaderModal() - recoverWalletUsingIcloud(decryptedCloudDataJson, answer, selectedBackup) + recoverWalletUsingIcloud( decryptedCloudDataJson, answer, selectedBackup ) } else { - this.setState({ + this.setState( { errorModal: true, - errorModalTitle: this.state.strings['ErrorreceivingRecoveryKey'], + errorModalTitle: this.state.strings[ 'ErrorreceivingRecoveryKey' ], errorModalInfo: 'The answer entered is incorrect. Please enter the correct answer or encryption password.', - }) + } ) } } - catch (error) { - console.log('ERROR', error) + catch ( error ) { + console.log( 'ERROR', error ) } } - setKeeperInfoList = (levelStatus, KeeperInfo: KeeperInfoInterface[], time?) => { + setKeeperInfoList = ( levelStatus, KeeperInfo: KeeperInfoInterface[], time? ) => { const listDataArray = [] - let KeeperData: KeeperInfoInterface[] = [...KeeperInfo] - const tempCL = Math.max.apply(Math, KeeperData.map(function (value) { return value.currentLevel })) - if (levelStatus === 2) KeeperData = KeeperData.filter(word => word.scheme == '2of3') - if (levelStatus === 3) KeeperData = KeeperData.filter(word => word.scheme == '3of5') - if (levelStatus == 0) { + let KeeperData: KeeperInfoInterface[] = [ ...KeeperInfo ] + const tempCL = Math.max.apply( Math, KeeperData.map( function ( value ) { return value.currentLevel } ) ) + if ( levelStatus === 2 ) KeeperData = KeeperData.filter( word => word.scheme == '2of3' ) + if ( levelStatus === 3 ) KeeperData = KeeperData.filter( word => word.scheme == '3of5' ) + if ( levelStatus == 0 ) { levelStatus = tempCL - if (tempCL === 2) KeeperData = KeeperData.filter(word => word.scheme == '2of3') - if (tempCL === 3) KeeperData = KeeperData.filter(word => word.scheme == '3of5') + if ( tempCL === 2 ) KeeperData = KeeperData.filter( word => word.scheme == '2of3' ) + if ( tempCL === 3 ) KeeperData = KeeperData.filter( word => word.scheme == '3of5' ) } - this.setState({ + this.setState( { currentLevel: levelStatus - }) + } ) let obj const list = [] - for (let i = 0; i < KeeperData.length; i++) { - if (KeeperData[i].type != 'securityQuestion') { + for ( let i = 0; i < KeeperData.length; i++ ) { + if ( KeeperData[ i ].type != 'securityQuestion' ) { obj = { - type: KeeperData[i].type, - title: KeeperData[i].data && Object.keys(KeeperData[i].data).length && KeeperData[i].data.name ? KeeperData[i].data.name : KeeperData[i].name, + type: KeeperData[ i ].type, + title: KeeperData[ i ].data && Object.keys( KeeperData[ i ].data ).length && KeeperData[ i ].data.name ? KeeperData[ i ].data.name : KeeperData[ i ].name, info: '', time: time ? timeFormatter( - moment(new Date()), - moment(time).valueOf() + moment( new Date() ), + moment( time ).valueOf() ) : '', status: 'waiting', image: null, - shareId: KeeperData[i].shareId, - data: KeeperData[i].data, + shareId: KeeperData[ i ].shareId, + data: KeeperData[ i ].data, } - console.log('obj', obj) - if (KeeperData[i].type == 'contact') { - list.push(KeeperData[i]) + console.log( 'obj', obj ) + if ( KeeperData[ i ].type == 'contact' ) { + list.push( KeeperData[ i ] ) } - listDataArray.push(obj) + listDataArray.push( obj ) } } - console.log('listDataArray', listDataArray) - this.setState({ + console.log( 'listDataArray', listDataArray ) + this.setState( { contactList: list, listData: listDataArray }, () => { this.updateList() - }) - this.props.putKeeperInfo(KeeperInfo) + } ) + this.props.putKeeperInfo( KeeperInfo ) } - handleScannedData = async (scannedData) => { + handleScannedData = async ( scannedData ) => { this.setState( { showLoader: true } ) this.prevLoading = true - console.log('scannedData', scannedData) + console.log( 'scannedData', scannedData ) const { downloadedBackupData } = this.props - this.props.downloadBackupData({ + this.props.downloadBackupData( { scannedData: scannedData - }) + } ) }; onCreatLink = () => { @@ -696,7 +697,7 @@ class RestoreWithICloud extends Component< // } }; - createLink = (selectedContact, index) => { + createLink = ( selectedContact, index ) => { // const { database } = this.props // const requester = this.state.walletName //database.WALLET_SETUP.walletName // const { REQUEST_DETAILS } = database.DECENTRALIZED_BACKUP.RECOVERY_SHARES[ @@ -806,16 +807,16 @@ class RestoreWithICloud extends Component< showLoaderModal = () => { // this.loaderBottomSheet.current.snapTo( 1 ) - this.setState({ + this.setState( { showLoader: false, loaderModal: true, restoreStarted: true - }) + } ) // this.setLoaderMessages() } getNextMessage = () => { - if (messageIndex == (loaderMessages.length)) messageIndex = 0 - return loaderMessages[messageIndex++] + if ( messageIndex == ( loaderMessages.length ) ) messageIndex = 0 + return loaderMessages[ messageIndex++ ] } static contextType = LocalizationContext @@ -823,54 +824,54 @@ class RestoreWithICloud extends Component< const { selectedBackup, hideShow, common } = this.state const { navigation } = this.props const { translations, formatString } = this.context - const strings = translations['bhr'] + const strings = translations[ 'bhr' ] return ( { //(this.RestoreFromICloud as any).current.snapTo(0); - this.setState({ + this.setState( { restoreModal: false - }) + } ) this.restoreWallet() }} onPressBack={() => { - this.setState({ + this.setState( { restoreModal: false - }) + } ) this.props.clearCloudCache() // ( this.RestoreFromICloud as any ).current.snapTo( 0 ) - navigation.goBack(); + navigation.goBack() }} hideShow={this.state.hideShow} walletsArray={this.state.walletsArray} - onPressSelectValue={(value) => { - this.setState({ + onPressSelectValue={( value ) => { + this.setState( { hideShow: false - }) - this.setState({ + } ) + this.setState( { selectedBackup: value - }) + } ) }} onPressCard={() => { - console.log('ajfjkh asd', hideShow) - this.setState({ + console.log( 'ajfjkh asd', hideShow ) + this.setState( { hideShow: !hideShow - }) + } ) }} /> ) @@ -879,10 +880,10 @@ class RestoreWithICloud extends Component< prevLoading = true render() { - if (this.prevLoading && !this.props.loading.downloadBackupDataStatus) { - this.setState({ + if ( this.prevLoading && !this.props.loading.downloadBackupDataStatus ) { + this.setState( { showLoader: false - }) + } ) this.prevLoading = false } const { @@ -929,7 +930,7 @@ class RestoreWithICloud extends Component< { this.props.clearCloudCache() - navigation.navigate('WalletInitialization') + navigation.navigate( 'WalletInitialization' ) }} style={styles.headerBackArrowView} > @@ -940,13 +941,13 @@ class RestoreWithICloud extends Component< /> - {strings['Recoverusingkeys']} + {strings[ 'Recoverusingkeys' ]} - {strings['statusofyourRecovery']} + {strings[ 'statusofyourRecovery' ]} @@ -960,11 +961,11 @@ class RestoreWithICloud extends Component< } style={{ flex: 1, - marginBottom: hp('2%'), + marginBottom: hp( '2%' ), }} > {cloudBackup && - listData.map((item, index) => { + listData.map( ( item, index ) => { return ( ) : ( @@ -1003,14 +1004,14 @@ class RestoreWithICloud extends Component< {item.title} {item.info} - {strings['Lastbackup']} {item.time} + {strings[ 'Lastbackup' ]} {item.time} {item.status == 'received' ? ( @@ -1027,14 +1028,14 @@ class RestoreWithICloud extends Component< backgroundColor: Colors.lightGreen, }} > - {strings['KeyReceived']} + {strings[ 'KeyReceived' ]} ) : ( - {strings['WaitingforKey']} + {strings[ 'WaitingforKey' ]} )} ) - })} + } )} - {strings['UseScaneKey']} + {strings[ 'UseScaneKey' ]} {/* { - navigation.navigate('ScanRecoveryKey', { + navigation.navigate( 'ScanRecoveryKey', { walletName: selectedBackup.walletName, - scannedData: (scannedData) => - this.handleScannedData(scannedData), - }) + scannedData: ( scannedData ) => + this.handleScannedData( scannedData ), + } ) }} > - {strings['ScanKey']} + {strings[ 'ScanKey' ]} {showLoader ? : null} { - this.setState({ + this.setState( { restoreModal: false - }) + } ) }} visible={restoreModal} closeBottomSheet={() => { - this.setState({ + this.setState( { restoreModal: false - }) + } ) }} > {this.renderContent()} { - this.setState({ + this.setState( { contactListModal: false - }) + } ) }} visible={contactListModal} closeBottomSheet={() => { }} > { - this.setState({ + onPressCard={( contact, index ) => { + this.setState( { selectedContact: contact, contactListModal: false }, () => { - this.setState({ + this.setState( { sendViaLinkModal: true - }) - }) + } ) + } ) // ( this.ContactListForRestore as any ).current.snapTo( 0 ) // ( this.SendViaLinkBottomSheet as any ).current.snapTo( 1 ) - this.createLink(contact, index) + this.createLink( contact, index ) }} /> { - this.setState({ + this.setState( { restoreSuccess: false - }) + } ) }} visible={this.state.restoreSuccess} closeBottomSheet={() => { - this.setState({ + this.setState( { restoreSuccess: false - }) + } ) }} > { - this.setState({ + this.setState( { restoreSuccess: false - }) - this.props.navigation.navigate('HomeNav') + } ) + this.props.navigation.navigate( 'HomeNav' ) }} onPressBack={() => { - this.setState({ + this.setState( { restoreSuccess: false - }) - this.props.navigation.navigate('HomeNav') + } ) + this.props.navigation.navigate( 'HomeNav' ) }} /> { - this.setState({ + this.setState( { backupModal: false - }) + } ) }} visible={backupModal} closeBottomSheet={() => { }} > { // ( this.BackupNotFound as any ).current.snapTo( 0 ) // navigation.replace( 'WalletNameRecovery' ) - this.setState({ + this.setState( { backupModal: false - }) + } ) }} onPressBack={() => { // ( this.BackupNotFound as any ).current.snapTo( 0 ) - this.setState({ + this.setState( { backupModal: false - }) + } ) }} /> { - this.setState({ + this.setState( { restoreWallet: false - }) + } ) }} visible={restoreWallet} closeBottomSheet={() => { }} > { // ( this.RestoreWallet as any ).current.snapTo( 0 ) - this.setState({ + this.setState( { restoreWallet: false - }) + } ) }} onPressBack={() => { // ( this.RestoreWallet as any ).current.snapTo( 0 ) - this.setState({ + this.setState( { restoreWallet: false - }) + } ) }} /> { - this.setState({ + this.setState( { loaderModal: false - }); if (this.state.restoreStarted) setTimeout(() => { - this.setState({ + } ); if ( this.state.restoreStarted ) setTimeout( () => { + this.setState( { loaderModal: true - }) - }, 200) + } ) + }, 200 ) }} visible={loaderModal} closeBottomSheet={() => { }} > { - this.setState({ + this.setState( { securityQuestionModal: false - }) + } ) }} visible={securityQuestionModal} closeBottomSheet={() => { - this.setState({ + this.setState( { securityQuestionModal: false - }) + } ) }} > {/* {console.log( 'teste Restore screen', this.state.question )} */} { + onPressConfirm={( answer ) => { Keyboard.dismiss() // if( this.SecurityQuestionBottomSheet as any ) // ( this.SecurityQuestionBottomSheet as any ).current.snapTo( 0 ) - this.setState({ + this.setState( { securityQuestionModal: false - }) - this.setState((state) => ({ + } ) + this.setState( ( state ) => ( { answer: answer - })) - if (this.state.isWithoutCloud) { + } ) ) + if ( this.state.isWithoutCloud ) { this.showLoaderModal() - this.props.restoreWithoutUsingIcloud(this.props.downloadedBackupData[0].backupData, this.state.answer) + this.props.restoreWithoutUsingIcloud( this.props.downloadedBackupData[ 0 ].backupData, this.state.answer ) } else this.decryptCloudJson() }} @@ -1303,68 +1304,77 @@ class RestoreWithICloud extends Component< /> */} { - this.setState({ + this.setState( { errorModal: false - }) + } ) }} visible={errorModal} closeBottomSheet={() => { }}> { - if (this.props.cloudData) this.getData(this.props.cloudData) + if ( this.props.cloudData ) this.getData( this.props.cloudData ) else this.cloudData() - this.setState({ + this.setState( { errorModal: false - }) + } ) }} isBottomImage={true} - bottomImage={require('../../assets/images/icons/errorImage.png')} + bottomImage={require( '../../assets/images/icons/errorImage.png' )} + isIgnoreButton + onPressIgnore={()=>{ + this.setState( { + errorModal:false + }, ()=>{ + this.props.navigation.goBack() + } ) + }} + cancelButtonText={'Start Over'} /> { - this.setState({ + this.setState( { sendViaLinkModal: false - }) + } ) }} visible={sendViaLinkModal} closeBottomSheet={() => { }} > {selectedContact.data && { // if ( this.SendViaLinkBottomSheet ) // ( this.SendViaLinkBottomSheet as any ).current.snapTo( 0 ) - this.setState({ + this.setState( { sendViaLinkModal: false - }) + } ) }} onPressDone={() => { - if (isOtpType) { - this.setState({ + if ( isOtpType ) { + this.setState( { renderTimer: true, sendViaLinkModal: false }, () => { - this.setState({ + this.setState( { shareOTPModal: true - }) - }) + } ) + } ) // ( this.shareOtpWithTrustedContactBottomSheet as any ).current.snapTo( 1 ) // this.setState( { // shareOTPModal: false // } ) } else { - this.setState({ + this.setState( { sendViaLinkModal: false - }) + } ) } // ( this.SendViaLinkBottomSheet as any ).current.snapTo( 0 ) @@ -1372,26 +1382,26 @@ class RestoreWithICloud extends Component< />} { - this.setState({ + this.setState( { shareOTPModal: false - }) + } ) }} visible={shareOTPModal} closeBottomSheet={() => { }} > { - this.setState({ + this.setState( { renderTimer: false, shareOTPModal: false - }) + } ) // ( this.shareOtpWithTrustedContactBottomSheet as any ).current.snapTo( // 0 // ) }} onPressBack={() => { - this.setState({ + this.setState( { renderTimer: false, shareOTPModal: false - }) + } ) // ( this.shareOtpWithTrustedContactBottomSheet as any ).current.snapTo( // 0 // ) @@ -1404,24 +1414,24 @@ class RestoreWithICloud extends Component< } } -const mapStateToProps = (state) => { +const mapStateToProps = ( state ) => { return { - cloudBackupStatus: idx(state, (_) => _.cloud.cloudBackupStatus) || CloudBackupStatus.PENDING, - security: idx(state, (_) => _.storage.wallet.security), - walletRecoveryFailed: idx(state, (_) => _.bhr.walletRecoveryFailed), - errorReceiving: idx(state, (_) => _.bhr.errorReceiving) || { + cloudBackupStatus: idx( state, ( _ ) => _.cloud.cloudBackupStatus ) || CloudBackupStatus.PENDING, + security: idx( state, ( _ ) => _.storage.wallet.security ), + walletRecoveryFailed: idx( state, ( _ ) => _.bhr.walletRecoveryFailed ), + errorReceiving: idx( state, ( _ ) => _.bhr.errorReceiving ) || { }, - cloudData: idx(state, (_) => _.cloud.cloudData), - downloadedBackupData: idx(state, (_) => _.bhr.downloadedBackupData), - keeperInfo: idx(state, (_) => _.bhr.keeperInfo), - wallet: idx(state, (_) => _.storage.wallet), - cloudErrorMessage: idx(state, (_) => _.cloud.cloudErrorMessage), - loading: idx(state, (_) => _.bhr.loading) + cloudData: idx( state, ( _ ) => _.cloud.cloudData ), + downloadedBackupData: idx( state, ( _ ) => _.bhr.downloadedBackupData ), + keeperInfo: idx( state, ( _ ) => _.bhr.keeperInfo ), + wallet: idx( state, ( _ ) => _.storage.wallet ), + cloudErrorMessage: idx( state, ( _ ) => _.cloud.cloudErrorMessage ), + loading: idx( state, ( _ ) => _.bhr.loading ) } } export default withNavigationFocus( - connect(mapStateToProps, { + connect( mapStateToProps, { recoverWalletUsingIcloud, recoverWallet, getCloudDataRecovery, @@ -1438,10 +1448,10 @@ export default withNavigationFocus( setCloudErrorMessage, setDownloadedBackupData, restoreWithoutUsingIcloud, - })(RestoreWithICloud) + } )( RestoreWithICloud ) ) -const styles = StyleSheet.create({ +const styles = StyleSheet.create( { modalHeaderTitleView: { alignItems: 'center', flexDirection: 'row', @@ -1453,15 +1463,15 @@ const styles = StyleSheet.create({ }, modalHeaderTitleText: { color: Colors.blue, - fontSize: RFValue(18), + fontSize: RFValue( 18 ), fontFamily: Fonts.FiraSansMedium, }, modalHeaderInfoText: { color: Colors.textColorGrey, - fontSize: RFValue(11), + fontSize: RFValue( 11 ), fontFamily: Fonts.FiraSansRegular, - marginTop: hp('0.7%'), - marginBottom: hp('0.7%'), + marginTop: hp( '0.7%' ), + marginBottom: hp( '0.7%' ), }, headerBackArrowView: { height: 30, @@ -1473,7 +1483,7 @@ const styles = StyleSheet.create({ height: 40, justifyContent: 'center', alignItems: 'center', - width: wp('30%'), + width: wp( '30%' ), }, buttonImage: { width: 20, @@ -1483,12 +1493,12 @@ const styles = StyleSheet.create({ }, buttonText: { color: Colors.white, - fontSize: RFValue(12), + fontSize: RFValue( 12 ), fontFamily: Fonts.FiraSansRegular, marginLeft: 10, }, cardsInfoText: { - fontSize: RFValue(10), + fontSize: RFValue( 10 ), fontFamily: Fonts.FiraSansRegular, color: Colors.textColorGrey, }, @@ -1499,20 +1509,20 @@ const styles = StyleSheet.create({ borderBottomColor: Colors.backgroundColor, }, cardsImageView: { - width: wp('20%'), - height: wp('20%'), + width: wp( '20%' ), + height: wp( '20%' ), justifyContent: 'center', alignItems: 'center', }, cardImage: { - width: wp('7%'), - height: wp('7%'), + width: wp( '7%' ), + height: wp( '7%' ), resizeMode: 'contain', - marginBottom: wp('1%'), + marginBottom: wp( '1%' ), }, statusTextView: { // padding: 5, - height: wp('5%'), + height: wp( '5%' ), backgroundColor: Colors.backgroundColor, justifyContent: 'center', alignItems: 'center', @@ -1522,17 +1532,17 @@ const styles = StyleSheet.create({ paddingRight: 10, }, statusText: { - fontSize: RFValue(9), + fontSize: RFValue( 9 ), fontFamily: Fonts.FiraSansRegular, color: Colors.textColorGrey, }, keeperImage: { - width: wp('15%'), - height: wp('15%'), - borderRadius: wp('15%') / 2, + width: wp( '15%' ), + height: wp( '15%' ), + borderRadius: wp( '15%' ) / 2, }, keeperImageView: { - borderRadius: wp('15%') / 2, + borderRadius: wp( '15%' ) / 2, borderColor: Colors.white, borderWidth: 1, alignItems: 'center', @@ -1548,4 +1558,4 @@ const styles = StyleSheet.create({ marginRight: 15, marginLeft: 5, } -}) +} ) diff --git a/src/pages/SettingGetNewPin.tsx b/src/pages/SettingGetNewPin.tsx index 55a2e1f88f..b713cf1f56 100644 --- a/src/pages/SettingGetNewPin.tsx +++ b/src/pages/SettingGetNewPin.tsx @@ -100,8 +100,8 @@ export default function SettingGetNewPin( props ) { passcode.length <= 4 && confirmPasscodeFlag == 2 ) { - setPasscodeFlag( true ) - setConfirmPasscodeFlag( 0 ) + // setPasscodeFlag( true ) + setConfirmPasscodeFlag( 1 ) } else if ( !confirmPasscode && passcode.length > 0 && diff --git a/src/store/actions/BHR.ts b/src/store/actions/BHR.ts index aa671844e5..aac8c150d7 100644 --- a/src/store/actions/BHR.ts +++ b/src/store/actions/BHR.ts @@ -82,6 +82,7 @@ export const RECOVER_WALLET_WITH_MNEMONIC = 'RECOVER_WALLET_WITH_MNEMONIC' export const PDF_UPGRADE = 'PDF_UPGRADE' export const RESET_LEVEL_AFTER_PASSWORD_CHANGE = 'RESET_LEVEL_AFTER_PASSWORD_CHANGE' export const SEED_BACKUP_HISTORY = 'SEED_BACKUP_HISTORY' +export const RESTORE_SEED_WORD = 'RESTORE_SEED_WORD' export const initNewBHRFlow = ( newBHRFlowStarted ) => { return { @@ -145,6 +146,14 @@ export const switchS3LoadingStatus = ( beingLoaded ) => { } } +export const restoreSeedWordFailed = ( beingLoaded ) => { + return { + type: RESTORE_SEED_WORD, payload: { + beingLoaded + } + } +} + export const walletRecoveryFailed = ( isFailed ) => { return { type: WALLET_RECOVERY_FAILED_HEALTH, payload: { diff --git a/src/store/actions/doNotStore.ts b/src/store/actions/doNotStore.ts new file mode 100644 index 0000000000..cb9539a482 --- /dev/null +++ b/src/store/actions/doNotStore.ts @@ -0,0 +1,7 @@ +export const CLIPBOARD_READ_STATE = 'CLIPBOARF_READ_STATE'; + +export const clipboardReadAction = () => { + return { + type: CLIPBOARD_READ_STATE, + } +}; \ No newline at end of file diff --git a/src/store/actions/misc.ts b/src/store/actions/misc.ts new file mode 100644 index 0000000000..961387b696 --- /dev/null +++ b/src/store/actions/misc.ts @@ -0,0 +1,7 @@ +export const TOGGLE_ACCESS = 'TOGGLE_ACCESS'; + +export const toggleClipboardAccess = () => { + return { + type: TOGGLE_ACCESS, + }; +}; \ No newline at end of file diff --git a/src/store/actions/satCardAccount.ts b/src/store/actions/satCardAccount.ts new file mode 100644 index 0000000000..4f8c8093d8 --- /dev/null +++ b/src/store/actions/satCardAccount.ts @@ -0,0 +1,19 @@ +// types and action creators: dispatched by components and sagas +import { ImageSourcePropType } from 'react-native' +import { Account } from '../../bitcoin/utilities/Interface' +import AccountShell from '../../common/data/models/AccountShell' +import { AccountsState } from '../reducers/accounts' + +export const SAT_CARD_ACCOUNT = 'SAT_CARD_ACCOUNT' + +export const updateSatCardAccount = ( accountId: string, privKey: string, address: string, selectedAccount: AccountShell ) => { + return { + type: SAT_CARD_ACCOUNT, + payload: { + accountId, + privKey, + address, + selectedAccount + }, + } +} diff --git a/src/store/actions/setupAndAuth.ts b/src/store/actions/setupAndAuth.ts index 6f85915353..8188c016ab 100644 --- a/src/store/actions/setupAndAuth.ts +++ b/src/store/actions/setupAndAuth.ts @@ -34,11 +34,11 @@ export const credsAuth = ( passcode, reLogin? ) => { } -export const setupWallet = ( walletName: string, security: { questionId: string, question: string, answer: string } ) => { +export const setupWallet = ( walletName: string, security: { questionId: string, question: string, answer: string }, mnemonic: string ) => { return { type: SETUP_WALLET, payload: { - walletName, security + walletName, security, mnemonic } } } diff --git a/src/store/index.ts b/src/store/index.ts index 8550ffa5fa..e96f8810f5 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,193 +1,197 @@ -import { applyMiddleware, createStore, combineReducers } from 'redux' -import AsyncStorage from '@react-native-async-storage/async-storage' -import thunk from 'redux-thunk' -import createSagaMiddleware from 'redux-saga' -import { call, all, spawn } from 'redux-saga/effects' -import { composeWithDevTools } from 'redux-devtools-extension' - -import storageReducer from './reducers/storage' -import setupAndAuthReducer from './reducers/setupAndAuth' -import accountsReducer from './reducers/accounts' -import bhr from './reducers/BHR' -import fBTCReducers from './reducers/fbtc' -import notificationsReducer from './reducers/notifications' -import sendingReducer from './reducers/sending' -import trustedContactsReducer from './reducers/trustedContacts' -import { persistStore, persistReducer, createMigrate } from 'redux-persist' -import preferencesReducer from './reducers/preferences' -import swanIntegrationReducer from './reducers/SwanIntegration' -import wyreIntegrationReducer from './reducers/WyreIntegration' -import rampIntegrationReducer from './reducers/RampIntegration' -import VersionHistoryReducer from './reducers/versionHistory' -import cloudReducer from './reducers/cloud' -import upgradeToNewBhr from './reducers/upgradeToNewBhr' -import reduxPersistMigrations from './redux-persist-migrations' - -const config = { - key: 'root', // key is required - // version: 0, // redux persist migration version code(initiate to a version once the corresponding migration state is implemented) - storage: AsyncStorage, // storage is now required - blacklist: [ 'setupAndAuth', 'loaders' ], - migrate: createMigrate( reduxPersistMigrations, { - debug: true - } ) -} - import { - setupWalletWatcher, - credentialStorageWatcher, - credentialsAuthWatcher, - changeAuthCredWatcher, - applicationUpdateWatcher, - resetPinCredWatcher, -} from './sagas/setupAndAuth' - + GoogleDriveLoginWatcher, + checkCloudBackupWatcher, + checkFileIsAvailableWatcher, + cloudWatcher, + createFileWatcher, + getCloudBackupRecoveryWatcher, + readFileWatcher, + updateCloudBackupWatcher, + updateDataWatcher, + updateHealthForCloudStatusWatcher, + updateHealthForCloudWatcher, + uplaodFileWatcher, +} from './sagas/cloud' import { - testcoinsWatcher, - syncAccountsWatcher, - generateSecondaryXprivWatcher, - resetTwoFAWatcher, - updateDonationPreferencesWatcher, + acceptExistingContactRequestWatcher, + autoShareLevel2KeepersWatcher, + changeEncPasswordWatcher, + changeQuestionAnswerWatcher, + cloudMetaShareHealthWatcher, + confirmPDFSharedWatcher, + createChannelAssetsWatcher, + createGuardianWatcher, + deletePrivateDataWatcher, + downloadBackupDataWatcher, + downloadSMShareWatcher, + emptyShareTransferDetailsForContactChangeWatcher, + generateLevel1SharesWatcher, + generateMetaSharesWatcher, + getApprovalFromKeeperWatcher, + getPDFDataWatcher, + initHealthWatcher, + modifyLevelDataWatcher, + onPressKeeperChannelWatcher, + recoverMnemonicHealthWatcher, + recoverWalletFromIcloudWatcher, + recoverWalletHealthWatcher, + recoverWalletWithMnemonicWatcher, + recoverWalletWithoutIcloudWatcher, + rejectedExistingContactRequestWatcher, + resetLevelAfterPasswordChangeWatcher, + retrieveMetaSharesWatcher, + setHealthStatusWatcher, + setLevelToNotSetupStatusWatcher, + setupHealthWatcher, + setupLevelHealthWatcher, + setupPasswordWatcher, + sharePDFWatcher, + updateHealthLevel2Watcher, + updateKeeperInfoToChannelWatcher, + updateSecondaryShardWatcher, + updateSeedHealthWatcher, + updateSharesHealthWatcher, + updateWalletImageHealthWatcher, + updatedKeeperInfoWatcher, + upgradeLevelOneKeeperWatcher, + upgradePDFWorkerWatcher +} from './sagas/BHR' +import { + accountCheckWatcher, addNewAccountShellsWatcher, - reassignTransactionsWatcher, - mergeAccountShellsWatcher, - refreshAccountShellsWatcher, - feeAndExchangeRatesWatcher, autoSyncShellsWatcher, - validateTwoFAWatcher, createSmNResetTFAOrXPrivWatcher, - updateAccountSettingsWatcher, + feeAndExchangeRatesWatcher, + generateGiftsWatcher, + generateSecondaryXprivWatcher, + mergeAccountShellsWatcher, + reassignTransactionsWatcher, + refreshAccountShellsWatcher, + resetTwoFAWatcher, restoreAccountShellsWatcher, - accountCheckWatcher, + syncAccountsWatcher, + testcoinsWatcher, txnReadWatcher, - generateGiftsWatcher + updateAccountSettingsWatcher, + updateDonationPreferencesWatcher, + validateTwoFAWatcher } from './sagas/accounts' - import { accountSyncWatcher, - getQuoteWatcher, executeOrderWatcher, getBalancesWatcher, + getQuoteWatcher, } from './sagas/fbtc' - import { - updateFCMTokensWatcher, - fetchNotificationsWatcher, - getMessageWatcher, - updateMessageStatusWatcher, - updateMessageStatusInAppWatcher -} from './sagas/notifications' - + addTempSwanAccountInfoWatcher, + createWithdrawalWalletOnSwanWatcher, + fetchSwanAuthenticationUrlWatcher, + redeemSwanCodeForTokenWatcher +} from './sagas/SwanIntegration' +import { all, call, spawn } from 'redux-saga/effects' import { - walletCheckInWatcher, - syncPermanentChannelsWatcher, - initializeTrustedContactWatcher, + applicationUpdateWatcher, + changeAuthCredWatcher, + credentialStorageWatcher, + credentialsAuthWatcher, + resetPinCredWatcher, + setupWalletWatcher, +} from './sagas/setupAndAuth' +import { applyMiddleware, combineReducers, createStore } from 'redux' +import { + associateGiftWatcher, editTrustedContactWatcher, - removeTrustedContactWatcher, + fetchGiftFromChannelWatcher, + initializeTrustedContactWatcher, + reclaimGiftWatcher, + rejectGiftWatcher, rejectTrustedContactWatcher, + removeTrustedContactWatcher, restoreTrustedContactsWatcher, + syncGiftsStatusWatcher, + syncPermanentChannelsWatcher, updateWalletNameToChannelWatcher, updateWalletNameWatcher, - fetchGiftFromChannelWatcher, - syncGiftsStatusWatcher, - rejectGiftWatcher, - associateGiftWatcher, - reclaimGiftWatcher, + walletCheckInWatcher, } from './sagas/trustedContacts' - -import nodeSettingsReducer from './reducers/nodeSettings' +import { + autoShareContactKeeperWatcher, + autoShareSecondaryWatcher, + confirmPDFSharedFromUpgradeWatcher, + initLevelsWatcher, + setCloudDataForLevelWatcher, + updateAvailableKeeperDataWatcher, +} from './sagas/upgradeToNewBhr' +import { calculateCustomFeeWatcher, calculateSendMaxFeeWatcher, executeSendStage1Watcher, executeSendStage2Watcher, sendTxNotificationWatcher } from './sagas/sending' import { connectToBitHyveNodeWatcher, restorePersonalNodeConfigurationWatcher, savePersonalNodeConfigurationWatcher } from './sagas/nodeSettings' - +import { createMigrate, persistReducer, persistStore } from 'redux-persist' import { - fetchSwanAuthenticationUrlWatcher, - redeemSwanCodeForTokenWatcher, - createWithdrawalWalletOnSwanWatcher, - addTempSwanAccountInfoWatcher -} from './sagas/SwanIntegration' + fetchNotificationsWatcher, + getMessageWatcher, + updateFCMTokensWatcher, + updateMessageStatusInAppWatcher, + updateMessageStatusWatcher +} from './sagas/notifications' +import { recreateMissingAccountsWatcher, sweepMissingAccountsWatcher, syncMissingAccountsWatcher } from './sagas/upgrades' -import { - fetchWyreReservationWatcher, -} from './sagas/WyreIntegration' +import AsyncStorage from '@react-native-async-storage/async-storage' +import VersionHistoryReducer from './reducers/versionHistory' +import accountsReducer from './reducers/accounts' +import autoMergeLevel2 from 'redux-persist/es/stateReconciler/autoMergeLevel2' +import bhr from './reducers/BHR' +import cloudReducer from './reducers/cloud' +import { composeWithDevTools } from 'redux-devtools-extension' +import createDebugger from 'redux-flipper' +import createSagaMiddleware from 'redux-saga' +import fBTCReducers from './reducers/fbtc' import { fetchRampReservationWatcher, } from './sagas/RampIntegration' +import { + fetchWyreReservationWatcher, +} from './sagas/WyreIntegration' +import nodeSettingsReducer from './reducers/nodeSettings' +import notificationsReducer from './reducers/notifications' +import preferencesReducer from './reducers/preferences' +import rampIntegrationReducer from './reducers/RampIntegration' +import reduxPersistMigrations from './redux-persist-migrations' +import sendingReducer from './reducers/sending' +import setupAndAuthReducer from './reducers/setupAndAuth' +import storageReducer from './reducers/storage' +import swanIntegrationReducer from './reducers/SwanIntegration' +import thunk from 'redux-thunk' +import trustedContactsReducer from './reducers/trustedContacts' +import { updateUserNameWatcher } from './sagas/storage' +import upgradeToNewBhr from './reducers/upgradeToNewBhr' +import upgrades from './reducers/upgrades' import { versionHistoryWatcher } from './sagas/versionHistory' import walletRescanningReducer from './reducers/wallet-rescanning' +import wyreIntegrationReducer from './reducers/WyreIntegration' +import { satCardAcountWatcher } from './sagas/satCardAccount' +import misc from './reducers/misc' +import doNotStoreReducer from './reducers/doNotStore' + +const config = { + key: 'root', // key is required + // version: 0, // redux persist migration version code(initiate to a version once the corresponding migration state is implemented) + storage: AsyncStorage, // storage is now required + blacklist: [ 'setupAndAuth', 'loaders', 'doNotStore' ], + migrate: createMigrate( reduxPersistMigrations, { + debug: true + } ) +} + + + + + + + + -import { - initHealthWatcher, - updateSharesHealthWatcher, - generateMetaSharesWatcher, - updateHealthLevel2Watcher, - recoverWalletFromIcloudWatcher, - recoverWalletWithoutIcloudWatcher, - recoverWalletHealthWatcher, - cloudMetaShareHealthWatcher, - recoverMnemonicHealthWatcher, - getPDFDataWatcher, - sharePDFWatcher, - confirmPDFSharedWatcher, - updatedKeeperInfoWatcher, - updateWalletImageHealthWatcher, - emptyShareTransferDetailsForContactChangeWatcher, - deletePrivateDataWatcher, - autoShareLevel2KeepersWatcher, - setLevelToNotSetupStatusWatcher, - setHealthStatusWatcher, - modifyLevelDataWatcher, - createChannelAssetsWatcher, - downloadSMShareWatcher, - createGuardianWatcher, - downloadBackupDataWatcher, - setupHealthWatcher, - updateKeeperInfoToChannelWatcher, - acceptExistingContactRequestWatcher, - setupPasswordWatcher, - setupLevelHealthWatcher, - generateLevel1SharesWatcher, - retrieveMetaSharesWatcher, - onPressKeeperChannelWatcher, - updateSecondaryShardWatcher, - getApprovalFromKeeperWatcher, - rejectedExistingContactRequestWatcher, - changeQuestionAnswerWatcher, - upgradePDFWorkerWatcher, - upgradeLevelOneKeeperWatcher, - resetLevelAfterPasswordChangeWatcher, - changeEncPasswordWatcher, - updateSeedHealthWatcher, - recoverWalletWithMnemonicWatcher -} from './sagas/BHR' -import { - cloudWatcher, - updateHealthForCloudStatusWatcher, - updateHealthForCloudWatcher, - getCloudBackupRecoveryWatcher, - checkCloudBackupWatcher, - GoogleDriveLoginWatcher, - updateDataWatcher, - createFileWatcher, - checkFileIsAvailableWatcher, - readFileWatcher, - uplaodFileWatcher, - updateCloudBackupWatcher, -} from './sagas/cloud' -import { - initLevelsWatcher, - setCloudDataForLevelWatcher, - autoShareSecondaryWatcher, - autoShareContactKeeperWatcher, - updateAvailableKeeperDataWatcher, - confirmPDFSharedFromUpgradeWatcher, -} from './sagas/upgradeToNewBhr' -import { calculateCustomFeeWatcher, calculateSendMaxFeeWatcher, executeSendStage1Watcher, executeSendStage2Watcher, sendTxNotificationWatcher } from './sagas/sending' -import { updateUserNameWatcher } from './sagas/storage' -import autoMergeLevel2 from 'redux-persist/es/stateReconciler/autoMergeLevel2' -import { recreateMissingAccountsWatcher, sweepMissingAccountsWatcher, syncMissingAccountsWatcher } from './sagas/upgrades' -import upgrades from './reducers/upgrades' const rootSaga = function* () { const sagas = [ // wallet setup watcher @@ -345,7 +349,10 @@ const rootSaga = function* () { // upgrade scripts recreateMissingAccountsWatcher, syncMissingAccountsWatcher, - sweepMissingAccountsWatcher + sweepMissingAccountsWatcher, + + // sat card account + satCardAcountWatcher ] yield all( @@ -382,16 +389,20 @@ const rootReducer = combineReducers( { versionHistory: VersionHistoryReducer, cloud: cloudReducer, upgradeToNewBhr: upgradeToNewBhr, - upgrades: upgrades + upgrades: upgrades, + misc: misc, + doNotStore: doNotStoreReducer } ) export default function makeStore() { const sagaMiddleware = createSagaMiddleware() const reducers = persistReducer( config, rootReducer ) + const reduxDebugger = createDebugger() const storeMiddleware = composeWithDevTools( - applyMiddleware( sagaMiddleware, thunk ) + applyMiddleware( sagaMiddleware, thunk, reduxDebugger ) ) + const store = createStore( reducers, storeMiddleware ) persistStore( store ) diff --git a/src/store/reducers/BHR.ts b/src/store/reducers/BHR.ts index 9cf8918e56..b7699df3ba 100644 --- a/src/store/reducers/BHR.ts +++ b/src/store/reducers/BHR.ts @@ -47,6 +47,7 @@ import { PDF_UPGRADE, SET_PASSWORD_RESET_STATE, SEED_BACKUP_HISTORY, + RESTORE_SEED_WORD, } from '../actions/BHR' interface historyObj { @@ -60,6 +61,7 @@ const initialState: { loading: { levelHealthCheck: Boolean; checkMSharesHealth: Boolean; + restoreSeedData: Boolean; initLoader: Boolean; updateMSharesHealth: Boolean; autoShareKeepersData: Boolean; @@ -141,6 +143,7 @@ const initialState: { loading: { levelHealthCheck: false, checkMSharesHealth: false, + restoreSeedData: false, initLoader: false, updateMSharesHealth: false, autoShareKeepersData: false, @@ -265,6 +268,15 @@ export default ( state = initialState, action ) => { }, } + case RESTORE_SEED_WORD: + return { + ...state, + loading: { + ...state.loading, + restoreSeedData: action.payload.beingLoaded, + } + } + case MSHARES: return { ...state, @@ -502,11 +514,11 @@ export default ( state = initialState, action ) => { pdfUpgrade: action.payload.flag, } - case UPDATE_OLD_META_SHARES_KEEPER: - return { - ...state, - oldMetaSharesKeeper: action.payload.oldMetaSharesKeeper - } + case UPDATE_OLD_META_SHARES_KEEPER: + return { + ...state, + oldMetaSharesKeeper: action.payload.oldMetaSharesKeeper + } case SEED_BACKUP_HISTORY: return { diff --git a/src/store/reducers/doNotStore.ts b/src/store/reducers/doNotStore.ts new file mode 100644 index 0000000000..de7a33d256 --- /dev/null +++ b/src/store/reducers/doNotStore.ts @@ -0,0 +1,18 @@ +import { CLIPBOARD_READ_STATE } from "../actions/doNotStore"; + +const initalState: { + didAccess: boolean; +} = { + didAccess: false, +} + +const doNotStoreReducer = (state = initalState, action) => { + switch (action.type) { + case CLIPBOARD_READ_STATE: + return {...state, didAccess: true}; + default: + return state; + } +}; + +export default doNotStoreReducer; \ No newline at end of file diff --git a/src/store/reducers/misc.ts b/src/store/reducers/misc.ts new file mode 100644 index 0000000000..b2008909b9 --- /dev/null +++ b/src/store/reducers/misc.ts @@ -0,0 +1,19 @@ +import { TOGGLE_ACCESS } from "../actions/misc"; + +const initialState: { + clipboardAccess: boolean; +} = { + clipboardAccess: false, +} + +export default (state=initialState, action) => { + switch (action.type) { + case TOGGLE_ACCESS: + return { + ...state, + clipboardAccess: !state.clipboardAccess, + } + default: + return state; + } +}; \ No newline at end of file diff --git a/src/store/sagas/BHR.ts b/src/store/sagas/BHR.ts index 3bc491729d..ecee051cab 100644 --- a/src/store/sagas/BHR.ts +++ b/src/store/sagas/BHR.ts @@ -83,6 +83,7 @@ import { RECOVER_WALLET_WITH_MNEMONIC, updateSeedHealth, setSeedBackupHistory, + restoreSeedWordFailed, } from '../actions/BHR' import { updateHealth } from '../actions/BHR' import { @@ -599,7 +600,8 @@ function* recoverWalletWorker( { payload } ) { if( !image ){ const getWI = yield call( BHROperations.fetchWalletImage, walletId ) if( getWI.status == 200 ) image = idx( getWI, _ => _.data.walletImage ) - if( !image ) Alert.alert( 'External mnemonic, wallet image not found' ) + // if( !image ) Alert.alert( 'External mnemonic, wallet image not found' ) + if( !image )yield put( restoreSeedWordFailed( 'restoreSeedDataFailed' ) ) } } else { if ( shares ) { @@ -897,9 +899,10 @@ function* updateWalletImageWorker( { payload } ) { const primaryMnemonic = walletObj.primaryMnemonic const encryptionKey = bip39.mnemonicToSeedSync( primaryMnemonic ).toString( 'hex' ) - if( updateSmShare ) { - walletImage.SM_share = BHROperations.encryptWithAnswer( wallet.smShare, encryptionKey ).encryptedData - } + + const smShare = wallet.smShare || dbWallet.smShare // fixes smShare backup for apps upgrading from version <2.0.75 + if( smShare ) walletImage.SM_share = BHROperations.encryptWithAnswer( smShare, encryptionKey ).encryptedData + if( update2fa ) { const details2FA = { secondaryXpub: wallet.secondaryXpub, @@ -2049,7 +2052,7 @@ function* downloadBackupDataWorker( { payload } ) { } catch ( error ) { yield put( switchS3LoaderKeeper( 'downloadBackupDataStatus' ) ) console.log( 'Error DOWNLOAD_BACKUP_DATA', error ) - Alert.alert('Invalid Key') + Alert.alert( 'Invalid Key' ) } } diff --git a/src/store/sagas/satCardAccount.ts b/src/store/sagas/satCardAccount.ts new file mode 100644 index 0000000000..8fadb34d7d --- /dev/null +++ b/src/store/sagas/satCardAccount.ts @@ -0,0 +1,87 @@ +import { Account, AccountType, Accounts, ActiveAddressAssigneeType, AverageTxFees, TxPriority } from '../../bitcoin/utilities/Interface' +import { call, put, select } from 'redux-saga/effects' + +import AccountOperations from '../../bitcoin/utilities/accounts/AccountOperations' +import AccountShell from '../../common/data/models/AccountShell' +import AccountUtilities from '../../bitcoin/utilities/accounts/AccountUtilities' +import { AccountsState } from '../reducers/accounts' +import { + SAT_CARD_ACCOUNT, +} from '../actions/satCardAccount' +import Toast from '../../components/Toast' +import { createWatcher } from '../utils/utilities' +import dbManager from '../../storage/realm/dbManager' +import { getNextFreeAddressWorker } from './accounts' +import { updateAccountShells } from '../actions/accounts' +import { updateWalletImageHealth } from '../actions/BHR' + +function* satCardAccountWorker( { payload }: { payload: { accountId: string, privKey: string, address: string, selectedAccount: AccountShell } } ) { + try { + const accountsState: AccountsState = yield select( state => state.accounts ) + const accounts: Accounts = accountsState.accounts + console.log( 'associateAccount accountsState' + JSON.stringify( accountsState ) ) + + let associateAccount: Account + + if ( payload.accountId ) { + associateAccount = accounts[ payload.accountId ] + } else { + for ( const accountId in accounts ) { + const account = accounts[ accountId ] + if ( account.type === AccountType.CHECKING_ACCOUNT && account.instanceNum === 0 ) { + associateAccount = account + break + } + } + } + console.log( 'skk associateAccount', associateAccount ) + + const privateKey1 = 'L2JQbktkgwHM9ENH7k785GZz3ib5bUF6TUzc7w3SBkYqCwf6uFYV' + const privateKey = 'L2JQbktkgwHM9ENH7k785GZz3ib5bUF6TUzc7w3SBkYqCwf6uFYV' + + const receivingAddress = yield call( getNextFreeAddressWorker, associateAccount ) + const network = AccountUtilities.getNetworkByType( associateAccount.networkType ) + // const defaultTxPriority = TxPriority.LOW + // const defaultFeePerByte = accountsState.averageTxFees[ defaultTxPriority ] + const averageTxFeeByNetwork = accountsState.averageTxFees[ associateAccount.networkType ] + + console.log( 'skk before txid' ) + const { txid } = yield call( + AccountOperations.sweepPrivateKey, + privateKey, + payload.address, + receivingAddress, + averageTxFeeByNetwork, + network, + ) + console.log( 'skk txid', JSON.stringify( txid ) ) + + // AccountOperations.importAddress( associateAccount, payload.privKey, payload.address, { + // type: ActiveAddressAssigneeType.GIFT, + // senderInfo: { + // name: 'Satscard' + // } + // } ) + + if ( txid ) { + yield put( updateAccountShells( { + accounts: { + [ associateAccount.id ]: associateAccount + } + } ) ) + yield call( dbManager.updateAccount, associateAccount.id, associateAccount ) + yield put( updateWalletImageHealth( { + updateAccounts: true, + accountIds: [ payload.selectedAccount.id ], + } ) ) + } + } catch ( err ) { + Toast( 'Claim not Completed try again' ) + return + } +} + +export const satCardAcountWatcher = createWatcher( + satCardAccountWorker, + SAT_CARD_ACCOUNT, +) diff --git a/src/store/sagas/setupAndAuth.ts b/src/store/sagas/setupAndAuth.ts index 26bce2a8ec..0349ea7525 100644 --- a/src/store/sagas/setupAndAuth.ts +++ b/src/store/sagas/setupAndAuth.ts @@ -39,8 +39,11 @@ import BHROperations from '../../bitcoin/utilities/BHROperations' function* setupWalletWorker( { payload } ) { - const { walletName, security }: { walletName: string, security: { questionId: string, question: string, answer: string }, newBie:boolean } = payload - const primaryMnemonic = bip39.generateMnemonic( ) + const { walletName, security, mnemonic }: { walletName: string, security: { questionId: string, question: string, answer: string }, newBie:boolean, mnemonic: string } = payload + let primaryMnemonic = null + if( mnemonic && mnemonic != null ) + primaryMnemonic = mnemonic + else primaryMnemonic = bip39.generateMnemonic( ) const primarySeed = bip39.mnemonicToSeedSync( primaryMnemonic ) const walletId = crypto.createHash( 'sha256' ).update( primarySeed ).digest( 'hex' ) diff --git a/yarn.lock b/yarn.lock index f674cef494..fdb73a6d02 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1048,7 +1048,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.7.0": +"@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.7.0": version "7.17.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b" integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw== @@ -1056,6 +1056,14 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.17.0": + version "7.17.10" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.10.tgz#d35d7b4467e439fcf06d195f8100e0fea7fc82c4" + integrity sha512-9O26jG0mBYfGkUYCYZRnBwbVLd1UZOICEr2Em6InB6jVfsAv1GKgwXHmrSg+WFWDmeKTA6vyTZiN8tCSM5Oo3A== + dependencies: + "@babel/helper-validator-identifier" "^7.16.7" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -3237,7 +3245,7 @@ browserify-zlib@^0.1.4: dependencies: pako "~0.2.0" -browserslist@^4.17.5, browserslist@^4.20.2: +browserslist@^4.17.5: version "4.20.2" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.2.tgz#567b41508757ecd904dab4d1c646c612cd3d4f88" integrity sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA== @@ -3248,6 +3256,17 @@ browserslist@^4.17.5, browserslist@^4.20.2: node-releases "^2.0.2" picocolors "^1.0.0" +browserslist@^4.20.2: + version "4.20.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.3.tgz#eb7572f49ec430e054f56d52ff0ebe9be915f8bf" + integrity sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg== + dependencies: + caniuse-lite "^1.0.30001332" + electron-to-chromium "^1.4.118" + escalade "^3.1.1" + node-releases "^2.0.3" + picocolors "^1.0.0" + bs58@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/bs58/-/bs58-5.0.0.tgz#865575b4d13c09ea2a84622df6c8cbeb54ffc279" @@ -3424,6 +3443,11 @@ caniuse-lite@^1.0.30001317: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001332.tgz#39476d3aa8d83ea76359c70302eafdd4a1d727dd" integrity sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw== +caniuse-lite@^1.0.30001332: + version "1.0.30001339" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001339.tgz#f9aece4ea8156071613b27791547ba0b33f176cf" + integrity sha512-Es8PiVqCe+uXdms0Gu5xP5PF2bxLR7OBp3wUzUnuO7OHzhOfCyg3hdiGWVPVxhiuniOzng+hTc1u3fEQ0TlkSQ== + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -4020,6 +4044,11 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.11.tgz#d66700c5eacfac1940deb4e3ee5642792d85cd33" integrity sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw== +cycle@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" + integrity sha512-TVF6svNzeQCOpjCqsy0/CSy8VgObG3wXusJ73xW2GbG5rGx7lC8zxDSURicsXI2UsGdi2L0QNRCi745/wUDvsA== + d64@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/d64/-/d64-1.0.0.tgz#4002a87e850cbfc9f9d9706b60fca613a3336e90" @@ -4051,6 +4080,11 @@ dayjs@^1.8.15: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.1.tgz#90b33a3dda3417258d48ad2771b415def6545eb0" integrity sha512-ER7EjqVAMkRRsxNCC5YqJ9d9VQYuWdGt7aiH2qA5R5wt8ZmWaP2dLUSIK6y/kVzLMlmh1Tvu5xUf4M/wdGJ5KA== +dayjs@^1.8.29: + version "1.11.4" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.4.tgz#3b3c10ca378140d8917e06ebc13a4922af4f433e" + integrity sha512-Zj/lPM5hOvQ1Bf7uAvewDaUcsJoI6JmNqmHhHl3nyumwe0XHwt8sWdOVAPACJzCebL8gQCi+K49w7iKWnGwX9g== + debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -4359,6 +4393,11 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= +electron-to-chromium@^1.4.118: + version "1.4.137" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.137.tgz#186180a45617283f1c012284458510cd99d6787f" + integrity sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA== + electron-to-chromium@^1.4.84: version "1.4.118" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.118.tgz#2d917c71712dac9652cc01af46c7d0bd51552974" @@ -4797,6 +4836,11 @@ events@^1.0.2, events@^1.1.1: resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= +events@^3.1.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" @@ -8024,6 +8068,11 @@ node-releases@^2.0.2: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.3.tgz#225ee7488e4a5e636da8da52854844f9d716ca96" integrity sha512-maHFz6OLqYxz+VQyCAtA3PTX4UP/53pa05fyDNc9CwjvJ0yEh6+xBwKsgCxMNhS8taUKBFYxfuiaD9U/55iFaw== +node-releases@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.4.tgz#f38252370c43854dc48aa431c766c6c398f40476" + integrity sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ== + node-stream-zip@^1.9.1: version "1.15.0" resolved "https://registry.yarnpkg.com/node-stream-zip/-/node-stream-zip-1.15.0.tgz#158adb88ed8004c6c49a396b50a6a5de3bca33ea" @@ -9033,6 +9082,11 @@ react-native-elements@^3.1.0: react-native-ratings "8.0.4" react-native-size-matters "^0.3.1" +react-native-flipper@^0.158.0: + version "0.158.0" + resolved "https://registry.yarnpkg.com/react-native-flipper/-/react-native-flipper-0.158.0.tgz#e043213f0256ea196fa54cfb4af6868ea86ceff1" + integrity sha512-c7cegCz4nsEQatHugNjG+XW4vabiuefgTIw7ZL8BypPz8pxzKTGIqP0cXvHp1XxNwHKxnH8TQnBiPihalTfJ+w== + react-native-fs@^2.16.6: version "2.19.0" resolved "https://registry.yarnpkg.com/react-native-fs/-/react-native-fs-2.19.0.tgz#5747eb52a5a3d2b31c8fb76f5f8044d0a855122c" @@ -9296,10 +9350,10 @@ react-native-tab-view@^2.15.2: resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-2.16.0.tgz#cae72c7084394bd328fac5fefb86cd966df37a86" integrity sha512-ac2DmT7+l13wzIFqtbfXn4wwfgtPoKzWjjZyrK1t+T8sdemuUvD4zIt+UImg03fu3s3VD8Wh/fBrIdcqQyZJWg== -react-native-tcp@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/react-native-tcp/-/react-native-tcp-3.3.2.tgz#b38c153039acac89294caa4991689c003ec62dce" - integrity sha512-zjFmjAvYOsBkR1MF7htuPlk+uOzTykKaeu/eN+I7fkZ7UqBCW+9u/gJgWCv6Tjfn2tGgku6hsEWril4Oy3zJhg== +react-native-tcp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/react-native-tcp/-/react-native-tcp-4.0.0.tgz#142f519798cc41cc3bb39ad45e2970a8643ef461" + integrity sha512-68lSq2qns6P33yH7vYuiU5rV7xEiNuA2GYIStFlMvF/uEKDHL53MDgQLC2alKEU9JAHfmB8uUmcu3QQSGkaoig== dependencies: base64-js "0.0.8" buffer "^5.0.0" @@ -9308,16 +9362,13 @@ react-native-tcp@^3.3.2: process "^0.11.9" util "^0.10.3" -react-native-udp@^2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/react-native-udp/-/react-native-udp-2.7.0.tgz#d04c5100fcbff343f8a2bf35a3025743d8960f93" - integrity sha512-tT+Wn0yLbdaTohXkGGor0HYgScGaASWCaCLSO1kCIUdNke7AtcOX5a5nfNLYrEjdUn7/2HRofuplyky7iJHSQA== +react-native-udp@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/react-native-udp/-/react-native-udp-4.1.5.tgz#bd164fa6280fd61c3b19f89e0aff2d2d058c262b" + integrity sha512-+4Jt0sbuq7lozbiUY6YtEE7KQIcp/xEnTsU44YaIUHE84wKP5STDBe0Vac6sKDdn/gKVV44RUBobzXnOLKcqFA== dependencies: - base64-js "0.0.8" - events "^1.0.2" - inherits "^2.0.1" - ip-regex "^1.0.3" - util "^0.10.3" + buffer "^5.6.0" + events "^3.1.0" react-native-unimodules@^0.10.1: version "0.10.1" @@ -9609,6 +9660,14 @@ redux-devtools-extension@^2.13.8: resolved "https://registry.yarnpkg.com/redux-devtools-extension/-/redux-devtools-extension-2.13.9.tgz#6b764e8028b507adcb75a1cae790f71e6be08ae7" integrity sha512-cNJ8Q/EtjhQaZ71c8I9+BPySIBVEKssbPpskBfsXqb8HJ002A3KRVHfeRzwRo6mGPqsm7XuHTqNSNeS1Khig0A== +redux-flipper@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/redux-flipper/-/redux-flipper-2.0.2.tgz#5deca22ef81e71253912fdf8a403f272db9ed27f" + integrity sha512-X6OD3+Ok8g0SunzrwS5OtbE735eBDxLz3uuK4fdJSwbAzskqOS3SWc+rKuOpqmLkt8pN+Szp7Nof9Etm75B1Rg== + dependencies: + cycle "^1.0.3" + dayjs "^1.8.29" + redux-persist@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/redux-persist/-/redux-persist-6.0.0.tgz#b4d2972f9859597c130d40d4b146fecdab51b3a8"