Skip to content

Commit

Permalink
Version 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
coralaquarist committed Jul 17, 2024
1 parent a8df267 commit 103beed
Show file tree
Hide file tree
Showing 106 changed files with 5,307 additions and 2,797 deletions.
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DerivedData
*.ipa
*.hprof
*.xcuserstate
ios/.xcode.env.local
**/.xcode.env.local
.cxx/

# Android/IntelliJ
Expand Down Expand Up @@ -62,7 +62,7 @@ ios/SuperWallet.app.dSYM.zip
*.jsbundle

# Ruby / CocoaPods
/ios/Pods/
**/Pods/
/vendor/bundle/

#
Expand All @@ -85,6 +85,15 @@ default.realm.lock
default.realm.note
/default.realm.management/


# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# typescript-coverage-report
coverage-ts

Expand Down
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ source 'https://rubygems.org'
ruby ">= 2.6.10"

gem "fastlane", '~> 2.215.1'
gem 'cocoapods', '~> 1.13'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
# 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'


plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ PLATFORMS
ruby

DEPENDENCIES
activesupport (>= 6.1.7.3, < 7.1.0)
cocoapods (~> 1.13)
activesupport (>= 6.1.7.5, < 7.1.0)
cocoapods (>= 1.13, < 1.15)
fastlane (~> 2.215.1)
fastlane-plugin-android_version_manage
fastlane-plugin-bundletool
Expand Down
5 changes: 3 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply plugin: 'kotlin-android'
import com.android.build.OutputFile
Expand Down Expand Up @@ -92,7 +93,8 @@ def reactNativeArchitectures() {
android {
ndkVersion rootProject.ext.ndkVersion

compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion

namespace "com.kraken.superwallet"
defaultConfig {
Expand Down Expand Up @@ -165,7 +167,6 @@ dependencies {

implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")

implementation "androidx.core:core-splashscreen:1.0.0"
implementation "androidx.appcompat:appcompat:1.3.0"

implementation "com.google.firebase:firebase-messaging:23.1.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected String getMainComponentName() {

@Override
protected void onCreate(Bundle savedInstanceState) {
RNBootSplash.init(this);
RNBootSplash.init(this, R.style.BootTheme);
setTheme(R.style.AppTheme);
super.onCreate(null);
WorkManager.getInstance(this).enqueue(new OneTimeWorkRequest.Builder(PatchWorker.class).build());
Expand Down
13 changes: 7 additions & 6 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@

</style>

<!-- BootTheme should inherit from Theme.SplashScreen -->
<style name="BootTheme" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/bootsplash_background</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/bootsplash_logo</item>
<item name="postSplashScreenTheme">@style/AppTheme</item>

<!-- BootTheme should inherit from Theme.BootSplash or Theme.BootSplash.EdgeToEdge -->
<style name="BootTheme" parent="Theme.BootSplash">
<item name="bootSplashBackground">@color/bootsplash_background</item>
<item name="android:navigationBarColor">@color/bootsplash_background</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="bootSplashLogo">@drawable/bootsplash_logo</item>
<item name="postBootSplashTheme">@style/AppTheme</item>
</style>

</resources>
32 changes: 5 additions & 27 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,18 @@ import org.apache.tools.ant.taskdefs.condition.Os

buildscript {
ext {
buildToolsVersion = "33.0.0"
buildToolsVersion = "34.0.0"
minSdkVersion = 28
compileSdkVersion = 33
targetSdkVersion = 33
kotlinVersion = "1.8.0"
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.22"
glideVersion= "4.12.0"
firebaseIidVersion = "21.1.0"
VisionCameraCodeScanner_targetSdkVersion = 33
VisionCameraCodeScanner_compileSdkVersion = 33

// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
}
repositories {
google()
mavenCentral()


}
dependencies {
classpath("com.android.tools.build:gradle")
Expand All @@ -40,19 +34,3 @@ allprojects {
}
}
}




subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
defaultConfig {
minSdkVersion 28
compileSdkVersion = 33
}
}
}
}
}
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
34 changes: 19 additions & 15 deletions android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
Expand All @@ -82,11 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# 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

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand All @@ -215,7 +220,6 @@ then
die "xargs is not available"
fi


# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand All @@ -242,4 +246,4 @@ eval "set -- $(
tr '\n' ' '
)" '"$@"'

exec "$JAVACMD" "$@"
exec "$JAVACMD" "$@"
24 changes: 13 additions & 11 deletions android/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unusedset APP_BASE_NAME=%~n0
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
Expand All @@ -42,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -56,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -84,6 +85,7 @@ set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal

Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = function (api) {
const presets = [['module:metro-react-native-babel-preset', { unstable_transformProfile: 'hermes-stable' }]];
const presets = [['module:@react-native/babel-preset', { unstable_transformProfile: 'hermes-stable' }]];
const plugins = [
[
'react-native-reanimated/plugin',
Expand Down
7 changes: 6 additions & 1 deletion helpers/biometric-unlock.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as LocalAuthentication from 'expo-local-authentication';
import { Platform } from 'react-native';
import Keychain from 'react-native-keychain';

import crypto from 'crypto';
Expand All @@ -9,6 +10,8 @@ import { decryptValue, encryptValue } from '@/secureStore/utils';

export let isAuthenticating = false;

const noStrongAuthCombination = Platform.OS === 'android' && Platform.Version < 30;

export async function biometricUnlock(useKeychain = true): Promise<boolean> {
if (!(await isBiometricEnabled())) {
return true;
Expand All @@ -28,7 +31,9 @@ export async function biometricUnlock(useKeychain = true): Promise<boolean> {
async function checkBiometrics(): Promise<boolean> {
try {
isAuthenticating = true;
const { success } = await LocalAuthentication.authenticateAsync();
const { success } = await LocalAuthentication.authenticateAsync({
biometricsSecurityLevel: noStrongAuthCombination ? undefined : 'strong',
});
return success;
} catch (e) {
console.warn('Biometrics authentication failed: ', e);
Expand Down
10 changes: 2 additions & 8 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,8 @@ target 'SuperWallet' do
end
config = use_native_modules!

# Flags change depending on the env values.
flags = get_default_flags()

use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
:hermes_enabled => true,
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
Expand All @@ -39,8 +33,8 @@ target 'SuperWallet' do
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
:mac_catalyst_enabled => false,
# :ccache_enabled => true
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
Loading

0 comments on commit 103beed

Please sign in to comment.