diff --git a/.eslintrc.js b/.eslintrc.js index dcf0be086..9dd57a791 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,6 +1,6 @@ module.exports = { root: true, - extends: '@react-native-community', + extends: '@react-native', parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint'], overrides: [ diff --git a/.gitignore b/.gitignore index c86b2822a..0cb283ee8 100644 --- a/.gitignore +++ b/.gitignore @@ -62,4 +62,7 @@ yarn-error.log # Temporary files created by Metro to check the health of the file watcher .metro-health-check* +# testing +/coverage + .env \ No newline at end of file diff --git a/.node-version b/.node-version deleted file mode 100644 index 25bf17fc5..000000000 --- a/.node-version +++ /dev/null @@ -1 +0,0 @@ -18 \ No newline at end of file diff --git a/Gemfile b/Gemfile index 1142b1b20..8105b960f 100644 --- a/Gemfile +++ b/Gemfile @@ -3,4 +3,4 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version ruby '>= 2.6.10' -gem 'cocoapods', '>= 1.11.3' +gem 'cocoapods', '~> 1.12' diff --git a/__tests__/App-test.tsx b/__tests__/App-test.tsx index f83288be7..1002a812a 100644 --- a/__tests__/App-test.tsx +++ b/__tests__/App-test.tsx @@ -5,6 +5,9 @@ import 'react-native'; import React from 'react'; +// Note: import explicitly to use the types shiped with jest. +import { it } from '@jest/globals'; + // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; import AppNew from '../src/AppNew'; diff --git a/android/app/build.gradle b/android/app/build.gradle index 77f79f423..1772e684c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,8 +1,6 @@ apply plugin: "com.android.application" apply plugin: "com.facebook.react" -import com.android.build.OutputFile - /** * This is the configuration block to customize your React Native Android app. * By default you don't need to apply any configuration, just uncomment the lines you need. @@ -13,8 +11,8 @@ react { // 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 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 */ @@ -49,14 +47,6 @@ react { // hermesFlags = ["-O", "-output-source-map"] } -/** - * Set this to true to create four separate APKs instead of one, - * one for each native architecture. This is useful if you don't - * use App Bundles (https://developer.android.com/guide/app-bundle/) - * and want to have separate APKs to upload to the Play Store. - */ -def enableSeparateBuildPerCPUArchitecture = false - /** * Set this to true to Run Proguard on Release builds to minify the Java bytecode. */ @@ -74,15 +64,6 @@ def enableProguardInReleaseBuilds = false * this variant is about 6MiB larger per architecture than default. */ def jscFlavor = 'org.webkit:android-jsc:+' -/** - * Private function to get the list of Native Architectures you want to build. - * This reads the value from reactNativeArchitectures in your gradle.properties - * file and works together with the --active-arch-only flag of react-native run-android. - */ -def reactNativeArchitectures() { - def value = project.getProperties().get("reactNativeArchitectures") - return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] -} android { ndkVersion rootProject.ext.ndkVersion @@ -98,14 +79,6 @@ android { missingDimensionStrategy 'react-native-camera', 'general' } - splits { - abi { - reset() - enable enableSeparateBuildPerCPUArchitecture - universalApk false // If true, also generate a universal APK - include (*reactNativeArchitectures()) - } - } signingConfigs { debug { storeFile file('debug.keystore') @@ -135,22 +108,6 @@ android { } } - // applicationVariants are e.g. debug, release - applicationVariants.all { variant -> - variant.outputs.each { output -> - // For each separate APK per architecture, set a unique version code as described here: - // https://developer.android.com/studio/build/configure-apk-splits.html - // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. - def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] - def abi = output.getFilter(OutputFile.ABI) - if (abi != null) { // null for the universal-debug, universal-release variants - output.versionCodeOverride = - defaultConfig.versionCode * 1000 + versionCodes.get(abi) - } - - } - } - sourceSets { main { assets.srcDirs = ['src/main/assets', '../../html'] } } @@ -176,8 +133,6 @@ dependencies { // The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android") - implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0") - debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { exclude group:'com.squareup.okhttp3', module:'okhttp' diff --git a/android/app/src/main/java/app/subwallet/mobile/MainActivity.java b/android/app/src/main/java/app/subwallet/mobile/MainActivity.java index a717703cc..5e9214598 100644 --- a/android/app/src/main/java/app/subwallet/mobile/MainActivity.java +++ b/android/app/src/main/java/app/subwallet/mobile/MainActivity.java @@ -36,9 +36,6 @@ protected ReactActivityDelegate createReactActivityDelegate() { this, getMainComponentName(), // If you opted-in for the New Architecture, we enable the Fabric Renderer. - DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled - // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18). - DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled - ); + DefaultNewArchitectureEntryPoint.getFabricEnabled()); } } diff --git a/android/app/src/main/res/drawable/rn_edit_text_material.xml b/android/app/src/main/res/drawable/rn_edit_text_material.xml index f35d99620..73b37e4d9 100644 --- a/android/app/src/main/res/drawable/rn_edit_text_material.xml +++ b/android/app/src/main/res/drawable/rn_edit_text_material.xml @@ -20,7 +20,7 @@ android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"> -