From 2f03f1b0004e1377ee2d15cadb3cc73b7fa4d04f Mon Sep 17 00:00:00 2001 From: dorianvp Date: Thu, 13 Feb 2025 13:42:48 -0300 Subject: [PATCH 01/36] chore(deps): Bump versions and modify some files --- .gitignore | 4 ++- Gemfile | 9 +++--- android/app/build.gradle | 23 +++++++------- android/app/src/main/AndroidManifest.xml | 3 +- .../ZingoLabs/Zingo/BackgroundSyncWorker.kt | 6 ++-- android/build.gradle | 8 ++--- android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/gradlew | 5 ++- android/gradlew.bat | 2 ++ android/settings.gradle | 5 ++- package.json | 31 ++++++++++--------- 12 files changed, 57 insertions(+), 43 deletions(-) diff --git a/.gitignore b/.gitignore index bf750aa20..d8e62b665 100644 --- a/.gitignore +++ b/.gitignore @@ -91,4 +91,6 @@ buck-out/ /**/GoogleService-Info.plist # Binaries -/rust/test_binaries/bins/ \ No newline at end of file +/rust/test_binaries/bins/ + +.cxx \ No newline at end of file diff --git a/Gemfile b/Gemfile index d60b25cc7..4e30944f9 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,8 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version ruby ">= 2.6.10" -# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper -# bound in the template on Cocoapods with next React Native release. -gem 'cocoapods', '>= 1.13', '< 1.15' -gem 'activesupport', '>= 6.1.7.5', '< 7.1.0' \ No newline at end of file +# Exclude problematic versions of cocoapods and activesupport that causes build failures. +gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' +gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' +gem 'xcodeproj', '< 1.26.0' +gem 'concurrent-ruby', '< 1.3.4' \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 80e6ab06c..219d7fbaf 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -8,14 +8,14 @@ apply plugin: "org.jetbrains.kotlin.android" */ react { /* Folders */ - // The root of your project, i.e. where "package.json" lives. Default is '..' - // root = file("../") - // The folder where the react-native NPM package is. Default is ../node_modules/react-native - // reactNativeDir = file("../node_modules/react-native") - // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen - // codegenDir = file("../node_modules/@react-native/codegen") - // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js - // cliFile = file("../node_modules/react-native/cli.js") + // The root of your project, i.e. where "package.json" lives. Default is '../..' + // root = file("../../") + // The folder where the react-native NPM package is. Default is ../../node_modules/react-native + // reactNativeDir = file("../../node_modules/react-native") + // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen + // codegenDir = file("../../node_modules/@react-native/codegen") + // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js + // cliFile = file("../../node_modules/react-native/cli.js") /* Variants */ // The list of variants to that are debuggable. For those we're going to @@ -49,6 +49,9 @@ react { // // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" // hermesFlags = ["-O", "-output-source-map"] + + /* Autolinking */ + autolinkLibrariesWithApp() } /** @@ -282,6 +285,4 @@ dependencies { // back navigation implementation implementation "androidx.activity:activity:1.6.0-alpha05" -} - -apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) +} \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index c0a162fed..8f5a43cbf 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -18,7 +18,8 @@ android:usesCleartextTraffic="false" android:enableOnBackInvokedCallback="false" android:hardwareAccelerated="true" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + android:supportsRtl="true"> /dev/null # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s' "$PWD" ) || exit cd "$SAVED" >/dev/null APP_NAME="Gradle" diff --git a/android/gradlew.bat b/android/gradlew.bat index 920486cf4..466141462 100644 --- a/android/gradlew.bat +++ b/android/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## diff --git a/android/settings.gradle b/android/settings.gradle index 6d834aa75..00223e3a8 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,4 +1,7 @@ +pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") } +plugins { id("com.facebook.react.settings") } +extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() } + rootProject.name = 'Zingo' -apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app' includeBuild('../node_modules/@react-native/gradle-plugin') diff --git a/package.json b/package.json index 0a5378f38..5d8fe7389 100644 --- a/package.json +++ b/package.json @@ -42,12 +42,12 @@ "postinstall-postinstall": "^2.1.0", "prop-types": "^15.8.1", "randomcolor": "^0.6.2", - "react": "18.2.0", - "react-native": "0.74.0", + "react": "18.3.1", + "react-native": "0.75.5", "react-native-biometrics": "^3.0.1", "react-native-device-info": "^11.1.0", "react-native-fs": "^2.20.0", - "react-native-gesture-handler": "2.20.0", + "react-native-gesture-handler": "^2.23.1", "react-native-keychain": "^9.2.2", "react-native-localize": "^3.1.0", "react-native-option-menu": "^1.1.3", @@ -55,35 +55,36 @@ "react-native-permissions": "^4.1.5", "react-native-picker-select": "^9.1.3", "react-native-qrcode-svg": "^6.3.12", - "react-native-reanimated": "3.15.5", + "react-native-reanimated": "^3.16.7", "react-native-safe-area-context": "^4.4.1", - "react-native-screens": "3.29.0", + "react-native-screens": "^4.6.0", "react-native-simple-biometrics": "^1.5.2", "react-native-snackbar": "^2.6.2", - "react-native-svg": "^13.7.0", + "react-native-svg": "^15.11.1", "react-native-svg-charts": "^5.4.0", "react-native-tab-view": "^3.3.0", "react-native-vision-camera": "^4.6.3", "url-parse": "^1.5.10" }, "devDependencies": { - "@babel/core": "^7.20.0", - "@babel/preset-env": "^7.20.0", - "@babel/runtime": "^7.20.0", - "@react-native/babel-preset": "0.74.81", - "@react-native/eslint-config": "0.74.81", - "@react-native/metro-config": "0.74.81", - "@react-native/typescript-config": "0.74.81", + "@babel/core": "^7.25.2", + "@babel/preset-env": "^7.25.3", + "@babel/runtime": "^7.25.0", + "@react-native-community/cli": "15.0.1", + "@react-native/babel-preset": "0.75.5", + "@react-native/eslint-config": "0.75.5", + "@react-native/metro-config": "0.75.5", + "@react-native/typescript-config": "0.75.5", "@testing-library/jest-native": "^5.3.3", "@testing-library/react-native": "^11.5.2", "@tsconfig/react-native": "^3.0.5", "@types/i18n-js": "^3.8.3", "@types/jest": "^29.2.4", - "@types/react-native-keychain": "^3.1.0", "@types/lodash": "^4.14.188", "@types/randomcolor": "^0.5.7", "@types/react": "^18.2.6", "@types/react-native": "^0.70.6", + "@types/react-native-keychain": "^3.1.0", "@types/react-native-svg-charts": "^5.0.16", "@types/url-parse": "^1.4.8", "babel-jest": "^29.6.3", @@ -93,7 +94,7 @@ "eslint": "^8.19.0", "jest": "^29.6.3", "prettier": "^2.8.8", - "react-test-renderer": "^18.2.0", + "react-test-renderer": "^18.3.1", "rimraf": "^5.0.5", "typescript": "5.0.4" }, From 4e6b605121e7150ffeebb64bb40854cd18cd1986 Mon Sep 17 00:00:00 2001 From: JC Date: Thu, 13 Feb 2025 13:59:24 -0700 Subject: [PATCH 02/36] fix: upgrade libs: netinfo & svg --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5d8fe7389..bb6e9971e 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@react-native-async-storage/async-storage": "^2.0.0", "@react-native-clipboard/clipboard": "^1.16.1", "@react-native-community/checkbox": "^0.5.17", - "@react-native-community/netinfo": "^9.3.9", + "@react-native-community/netinfo": "github:j-piasecki/react-native-netinfo#@jpiasecki/new-arch", "@react-native-picker/picker": "^2.6.1", "@react-navigation/bottom-tabs": "^6.4.0", "@react-navigation/native": "^6.1.18", @@ -60,7 +60,6 @@ "react-native-screens": "^4.6.0", "react-native-simple-biometrics": "^1.5.2", "react-native-snackbar": "^2.6.2", - "react-native-svg": "^15.11.1", "react-native-svg-charts": "^5.4.0", "react-native-tab-view": "^3.3.0", "react-native-vision-camera": "^4.6.3", @@ -99,7 +98,7 @@ "typescript": "5.0.4" }, "resolutions": { - "react-native-svg": "^13.7.0" + "react-native-svg": "^15.11.1" }, "transformIgnorePatterns": [ "node_modules/(?!((jest-)?react-native|react-navigation|@react-navigation/.*))" From 2434c9342aea770ba9b1d92bab3bb2c27dcf1d1a Mon Sep 17 00:00:00 2001 From: JC Date: Thu, 13 Feb 2025 18:17:52 -0700 Subject: [PATCH 03/36] fix: unify safe area to a specific library --- App.tsx | 2 +- app/LoadedApp/LoadedApp.tsx | 4 ++-- app/LoadedApp/components/ComputingTxContent.tsx | 3 ++- app/LoadedApp/components/Menu.tsx | 3 ++- app/LoadingApp/LoadingApp.tsx | 3 ++- app/LoadingApp/components/Launching.tsx | 4 +++- components/About/About.tsx | 4 +++- components/AddressBook/AddressBook.tsx | 3 ++- components/Components/Scanner.tsx | 2 +- components/History/components/ValueTransferDetail.tsx | 4 +++- components/Info/Info.tsx | 4 +++- components/Insight/Insight.tsx | 4 +++- components/Memo/Memo.tsx | 3 ++- components/Messages/MessagesAddress.tsx | 3 ++- components/Messages/MessagesAll.tsx | 3 ++- components/Messages/components/ContactList.tsx | 3 ++- components/Pools/Pools.tsx | 4 +++- components/PrivKey/PrivKey.tsx | 4 +++- components/Rescan/Rescan.tsx | 4 +++- components/Seed/Seed.tsx | 4 +++- components/Send/components/Confirm.tsx | 3 ++- components/Send/components/ScannerAddress.tsx | 3 ++- components/Settings/Settings.tsx | 3 ++- components/SyncReport/SyncReport.tsx | 4 +++- components/Ufvk/ImportUfvk.tsx | 3 ++- components/Ufvk/ShowUfvk.tsx | 4 +++- components/Ufvk/components/ScannerUfvk.tsx | 3 ++- 27 files changed, 63 insertions(+), 28 deletions(-) diff --git a/App.tsx b/App.tsx index 2830d0fa6..7161ed7ed 100644 --- a/App.tsx +++ b/App.tsx @@ -1,6 +1,6 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useState } from 'react'; -import { SafeAreaView } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; diff --git a/app/LoadedApp/LoadedApp.tsx b/app/LoadedApp/LoadedApp.tsx index 4f4ec937c..30bf483ba 100644 --- a/app/LoadedApp/LoadedApp.tsx +++ b/app/LoadedApp/LoadedApp.tsx @@ -9,12 +9,12 @@ import { AppState, NativeEventSubscription, Linking, - SafeAreaView, Platform, ActivityIndicator, TouchableOpacity, Dimensions, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'; import { faList, faUpload, faDownload, faCog, faRefresh } from '@fortawesome/free-solid-svg-icons'; @@ -683,7 +683,7 @@ export class LoadedAppClass extends Component { + this.unsubscribeNetInfo = NetInfo.addEventListener(async (state: any) => { const { isConnected, type, isConnectionExpensive } = this.state.netInfo; if ( isConnected !== state.isConnected || diff --git a/app/LoadedApp/components/ComputingTxContent.tsx b/app/LoadedApp/components/ComputingTxContent.tsx index 63fd00957..52f18905e 100644 --- a/app/LoadedApp/components/ComputingTxContent.tsx +++ b/app/LoadedApp/components/ComputingTxContent.tsx @@ -1,6 +1,7 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext } from 'react'; -import { ActivityIndicator, SafeAreaView, View } from 'react-native'; +import { ActivityIndicator, View } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { useTheme } from '@react-navigation/native'; import RegText from '../../../components/Components/RegText'; diff --git a/app/LoadedApp/components/Menu.tsx b/app/LoadedApp/components/Menu.tsx index 772f4cdc2..c925c3b6b 100644 --- a/app/LoadedApp/components/Menu.tsx +++ b/app/LoadedApp/components/Menu.tsx @@ -1,6 +1,7 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext } from 'react'; -import { ScrollView, View, Text, Dimensions, SafeAreaView } from 'react-native'; +import { ScrollView, View, Text, Dimensions } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; import RegText from '../../../components/Components/RegText'; diff --git a/app/LoadingApp/LoadingApp.tsx b/app/LoadingApp/LoadingApp.tsx index b35017a23..fa4f315b3 100644 --- a/app/LoadingApp/LoadingApp.tsx +++ b/app/LoadingApp/LoadingApp.tsx @@ -2,7 +2,6 @@ import React, { Component, useState, useMemo, useEffect } from 'react'; import { Alert, - SafeAreaView, Modal, I18nManager, EmitterSubscription, @@ -10,6 +9,8 @@ import { NativeEventSubscription, Platform, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import Clipboard from '@react-native-clipboard/clipboard'; import { useTheme } from '@react-navigation/native'; import { I18n } from 'i18n-js'; diff --git a/app/LoadingApp/components/Launching.tsx b/app/LoadingApp/components/Launching.tsx index b1e71f252..81fea9338 100644 --- a/app/LoadingApp/components/Launching.tsx +++ b/app/LoadingApp/components/Launching.tsx @@ -1,6 +1,8 @@ /* eslint-disable react-native/no-inline-styles */ import React from 'react'; -import { SafeAreaView, Text, View, ActivityIndicator } from 'react-native'; +import { Text, View, ActivityIndicator } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import { ThemeType } from '../../types'; diff --git a/components/About/About.tsx b/components/About/About.tsx index 1221cab90..cbc2992c6 100644 --- a/components/About/About.tsx +++ b/components/About/About.tsx @@ -1,6 +1,8 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext } from 'react'; -import { View, ScrollView, SafeAreaView } from 'react-native'; +import { View, ScrollView } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import FadeText from '../Components/FadeText'; diff --git a/components/AddressBook/AddressBook.tsx b/components/AddressBook/AddressBook.tsx index 07e324337..5cd57c668 100644 --- a/components/AddressBook/AddressBook.tsx +++ b/components/AddressBook/AddressBook.tsx @@ -3,13 +3,14 @@ import React, { useContext, useState, useEffect, useCallback, useMemo, useRef } import { View, ScrollView, - SafeAreaView, Platform, NativeScrollEvent, NativeSyntheticEvent, TouchableOpacity, ActivityIndicator, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import moment from 'moment'; import 'moment/locale/es'; import 'moment/locale/pt'; diff --git a/components/Components/Scanner.tsx b/components/Components/Scanner.tsx index 123e9dd48..4ae9c9101 100644 --- a/components/Components/Scanner.tsx +++ b/components/Components/Scanner.tsx @@ -1,6 +1,6 @@ /* eslint-disable react-native/no-inline-styles */ import React from 'react'; -import { SafeAreaView } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { Camera, Code, useCameraDevice, useCameraPermission, useCodeScanner } from 'react-native-vision-camera'; import { Text } from 'react-native-svg'; diff --git a/components/History/components/ValueTransferDetail.tsx b/components/History/components/ValueTransferDetail.tsx index 0fd152d07..7e534863b 100644 --- a/components/History/components/ValueTransferDetail.tsx +++ b/components/History/components/ValueTransferDetail.tsx @@ -1,6 +1,8 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext, useEffect, useRef, useState } from 'react'; -import { View, ScrollView, TouchableOpacity, SafeAreaView, Linking, Text } from 'react-native'; +import { View, ScrollView, TouchableOpacity, Linking, Text } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import Clipboard from '@react-native-clipboard/clipboard'; import moment from 'moment'; import 'moment/locale/es'; diff --git a/components/Info/Info.tsx b/components/Info/Info.tsx index 4171b165a..38bb28b28 100644 --- a/components/Info/Info.tsx +++ b/components/Info/Info.tsx @@ -1,6 +1,8 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext } from 'react'; -import { View, ScrollView, SafeAreaView } from 'react-native'; +import { View, ScrollView } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import DetailLine from '../Components/DetailLine'; diff --git a/components/Insight/Insight.tsx b/components/Insight/Insight.tsx index b065b0195..db633895a 100644 --- a/components/Insight/Insight.tsx +++ b/components/Insight/Insight.tsx @@ -1,6 +1,8 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext, useEffect, useState } from 'react'; -import { View, ScrollView, SafeAreaView, TouchableOpacity, ActivityIndicator, Dimensions } from 'react-native'; +import { View, ScrollView, TouchableOpacity, ActivityIndicator, Dimensions } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import { PieChart } from 'react-native-svg-charts'; import { Circle, G, Line, Text } from 'react-native-svg'; diff --git a/components/Memo/Memo.tsx b/components/Memo/Memo.tsx index abe0f4987..84a89ba42 100644 --- a/components/Memo/Memo.tsx +++ b/components/Memo/Memo.tsx @@ -3,13 +3,14 @@ import React, { useContext, useState } from 'react'; import { View, ScrollView, - SafeAreaView, TextInput, Dimensions, TouchableOpacity, KeyboardAvoidingView, Platform, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import Button from '../Components/Button'; import { ThemeType } from '../../app/types'; diff --git a/components/Messages/MessagesAddress.tsx b/components/Messages/MessagesAddress.tsx index 14ede0844..ab6205c09 100644 --- a/components/Messages/MessagesAddress.tsx +++ b/components/Messages/MessagesAddress.tsx @@ -2,7 +2,8 @@ import React, { useContext } from 'react'; import { SelectServerEnum, SendPageStateClass, ServerType } from '../../app/AppState'; import MessageList from './components/MessageList'; -import { SafeAreaView } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import { ThemeType } from '../../app/types'; import { ContextAppLoaded } from '../../app/context'; diff --git a/components/Messages/MessagesAll.tsx b/components/Messages/MessagesAll.tsx index e11c6e22c..ac663aa7b 100644 --- a/components/Messages/MessagesAll.tsx +++ b/components/Messages/MessagesAll.tsx @@ -1,7 +1,8 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext } from 'react'; import MessageList from './components/MessageList'; -import { SafeAreaView } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { ContextAppLoaded } from '../../app/context'; import { useTheme } from '@react-navigation/native'; import { ThemeType } from '../../app/types'; diff --git a/components/Messages/components/ContactList.tsx b/components/Messages/components/ContactList.tsx index 9f7f555b0..0f383625f 100644 --- a/components/Messages/components/ContactList.tsx +++ b/components/Messages/components/ContactList.tsx @@ -10,8 +10,9 @@ import { TouchableOpacity, ActivityIndicator, TextInput, - SafeAreaView, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import moment from 'moment'; import 'moment/locale/es'; import 'moment/locale/pt'; diff --git a/components/Pools/Pools.tsx b/components/Pools/Pools.tsx index 71f56a23c..8accd6545 100644 --- a/components/Pools/Pools.tsx +++ b/components/Pools/Pools.tsx @@ -1,6 +1,8 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext, useEffect, useState } from 'react'; -import { View, ScrollView, SafeAreaView, ActivityIndicator } from 'react-native'; +import { View, ScrollView, ActivityIndicator } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import ZecAmount from '../Components/ZecAmount'; diff --git a/components/PrivKey/PrivKey.tsx b/components/PrivKey/PrivKey.tsx index 7459ac3a7..fc3e13a56 100644 --- a/components/PrivKey/PrivKey.tsx +++ b/components/PrivKey/PrivKey.tsx @@ -1,6 +1,8 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext, useEffect, useState } from 'react'; -import { View, ScrollView, SafeAreaView, TouchableOpacity, Text } from 'react-native'; +import { View, ScrollView, TouchableOpacity, Text } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import Clipboard from '@react-native-clipboard/clipboard'; import QRCode from 'react-native-qrcode-svg'; diff --git a/components/Rescan/Rescan.tsx b/components/Rescan/Rescan.tsx index b96663498..2c33ab31d 100644 --- a/components/Rescan/Rescan.tsx +++ b/components/Rescan/Rescan.tsx @@ -1,6 +1,8 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext } from 'react'; -import { View, ScrollView, SafeAreaView } from 'react-native'; +import { View, ScrollView } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import RegText from '../Components/RegText'; diff --git a/components/Seed/Seed.tsx b/components/Seed/Seed.tsx index 6b8edbfe4..f149e1a9c 100644 --- a/components/Seed/Seed.tsx +++ b/components/Seed/Seed.tsx @@ -1,6 +1,8 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useState, useEffect, useContext } from 'react'; -import { View, SafeAreaView, ScrollView, TouchableOpacity, Text, Alert } from 'react-native'; +import { View, ScrollView, TouchableOpacity, Text, Alert } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import Clipboard from '@react-native-clipboard/clipboard'; diff --git a/components/Send/components/Confirm.tsx b/components/Send/components/Confirm.tsx index b4674f7ce..2234ab9ed 100644 --- a/components/Send/components/Confirm.tsx +++ b/components/Send/components/Confirm.tsx @@ -1,6 +1,7 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useCallback, useContext, useEffect, useState } from 'react'; -import { View, ScrollView, SafeAreaView, ActivityIndicator, Platform } from 'react-native'; +import { View, ScrollView, ActivityIndicator, Platform } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; import FadeText from '../../Components/FadeText'; import BoldText from '../../Components/BoldText'; diff --git a/components/Send/components/ScannerAddress.tsx b/components/Send/components/ScannerAddress.tsx index b36ccf3aa..1f4cc5eae 100644 --- a/components/Send/components/ScannerAddress.tsx +++ b/components/Send/components/ScannerAddress.tsx @@ -12,7 +12,8 @@ import Utils from '../../../app/utils'; import Header from '../../Header'; import { useTheme } from '@react-navigation/native'; import { ThemeType } from '../../../app/types'; -import { SafeAreaView } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { Code } from 'react-native-vision-camera'; type ScannerAddressProps = { diff --git a/components/Settings/Settings.tsx b/components/Settings/Settings.tsx index 1890ddee0..204926780 100644 --- a/components/Settings/Settings.tsx +++ b/components/Settings/Settings.tsx @@ -3,12 +3,13 @@ import React, { useContext, useEffect, useState } from 'react'; import { View, ScrollView, - SafeAreaView, TouchableOpacity, TextInput, Platform, KeyboardAvoidingView, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'; import { IconDefinition, faDotCircle } from '@fortawesome/free-solid-svg-icons'; diff --git a/components/SyncReport/SyncReport.tsx b/components/SyncReport/SyncReport.tsx index 0cd4113c0..b3e0bb42b 100644 --- a/components/SyncReport/SyncReport.tsx +++ b/components/SyncReport/SyncReport.tsx @@ -1,6 +1,8 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext, useEffect, useState } from 'react'; -import { View, ScrollView, SafeAreaView, Text, ActivityIndicator } from 'react-native'; +import { View, ScrollView, Text, ActivityIndicator } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import { ThemeType } from '../../app/types'; diff --git a/components/Ufvk/ImportUfvk.tsx b/components/Ufvk/ImportUfvk.tsx index 1936d5352..646fbcbdb 100644 --- a/components/Ufvk/ImportUfvk.tsx +++ b/components/Ufvk/ImportUfvk.tsx @@ -3,13 +3,14 @@ import React, { useContext, useEffect, useState } from 'react'; import { View, ScrollView, - SafeAreaView, TouchableOpacity, Modal, TextInput, KeyboardAvoidingView, Platform, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import { faQrcode, faXmark } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'; diff --git a/components/Ufvk/ShowUfvk.tsx b/components/Ufvk/ShowUfvk.tsx index e4bc03387..5337c1075 100644 --- a/components/Ufvk/ShowUfvk.tsx +++ b/components/Ufvk/ShowUfvk.tsx @@ -1,6 +1,8 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext, useEffect, useState } from 'react'; -import { View, ScrollView, SafeAreaView, Alert, ActivityIndicator } from 'react-native'; +import { View, ScrollView, Alert, ActivityIndicator } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import Button from '../Components/Button'; diff --git a/components/Ufvk/components/ScannerUfvk.tsx b/components/Ufvk/components/ScannerUfvk.tsx index 1de1d2356..7d3199420 100644 --- a/components/Ufvk/components/ScannerUfvk.tsx +++ b/components/Ufvk/components/ScannerUfvk.tsx @@ -7,7 +7,8 @@ import 'moment/locale/es'; import 'moment/locale/pt'; import 'moment/locale/ru'; import Header from '../../Header'; -import { SafeAreaView } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { useTheme } from '@react-navigation/native'; import { ThemeType } from '../../../app/types'; import { Code } from 'react-native-vision-camera'; From 55f58d4fdc1c8b975792e5616e6612a38f1dd5b2 Mon Sep 17 00:00:00 2001 From: JC Date: Thu, 13 Feb 2025 18:37:05 -0700 Subject: [PATCH 04/36] fix: unify safe area to a specific library - fix --- app/LoadingApp/LoadingApp.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/LoadingApp/LoadingApp.tsx b/app/LoadingApp/LoadingApp.tsx index fa4f315b3..f0223883a 100644 --- a/app/LoadingApp/LoadingApp.tsx +++ b/app/LoadingApp/LoadingApp.tsx @@ -647,7 +647,7 @@ export class LoadingAppClass extends Component { + this.unsubscribeNetInfo = NetInfo.addEventListener((state: any) => { const { screen } = this.state; const { isConnected, type, isConnectionExpensive } = this.state.netInfo; if ( From 2acd0865b0a02c4f0e9e13b039e844a13388fca9 Mon Sep 17 00:00:00 2001 From: Juan Carlos Carmona Calvo Date: Fri, 14 Feb 2025 08:32:15 -0700 Subject: [PATCH 05/36] fix: react-native-worklets-core installed for vision-camera - iOS --- ios/ZingoMobile.xcodeproj/project.pbxproj | 77 ++++++++++++----------- package.json | 1 + 2 files changed, 40 insertions(+), 38 deletions(-) diff --git a/ios/ZingoMobile.xcodeproj/project.pbxproj b/ios/ZingoMobile.xcodeproj/project.pbxproj index eed3d96ff..a780346f5 100644 --- a/ios/ZingoMobile.xcodeproj/project.pbxproj +++ b/ios/ZingoMobile.xcodeproj/project.pbxproj @@ -7,8 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 0E31B526D9F16A7915BA4132 /* libPods-ZingoMobile-ZingoMobileTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E0047AEABCFCDF34CBD1244C /* libPods-ZingoMobile-ZingoMobileTests.a */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 1D8EDD3CA2EF2BBAA4532192 /* libPods-ZingoMobile.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 710EF587E672BE1EAB50115C /* libPods-ZingoMobile.a */; }; 1F0338192C48782D00A3FC49 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0338182C48782D00A3FC49 /* Constants.swift */; }; 1F03381A2C49575900A3FC49 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0338182C48782D00A3FC49 /* Constants.swift */; }; 1F0893FF2BA4C4380089FD88 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 1F0893FE2BA4C4380089FD88 /* PrivacyInfo.xcprivacy */; }; @@ -27,7 +27,7 @@ 1FC1E2172BE443270064963B /* ZingoMobileTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FC1E2162BE443270064963B /* ZingoMobileTest.swift */; }; 1FE8E9AC296B85FC004A256B /* BackgroundTasks.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FE8E9AB296B85FC004A256B /* BackgroundTasks.framework */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; - 8D52D5FE9C2F6AF27E08D93E /* libPods-ZingoMobile-ZingoMobileTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C1E8BEABF0398AE84390D9 /* libPods-ZingoMobile-ZingoMobileTests.a */; }; + 91F8F7B99D09D90E9135C387 /* libPods-ZingoMobile.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3CD48E2F45D070FAA89673F8 /* libPods-ZingoMobile.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -43,9 +43,12 @@ /* Begin PBXFileReference section */ 00E356EE1AD99517003FC87E /* ZingoMobileTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ZingoMobileTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0D9896D9881BBFE26496585D /* Pods-ZingoMobile.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZingoMobile.debug.xcconfig"; path = "Target Support Files/Pods-ZingoMobile/Pods-ZingoMobile.debug.xcconfig"; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* Zingo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Zingo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ZingoMobile/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ZingoMobile/Info.plist; sourceTree = ""; }; + 153C8557BF3C046894F65328 /* Pods-ZingoMobile-ZingoMobileTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZingoMobile-ZingoMobileTests.release.xcconfig"; path = "Target Support Files/Pods-ZingoMobile-ZingoMobileTests/Pods-ZingoMobile-ZingoMobileTests.release.xcconfig"; sourceTree = ""; }; + 1752229EEB1E891A6654090B /* Pods-ZingoMobile-ZingoMobileTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZingoMobile-ZingoMobileTests.debug.xcconfig"; path = "Target Support Files/Pods-ZingoMobile-ZingoMobileTests/Pods-ZingoMobile-ZingoMobileTests.debug.xcconfig"; sourceTree = ""; }; 1F0338182C48782D00A3FC49 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; 1F0893FE2BA4C4380089FD88 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 1F5569252BBCB4D900F2CD6C /* RPCModule-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RPCModule-Bridging-Header.h"; sourceTree = ""; }; @@ -60,13 +63,10 @@ 1FA935B62BE474CD00117DF5 /* ZingoMobileTest-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ZingoMobileTest-Bridging-Header.h"; sourceTree = ""; }; 1FC1E2162BE443270064963B /* ZingoMobileTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZingoMobileTest.swift; sourceTree = ""; }; 1FE8E9AB296B85FC004A256B /* BackgroundTasks.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BackgroundTasks.framework; path = System/Library/Frameworks/BackgroundTasks.framework; sourceTree = SDKROOT; }; - 2300F9378F6888F2B352D306 /* Pods-ZingoMobile.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZingoMobile.debug.xcconfig"; path = "Target Support Files/Pods-ZingoMobile/Pods-ZingoMobile.debug.xcconfig"; sourceTree = ""; }; - 5ED82B2DA0E3FC04E11DE053 /* Pods-ZingoMobile-ZingoMobileTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZingoMobile-ZingoMobileTests.release.xcconfig"; path = "Target Support Files/Pods-ZingoMobile-ZingoMobileTests/Pods-ZingoMobile-ZingoMobileTests.release.xcconfig"; sourceTree = ""; }; - 710EF587E672BE1EAB50115C /* libPods-ZingoMobile.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ZingoMobile.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 39C6D93FBB707E7A5F86EB0E /* Pods-ZingoMobile.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZingoMobile.release.xcconfig"; path = "Target Support Files/Pods-ZingoMobile/Pods-ZingoMobile.release.xcconfig"; sourceTree = ""; }; + 3CD48E2F45D070FAA89673F8 /* libPods-ZingoMobile.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ZingoMobile.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ZingoMobile/LaunchScreen.storyboard; sourceTree = ""; }; - 84C1E8BEABF0398AE84390D9 /* libPods-ZingoMobile-ZingoMobileTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ZingoMobile-ZingoMobileTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - C9EDB8C151E21F47B87020D3 /* Pods-ZingoMobile.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZingoMobile.release.xcconfig"; path = "Target Support Files/Pods-ZingoMobile/Pods-ZingoMobile.release.xcconfig"; sourceTree = ""; }; - E78EF16A716A833BA581E4C1 /* Pods-ZingoMobile-ZingoMobileTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZingoMobile-ZingoMobileTests.debug.xcconfig"; path = "Target Support Files/Pods-ZingoMobile-ZingoMobileTests/Pods-ZingoMobile-ZingoMobileTests.debug.xcconfig"; sourceTree = ""; }; + E0047AEABCFCDF34CBD1244C /* libPods-ZingoMobile-ZingoMobileTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ZingoMobile-ZingoMobileTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -77,7 +77,7 @@ files = ( 1FA935B32BE457B100117DF5 /* SystemConfiguration.framework in Frameworks */, 1FA935B22BE4569D00117DF5 /* libuniffi_zingo.a in Frameworks */, - 8D52D5FE9C2F6AF27E08D93E /* libPods-ZingoMobile-ZingoMobileTests.a in Frameworks */, + 0E31B526D9F16A7915BA4132 /* libPods-ZingoMobile-ZingoMobileTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -88,7 +88,7 @@ 1FE8E9AC296B85FC004A256B /* BackgroundTasks.framework in Frameworks */, 1F7D321D2B71D44800D2879C /* SystemConfiguration.framework in Frameworks */, 1F8815602BD31176006490E1 /* libuniffi_zingo.a in Frameworks */, - 1D8EDD3CA2EF2BBAA4532192 /* libPods-ZingoMobile.a in Frameworks */, + 91F8F7B99D09D90E9135C387 /* libPods-ZingoMobile.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -136,8 +136,8 @@ 1F7D321C2B71D44800D2879C /* SystemConfiguration.framework */, 1FE8E9AB296B85FC004A256B /* BackgroundTasks.framework */, ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 710EF587E672BE1EAB50115C /* libPods-ZingoMobile.a */, - 84C1E8BEABF0398AE84390D9 /* libPods-ZingoMobile-ZingoMobileTests.a */, + 3CD48E2F45D070FAA89673F8 /* libPods-ZingoMobile.a */, + E0047AEABCFCDF34CBD1244C /* libPods-ZingoMobile-ZingoMobileTests.a */, ); name = Frameworks; sourceTree = ""; @@ -179,10 +179,10 @@ 8BB7EBE9935B479E64CBB9A8 /* Pods */ = { isa = PBXGroup; children = ( - 2300F9378F6888F2B352D306 /* Pods-ZingoMobile.debug.xcconfig */, - C9EDB8C151E21F47B87020D3 /* Pods-ZingoMobile.release.xcconfig */, - E78EF16A716A833BA581E4C1 /* Pods-ZingoMobile-ZingoMobileTests.debug.xcconfig */, - 5ED82B2DA0E3FC04E11DE053 /* Pods-ZingoMobile-ZingoMobileTests.release.xcconfig */, + 0D9896D9881BBFE26496585D /* Pods-ZingoMobile.debug.xcconfig */, + 39C6D93FBB707E7A5F86EB0E /* Pods-ZingoMobile.release.xcconfig */, + 1752229EEB1E891A6654090B /* Pods-ZingoMobile-ZingoMobileTests.debug.xcconfig */, + 153C8557BF3C046894F65328 /* Pods-ZingoMobile-ZingoMobileTests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -194,12 +194,12 @@ isa = PBXNativeTarget; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ZingoMobileTests" */; buildPhases = ( - E5B348545A1D5DFFD52C9057 /* [CP] Check Pods Manifest.lock */, + DD7B14E346A8CF4A2997D750 /* [CP] Check Pods Manifest.lock */, 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, - 4066914AC5A4EC685DB7A7BB /* [CP] Embed Pods Frameworks */, - 53FEBB0124E2169596DF07DB /* [CP] Copy Pods Resources */, + 51A96719CF62A62F66AA7A69 /* [CP] Embed Pods Frameworks */, + 6AA06244CF71E871BBFE5687 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -215,14 +215,14 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ZingoMobile" */; buildPhases = ( - 5ADB94CDDE911DEC8997BDD5 /* [CP] Check Pods Manifest.lock */, + 97185D709FE5441A1FFE3A45 /* [CP] Check Pods Manifest.lock */, FD10A7F022414F080027D42C /* Start Packager */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 44B0F2CF79E1E255EB526B03 /* [CP] Embed Pods Frameworks */, - 6D5A742C9332D09645768EFA /* [CP] Copy Pods Resources */, + 2022D291A0B3AD248513EA4F /* [CP] Embed Pods Frameworks */, + DC66DC8FFB173D36AC178368 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -306,41 +306,41 @@ shellPath = /bin/sh; shellScript = "set -e\n\nexport NODE_BINARY=$(which node)\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; }; - 4066914AC5A4EC685DB7A7BB /* [CP] Embed Pods Frameworks */ = { + 2022D291A0B3AD248513EA4F /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ZingoMobile-ZingoMobileTests/Pods-ZingoMobile-ZingoMobileTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-ZingoMobile/Pods-ZingoMobile-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ZingoMobile-ZingoMobileTests/Pods-ZingoMobile-ZingoMobileTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-ZingoMobile/Pods-ZingoMobile-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ZingoMobile-ZingoMobileTests/Pods-ZingoMobile-ZingoMobileTests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ZingoMobile/Pods-ZingoMobile-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 44B0F2CF79E1E255EB526B03 /* [CP] Embed Pods Frameworks */ = { + 51A96719CF62A62F66AA7A69 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ZingoMobile/Pods-ZingoMobile-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-ZingoMobile-ZingoMobileTests/Pods-ZingoMobile-ZingoMobileTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ZingoMobile/Pods-ZingoMobile-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-ZingoMobile-ZingoMobileTests/Pods-ZingoMobile-ZingoMobileTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ZingoMobile/Pods-ZingoMobile-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ZingoMobile-ZingoMobileTests/Pods-ZingoMobile-ZingoMobileTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 53FEBB0124E2169596DF07DB /* [CP] Copy Pods Resources */ = { + 6AA06244CF71E871BBFE5687 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -357,7 +357,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ZingoMobile-ZingoMobileTests/Pods-ZingoMobile-ZingoMobileTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 5ADB94CDDE911DEC8997BDD5 /* [CP] Check Pods Manifest.lock */ = { + 97185D709FE5441A1FFE3A45 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -379,7 +379,7 @@ 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; }; - 6D5A742C9332D09645768EFA /* [CP] Copy Pods Resources */ = { + DC66DC8FFB173D36AC178368 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -396,7 +396,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ZingoMobile/Pods-ZingoMobile-resources.sh\"\n"; showEnvVarsInLog = 0; }; - E5B348545A1D5DFFD52C9057 /* [CP] Check Pods Manifest.lock */ = { + DD7B14E346A8CF4A2997D750 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -477,7 +477,7 @@ /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E78EF16A716A833BA581E4C1 /* Pods-ZingoMobile-ZingoMobileTests.debug.xcconfig */; + baseConfigurationReference = 1752229EEB1E891A6654090B /* Pods-ZingoMobile-ZingoMobileTests.debug.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; DEVELOPMENT_TEAM = 788KRST4S8; @@ -512,7 +512,7 @@ }; 00E356F71AD99517003FC87E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5ED82B2DA0E3FC04E11DE053 /* Pods-ZingoMobile-ZingoMobileTests.release.xcconfig */; + baseConfigurationReference = 153C8557BF3C046894F65328 /* Pods-ZingoMobile-ZingoMobileTests.release.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; COPY_PHASE_STRIP = NO; @@ -544,7 +544,7 @@ }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2300F9378F6888F2B352D306 /* Pods-ZingoMobile.debug.xcconfig */; + baseConfigurationReference = 0D9896D9881BBFE26496585D /* Pods-ZingoMobile.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; @@ -585,7 +585,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C9EDB8C151E21F47B87020D3 /* Pods-ZingoMobile.release.xcconfig */; + baseConfigurationReference = 39C6D93FBB707E7A5F86EB0E /* Pods-ZingoMobile.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; @@ -699,6 +699,7 @@ ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; USE_HERMES = true; }; name = Debug; diff --git a/package.json b/package.json index bb6e9971e..a17e4a4ad 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "react-native-svg-charts": "^5.4.0", "react-native-tab-view": "^3.3.0", "react-native-vision-camera": "^4.6.3", + "react-native-worklets-core": "^1.5.0", "url-parse": "^1.5.10" }, "devDependencies": { From c544ce09328ee856258e5d129fd36f4e148208d0 Mon Sep 17 00:00:00 2001 From: dorianvp Date: Fri, 14 Feb 2025 13:19:27 -0300 Subject: [PATCH 06/36] chore(deps): Update patch files --- ...code-svg+6.3.12.patch => react-native-qrcode-svg+6.3.14.patch} | 0 ...ics+1.5.2.patch => react-native-simple-biometrics+1.5.3.patch} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename patches/{react-native-qrcode-svg+6.3.12.patch => react-native-qrcode-svg+6.3.14.patch} (100%) rename patches/{react-native-simple-biometrics+1.5.2.patch => react-native-simple-biometrics+1.5.3.patch} (100%) diff --git a/patches/react-native-qrcode-svg+6.3.12.patch b/patches/react-native-qrcode-svg+6.3.14.patch similarity index 100% rename from patches/react-native-qrcode-svg+6.3.12.patch rename to patches/react-native-qrcode-svg+6.3.14.patch diff --git a/patches/react-native-simple-biometrics+1.5.2.patch b/patches/react-native-simple-biometrics+1.5.3.patch similarity index 100% rename from patches/react-native-simple-biometrics+1.5.2.patch rename to patches/react-native-simple-biometrics+1.5.3.patch From 1808d5e7b1d8176a0955bd0746fcc1e327751aa1 Mon Sep 17 00:00:00 2001 From: dorianvp Date: Fri, 14 Feb 2025 13:20:11 -0300 Subject: [PATCH 07/36] chore(deps): Replace `react-native-svg-charts` with `react-native-gifted-charts` --- app/translations/en.json | 70 +++++++------------------------ components/Insight/Insight.tsx | 75 +++++++++++++++------------------- package.json | 5 ++- 3 files changed, 50 insertions(+), 100 deletions(-) diff --git a/app/translations/en.json b/app/translations/en.json index c89053116..9efaf7da5 100644 --- a/app/translations/en.json +++ b/app/translations/en.json @@ -78,7 +78,7 @@ "txtcopied": "Text copied to Clipboard", "insight": { "title": "Financial Insight", - "no-data": "There is no data in your Wallet that fit the graph selected.", + "no-data": "There is no data in your Wallet that fits the graph selected.", "sent": "Sent", "sends": "# sends", "memobytes": "# bytes", @@ -361,7 +361,7 @@ "uk": "UK", "select-placeholder": "Choose a Server...", "value-language-ru": "Russian", - "walletkeyssaved" : "The last Wallet Recovery Info stored safely in the device.", + "walletkeyssaved": "The last Wallet Recovery Info stored safely in the device.", "walletkeyswarning": "This is an experimental feature, that depends on the security of unaudited code to store your seed-phrase. Please do not use it with seeds that control significant funds!" }, "info": { @@ -388,33 +388,12 @@ }, "seed": { "buttontexts": { - "new": [ - "I have saved \n the seed" - ], - "change": [ - "", - "Open New", - "You really want \n to change your \n actual wallet", - "Are you certain?" - ], - "server": [ - "", - "Change Server", - "You really want \n to change your \n actual server", - "Are you certain?" - ], - "view": [ - "I have saved \n the seed" - ], - "restore": [ - "Restore Wallet" - ], - "backup": [ - "", - "Restore", - "You really want \n to restore your \n backup wallet", - "Are you certain?" - ] + "new": ["I have saved \n the seed"], + "change": ["", "Open New", "You really want \n to change your \n actual wallet", "Are you certain?"], + "server": ["", "Change Server", "You really want \n to change your \n actual server", "Are you certain?"], + "view": ["I have saved \n the seed"], + "restore": ["Restore Wallet"], + "backup": ["", "Restore", "You really want \n to restore your \n backup wallet", "Are you certain?"] }, "title": "Seed", "new": "New", @@ -641,33 +620,12 @@ }, "ufvk": { "buttontexts": { - "new": [ - "I have saved \n the Viewing Key" - ], - "change": [ - "", - "Open New", - "You really want \n to change your \n actual wallet", - "Are you certain?" - ], - "server": [ - "", - "Change Server", - "You really want \n to change your \n actual server", - "Are you certain?" - ], - "view": [ - "I have saved \n the Viewing Key" - ], - "restore": [ - "Restore Wallet" - ], - "backup": [ - "", - "Restore", - "You really want \n to restore your \n backup wallet", - "Are you certain?" - ] + "new": ["I have saved \n the Viewing Key"], + "change": ["", "Open New", "You really want \n to change your \n actual wallet", "Are you certain?"], + "server": ["", "Change Server", "You really want \n to change your \n actual server", "Are you certain?"], + "view": ["I have saved \n the Viewing Key"], + "restore": ["Restore Wallet"], + "backup": ["", "Restore", "You really want \n to restore your \n backup wallet", "Are you certain?"] }, "privkey": "Spending/Private ", "viewkey": "Viewing Key ", diff --git a/components/Insight/Insight.tsx b/components/Insight/Insight.tsx index db633895a..74be29d54 100644 --- a/components/Insight/Insight.tsx +++ b/components/Insight/Insight.tsx @@ -4,8 +4,8 @@ import { View, ScrollView, TouchableOpacity, ActivityIndicator, Dimensions } fro import { SafeAreaView } from 'react-native-safe-area-context'; import { useTheme } from '@react-navigation/native'; -import { PieChart } from 'react-native-svg-charts'; -import { Circle, G, Line, Text } from 'react-native-svg'; +import { PieChart, pieDataItem } from 'react-native-gifted-charts'; +import { Text as SvgText } from 'react-native-svg'; import { faQrcode } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'; import Clipboard from '@react-native-clipboard/clipboard'; @@ -33,7 +33,7 @@ type DataType = { key: string; address: string; tag: string; -}; +} & pieDataItem; type sliceType = { labelCentroid: number[]; @@ -45,37 +45,6 @@ type LabelProps = { slices?: sliceType[]; }; -const Labels: React.FunctionComponent = props => { - const { slices } = props; - const totalValue = slices ? slices.reduce((acc, curr) => acc + curr.data.value, 0) : 0; - - return ( - <> - {!!slices && - slices.map((slice: sliceType, index: number) => { - const { labelCentroid, pieCentroid, data } = slice; - const percent = (100 * data.value) / totalValue; - - return ( - - - - - {getPercent(percent)} - - - ); - })} - - ); -}; - const getPercent = (percent: number) => { return (percent < 1 ? '<1' : percent < 100 && percent >= 99 ? '99' : percent.toFixed(0)) + '%'; }; @@ -146,6 +115,10 @@ const Insight: React.FunctionComponent = ({ closeModal, setPrivacy address: item.address, tag: item.tag, svg: { fill: item.address === 'fee' ? colors.zingo : randomColors[index] }, + color: item.address === 'fee' ? colors.zingo : randomColors[index], + labelLineConfig: { + color: item.address === 'fee' ? colors.zingo : randomColors[index], + }, key: `pie-${index}`, }; }); @@ -366,14 +339,32 @@ const Insight: React.FunctionComponent = ({ closeModal, setPrivacy {loading ? ( ) : ( - - - + + ( + + {item?.value} + + )} + textSize={18} + textBackgroundColor={colors.background} + data={pieAmounts} + innerRadius={dimensions.width * 0.09} + /> + )} diff --git a/package.json b/package.json index a17e4a4ad..3b05b3f5c 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,9 @@ "react-native-device-info": "^11.1.0", "react-native-fs": "^2.20.0", "react-native-gesture-handler": "^2.23.1", + "react-native-gifted-charts": "^1.4.56", "react-native-keychain": "^9.2.2", + "react-native-linear-gradient": "^2.8.3", "react-native-localize": "^3.1.0", "react-native-option-menu": "^1.1.3", "react-native-pager-view": "^6.0.1", @@ -60,7 +62,7 @@ "react-native-screens": "^4.6.0", "react-native-simple-biometrics": "^1.5.2", "react-native-snackbar": "^2.6.2", - "react-native-svg-charts": "^5.4.0", + "react-native-svg": "^15.11.1", "react-native-tab-view": "^3.3.0", "react-native-vision-camera": "^4.6.3", "react-native-worklets-core": "^1.5.0", @@ -85,7 +87,6 @@ "@types/react": "^18.2.6", "@types/react-native": "^0.70.6", "@types/react-native-keychain": "^3.1.0", - "@types/react-native-svg-charts": "^5.0.16", "@types/url-parse": "^1.4.8", "babel-jest": "^29.6.3", "babel-plugin-dynamic-import-node": "^2.3.3", From 91187f1c7503997afa8d4db5c756ef0674649000 Mon Sep 17 00:00:00 2001 From: JC Date: Fri, 14 Feb 2025 09:52:07 -0700 Subject: [PATCH 08/36] fix: safeareaprovider added - iOS fix --- App.tsx | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/App.tsx b/App.tsx index 7161ed7ed..7085893c3 100644 --- a/App.tsx +++ b/App.tsx @@ -1,6 +1,6 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useState } from 'react'; -import { SafeAreaView } from 'react-native-safe-area-context'; +import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context'; import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; @@ -90,25 +90,27 @@ const App: React.FunctionComponent = () => { //console.log('render App - 1'); return ( - - - - - {props => } - - - {props => } - - - - + + + + + + {props => } + + + {props => } + + + + + ); }; From f33a2808ad9544b827e900dcc3c9e12de8e675c4 Mon Sep 17 00:00:00 2001 From: JC Date: Fri, 14 Feb 2025 09:59:35 -0700 Subject: [PATCH 09/36] fix: snapshots updated & code fix --- .../CircularProgress.snapshot.tsx.snap | 26 +++++++++---------- .../Components.snapshot.tsx.snap | 12 ++++----- .../__snapshots__/Scanner.snapshot.tsx.snap | 10 ++++++- components/Insight/Insight.tsx | 10 ------- 4 files changed, 28 insertions(+), 30 deletions(-) diff --git a/__tests__/__snapshots__/CircularProgress.snapshot.tsx.snap b/__tests__/__snapshots__/CircularProgress.snapshot.tsx.snap index 41c869119..6ce0188ad 100644 --- a/__tests__/__snapshots__/CircularProgress.snapshot.tsx.snap +++ b/__tests__/__snapshots__/CircularProgress.snapshot.tsx.snap @@ -9,8 +9,8 @@ exports[`Component CircularProgress - test CircularProgress - snapshot 1`] = ` } > diff --git a/__tests__/__snapshots__/Components.snapshot.tsx.snap b/__tests__/__snapshots__/Components.snapshot.tsx.snap index 63a3c1977..e03d1aa08 100644 --- a/__tests__/__snapshots__/Components.snapshot.tsx.snap +++ b/__tests__/__snapshots__/Components.snapshot.tsx.snap @@ -113,7 +113,7 @@ exports[`Component Components - test CurrencyAmount Normal Privacy - snapshot 1` } accessible={true} collapsable={false} - focusable={true} + focusable={false} onClick={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} @@ -252,8 +252,8 @@ exports[`Component Components - test ZecAmount High Privacy - snapshot 1`] = ` > { return (percent < 1 ? '<1' : percent < 100 && percent >= 99 ? '99' : percent.toFixed(0)) + '%'; }; From 4101aa9141b30e06a075602d8c66a796e0688b78 Mon Sep 17 00:00:00 2001 From: Juan Carlos Carmona Calvo Date: Fri, 14 Feb 2025 10:51:00 -0700 Subject: [PATCH 10/36] fix: iOS - adjusting safe area with the new library --- app/LoadedApp/LoadedApp.tsx | 22 +- .../components/ComputingTxContent.tsx | 52 +- app/LoadedApp/components/Menu.tsx | 264 ++--- app/LoadingApp/LoadingApp.tsx | 158 +-- app/LoadingApp/components/Launching.tsx | 242 ++--- components/About/About.tsx | 70 +- components/AddressBook/AddressBook.tsx | 328 +++---- components/Components/Scanner.tsx | 30 +- .../components/ValueTransferDetail.tsx | 530 ++++++----- components/Info/Info.tsx | 132 +-- components/Insight/Insight.tsx | 282 +++--- components/Memo/Memo.tsx | 194 ++-- components/Messages/MessagesAddress.tsx | 42 +- components/Messages/MessagesAll.tsx | 36 +- .../Messages/components/ContactList.tsx | 612 ++++++------ components/Pools/Pools.tsx | 328 +++---- components/PrivKey/PrivKey.tsx | 140 +-- components/Rescan/Rescan.tsx | 74 +- components/Seed/Seed.tsx | 290 +++--- components/Send/components/Confirm.tsx | 294 +++--- components/Send/components/ScannerAddress.tsx | 40 +- components/Settings/Settings.tsx | 900 +++++++++--------- components/SyncReport/SyncReport.tsx | 816 ++++++++-------- components/Ufvk/ImportUfvk.tsx | 304 +++--- components/Ufvk/ShowUfvk.tsx | 136 +-- components/Ufvk/components/ScannerUfvk.tsx | 40 +- 26 files changed, 3206 insertions(+), 3150 deletions(-) diff --git a/app/LoadedApp/LoadedApp.tsx b/app/LoadedApp/LoadedApp.tsx index 30bf483ba..e71eade54 100644 --- a/app/LoadedApp/LoadedApp.tsx +++ b/app/LoadedApp/LoadedApp.tsx @@ -14,7 +14,7 @@ import { TouchableOpacity, Dimensions, } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; +import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'; import { faList, faUpload, faDownload, faCog, faRefresh } from '@fortawesome/free-solid-svg-icons'; @@ -353,15 +353,17 @@ export default function LoadedApp(props: LoadedAppProps) { if (loading) { return ( - - - + + + + + ); } else { return ( diff --git a/app/LoadedApp/components/ComputingTxContent.tsx b/app/LoadedApp/components/ComputingTxContent.tsx index 52f18905e..da1e69775 100644 --- a/app/LoadedApp/components/ComputingTxContent.tsx +++ b/app/LoadedApp/components/ComputingTxContent.tsx @@ -1,7 +1,7 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext } from 'react'; import { ActivityIndicator, View } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; +import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context'; import { useTheme } from '@react-navigation/native'; import RegText from '../../../components/Components/RegText'; @@ -20,33 +20,35 @@ const ComputingTxContent: React.FunctionComponent = () => { moment.locale(language); return ( - -
- + - {translate('loadedapp.computingtx') as string} - - {translate('wait') as string} - - +
+ + {translate('loadedapp.computingtx') as string} + + {translate('wait') as string} + + + ); }; diff --git a/app/LoadedApp/components/Menu.tsx b/app/LoadedApp/components/Menu.tsx index c925c3b6b..e0bd03964 100644 --- a/app/LoadedApp/components/Menu.tsx +++ b/app/LoadedApp/components/Menu.tsx @@ -1,7 +1,7 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useContext } from 'react'; import { ScrollView, View, Text, Dimensions } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; +import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context'; import RegText from '../../../components/Components/RegText'; @@ -75,160 +75,162 @@ const Menu: React.FunctionComponent = ({ onItemSelected, closeDrawer }; return ( - - + - - {translate('loadedapp.options') as string} - - - - - onItemSelectedWrapper(MenuItemEnum.About)} style={item}> - {translate('loadedapp.about') as string} + + + {translate('loadedapp.options') as string} + - {mode !== ModeEnum.basic && selectServer !== SelectServerEnum.offline && ( - onItemSelectedWrapper(MenuItemEnum.Info)} style={item}> - {translate('loadedapp.info') as string} + + onItemSelectedWrapper(MenuItemEnum.About)} style={item}> + {translate('loadedapp.about') as string} - )} - onItemSelectedWrapper(MenuItemEnum.Settings)} style={item}> - {translate('loadedapp.settings') as string} - - - onItemSelectedWrapper(MenuItemEnum.Chats)} - style={{ ...item, color: colors.primary }}> - {translate('messages.title-chats') as string} - - - onItemSelectedWrapper(MenuItemEnum.AddressBook)} - style={item}> - {translate('loadedapp.addressbook') as string} - + {mode !== ModeEnum.basic && selectServer !== SelectServerEnum.offline && ( + onItemSelectedWrapper(MenuItemEnum.Info)} style={item}> + {translate('loadedapp.info') as string} + + )} - {!(mode === ModeEnum.basic && valueTransfersTotal !== null && valueTransfersTotal === 0) && ( - onItemSelectedWrapper(MenuItemEnum.WalletSeedUfvk)} - style={item}> - {readOnly - ? mode === ModeEnum.basic - ? (translate('loadedapp.walletufvk-basic') as string) - : (translate('loadedapp.walletufvk') as string) - : mode === ModeEnum.basic - ? (translate('loadedapp.walletseed-basic') as string) - : (translate('loadedapp.walletseed') as string)} + onItemSelectedWrapper(MenuItemEnum.Settings)} style={item}> + {translate('loadedapp.settings') as string} - )} - {mode !== ModeEnum.basic && rescanMenu && selectServer !== SelectServerEnum.offline && ( - onItemSelectedWrapper(MenuItemEnum.Rescan)} style={item}> - {translate('loadedapp.rescanwallet') as string} + onItemSelectedWrapper(MenuItemEnum.Chats)} + style={{ ...item, color: colors.primary }}> + {translate('messages.title-chats') as string} - )} - {mode !== ModeEnum.basic && selectServer !== SelectServerEnum.offline && ( onItemSelectedWrapper(MenuItemEnum.SyncReport)} + testID="menu.addressbook" + onPress={() => onItemSelectedWrapper(MenuItemEnum.AddressBook)} style={item}> - {translate('loadedapp.report') as string} + {translate('loadedapp.addressbook') as string} - )} - {mode !== ModeEnum.basic && ( - onItemSelectedWrapper(MenuItemEnum.FundPools)} style={item}> - {translate('loadedapp.fundpools') as string} - - )} + {!(mode === ModeEnum.basic && valueTransfersTotal !== null && valueTransfersTotal === 0) && ( + onItemSelectedWrapper(MenuItemEnum.WalletSeedUfvk)} + style={item}> + {readOnly + ? mode === ModeEnum.basic + ? (translate('loadedapp.walletufvk-basic') as string) + : (translate('loadedapp.walletufvk') as string) + : mode === ModeEnum.basic + ? (translate('loadedapp.walletseed-basic') as string) + : (translate('loadedapp.walletseed') as string)} + + )} - {!(mode === ModeEnum.basic && valueTransfersTotal !== null && valueTransfersTotal === 0) && ( - onItemSelectedWrapper(MenuItemEnum.Insight)} style={item}> - {translate('loadedapp.insight') as string} - - )} + {mode !== ModeEnum.basic && rescanMenu && selectServer !== SelectServerEnum.offline && ( + onItemSelectedWrapper(MenuItemEnum.Rescan)} style={item}> + {translate('loadedapp.rescanwallet') as string} + + )} - {mode !== ModeEnum.basic && netInfo.isConnected && selectServer !== SelectServerEnum.offline && ( - onItemSelectedWrapper(MenuItemEnum.ChangeWallet)} - style={item}> - {translate('loadedapp.changewallet') as string} - - )} + {mode !== ModeEnum.basic && selectServer !== SelectServerEnum.offline && ( + onItemSelectedWrapper(MenuItemEnum.SyncReport)} + style={item}> + {translate('loadedapp.report') as string} + + )} - {mode !== ModeEnum.basic && ( - onItemSelectedWrapper(MenuItemEnum.RestoreWalletBackup)} - style={item}> - {translate('loadedapp.restorebackupwallet') as string} - - )} - {mode === ModeEnum.basic && - valueTransfersTotal !== null && - valueTransfersTotal === 0 && - netInfo.isConnected && - selectServer !== SelectServerEnum.offline && ( + {mode !== ModeEnum.basic && ( + onItemSelectedWrapper(MenuItemEnum.FundPools)} style={item}> + {translate('loadedapp.fundpools') as string} + + )} + + {!(mode === ModeEnum.basic && valueTransfersTotal !== null && valueTransfersTotal === 0) && ( + onItemSelectedWrapper(MenuItemEnum.Insight)} style={item}> + {translate('loadedapp.insight') as string} + + )} + + {mode !== ModeEnum.basic && netInfo.isConnected && selectServer !== SelectServerEnum.offline && ( onItemSelectedWrapper(MenuItemEnum.LoadWalletFromSeed)} + testID="menu.changewallet" + onPress={() => onItemSelectedWrapper(MenuItemEnum.ChangeWallet)} style={item}> - {translate('loadedapp.loadwalletfromseed-basic') as string} + {translate('loadedapp.changewallet') as string} )} - {mode === ModeEnum.basic && !readOnly && selectServer !== SelectServerEnum.offline && ( - onItemSelectedWrapper(MenuItemEnum.TipZingoLabs)} - style={item}> - {translate('loadedapp.tipzingolabs-basic') as string} - - )} - {mode !== ModeEnum.basic && !readOnly && selectServer !== SelectServerEnum.offline && ( - onItemSelectedWrapper(MenuItemEnum.VoteForNym)} - style={item}> - {translate('loadedapp.votefornym') as string} + + {mode !== ModeEnum.basic && ( + onItemSelectedWrapper(MenuItemEnum.RestoreWalletBackup)} + style={item}> + {translate('loadedapp.restorebackupwallet') as string} + + )} + {mode === ModeEnum.basic && + valueTransfersTotal !== null && + valueTransfersTotal === 0 && + netInfo.isConnected && + selectServer !== SelectServerEnum.offline && ( + onItemSelectedWrapper(MenuItemEnum.LoadWalletFromSeed)} + style={item}> + {translate('loadedapp.loadwalletfromseed-basic') as string} + + )} + {mode === ModeEnum.basic && !readOnly && selectServer !== SelectServerEnum.offline && ( + onItemSelectedWrapper(MenuItemEnum.TipZingoLabs)} + style={item}> + {translate('loadedapp.tipzingolabs-basic') as string} + + )} + {mode !== ModeEnum.basic && !readOnly && selectServer !== SelectServerEnum.offline && ( + onItemSelectedWrapper(MenuItemEnum.VoteForNym)} + style={item}> + {translate('loadedapp.votefornym') as string} + + )} + onItemSelectedWrapper(MenuItemEnum.Support)} style={item}> + {translate('loadedapp.support') as string} - )} - onItemSelectedWrapper(MenuItemEnum.Support)} style={item}> - {translate('loadedapp.support') as string} - + + + + Version : + {translate('version') as string} + {`${translate('settings.mode')}${translate( + `settings.value-mode-${mode}`, + )}`} - - - Version : - {translate('version') as string} - {`${translate('settings.mode')}${translate( - `settings.value-mode-${mode}`, - )}`} - - + + ); }; diff --git a/app/LoadingApp/LoadingApp.tsx b/app/LoadingApp/LoadingApp.tsx index f0223883a..965eed05f 100644 --- a/app/LoadingApp/LoadingApp.tsx +++ b/app/LoadingApp/LoadingApp.tsx @@ -9,7 +9,7 @@ import { NativeEventSubscription, Platform, } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; +import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context'; import Clipboard from '@react-native-clipboard/clipboard'; import { useTheme } from '@react-navigation/native'; @@ -275,15 +275,17 @@ export default function LoadingApp(props: LoadingAppProps) { if (loading) { return ( - - - + + + + + ); } else { return ( @@ -1315,75 +1317,77 @@ export class LoadingAppClass extends Component - - - - {screen === 0 && ( - { - this.setState({ biometricsFailed: false }, () => this.componentDidMount()); - }} - /> - )} - {screen === 1 && ( - - )} - {screen === 2 && wallet && ( - this.navigateToLoadedApp()}> - this.navigateToLoadedApp()} - onClickCancel={() => this.navigateToLoadedApp()} - action={SeedActionEnum.new} - setPrivacyOption={this.setPrivacyOption} + + + + + {screen === 0 && ( + { + this.setState({ biometricsFailed: false }, () => this.componentDidMount()); + }} /> - - )} - {screen === 3 && ( - this.setState({ screen: 1 })}> - this.doRestore(s, b)} - onClickCancel={() => this.setState({ screen: 1 })} + )} + {screen === 1 && ( + - - )} - + )} + {screen === 2 && wallet && ( + this.navigateToLoadedApp()}> + this.navigateToLoadedApp()} + onClickCancel={() => this.navigateToLoadedApp()} + action={SeedActionEnum.new} + setPrivacyOption={this.setPrivacyOption} + /> + + )} + {screen === 3 && ( + this.setState({ screen: 1 })}> + this.doRestore(s, b)} + onClickCancel={() => this.setState({ screen: 1 })} + /> + + )} + + ); } diff --git a/app/LoadingApp/components/Launching.tsx b/app/LoadingApp/components/Launching.tsx index 81fea9338..cfa1a61f6 100644 --- a/app/LoadingApp/components/Launching.tsx +++ b/app/LoadingApp/components/Launching.tsx @@ -1,7 +1,7 @@ /* eslint-disable react-native/no-inline-styles */ import React from 'react'; import { Text, View, ActivityIndicator } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; +import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context'; import { useTheme } from '@react-navigation/native'; @@ -21,142 +21,144 @@ const Launching: React.FunctionComponent = props => { const { colors } = useTheme() as unknown as ThemeType; return ( - - + - - {props.translate('zingo') as string} - - {props.translate('version') as string} - - - {!!props.message && ( - - {props.message} + + + {props.translate('zingo') as string} - )} - {props.biometricsFailed ? ( - <> - - {props.translate('biometricsfailed-title') as string} - - - {props.translate('biometricsfailed-body') as string} - - - {props.translate('biometricsfailed-footer') as string} - -