mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-10-05 11:18:24 +00:00
React native 0.77 upgrade
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.6.4.cjs
|
||||
|
||||
checksumBehavior: update
|
||||
@@ -6,3 +6,5 @@ ruby ">= 2.6.10"
|
||||
# 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'
|
||||
@@ -2,16 +2,12 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import 'react-native';
|
||||
import React from 'react';
|
||||
import ReactTestRenderer from 'react-test-renderer';
|
||||
import App from '../src/App';
|
||||
|
||||
// Note: import explicitly to use the types shipped with jest.
|
||||
import {it} from '@jest/globals';
|
||||
|
||||
// Note: test renderer must be required after react-native.
|
||||
import renderer from 'react-test-renderer';
|
||||
|
||||
it('renders correctly', () => {
|
||||
renderer.create(<App appName='minibits' />);
|
||||
test('renders correctly', async () => {
|
||||
await ReactTestRenderer.act(() => {
|
||||
ReactTestRenderer.create(<App />);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,7 +5,6 @@ apply plugin: "com.google.gms.google-services"
|
||||
|
||||
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.
|
||||
@@ -96,8 +95,8 @@ android {
|
||||
applicationId "com.minibits_wallet"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 58016
|
||||
versionName "0.1.11"
|
||||
versionCode 58017
|
||||
versionName "0.2.0"
|
||||
}
|
||||
|
||||
splits {
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
<uses-permission android:name="android.permission.CAMERA"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
|
||||
<application
|
||||
android:name=".MainApplication"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:allowBackup="false"
|
||||
android:theme="@style/AppTheme"
|
||||
android:supportsRtl="true"
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.facebook.react.ReactPackage
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
|
||||
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
|
||||
import com.facebook.react.defaults.DefaultReactNativeHost
|
||||
import com.facebook.react.soloader.OpenSourceMergedSoMapping
|
||||
import com.facebook.soloader.SoLoader
|
||||
import com.microsoft.codepush.react.CodePush
|
||||
|
||||
@@ -16,11 +17,11 @@ class MainApplication : Application(), ReactApplication {
|
||||
|
||||
override val reactNativeHost: ReactNativeHost =
|
||||
object : DefaultReactNativeHost(this) {
|
||||
override fun getPackages(): List<ReactPackage> {
|
||||
// Packages that cannot be autolinked yet can be added manually here, for example:
|
||||
// packages.add(new MyReactNativePackage());
|
||||
return PackageList(this).packages
|
||||
}
|
||||
override fun getPackages(): List<ReactPackage> =
|
||||
PackageList(this).packages.apply {
|
||||
// Packages that cannot be autolinked yet can be added manually here, for example:
|
||||
// add(MyReactNativePackage())
|
||||
}
|
||||
|
||||
override fun getJSMainModuleName(): String = "index"
|
||||
|
||||
@@ -43,10 +44,10 @@ class MainApplication : Application(), ReactApplication {
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
SoLoader.init(this, false)
|
||||
SoLoader.init(this, OpenSourceMergedSoMapping)
|
||||
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
||||
load()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
buildscript {
|
||||
ext {
|
||||
buildToolsVersion = "34.0.0"
|
||||
buildToolsVersion = "35.0.0"
|
||||
minSdkVersion = 24
|
||||
compileSdkVersion = 34
|
||||
compileSdkVersion = 35
|
||||
targetSdkVersion = 34
|
||||
ndkVersion = "26.1.10909125"
|
||||
kotlinVersion = "1.9.24"
|
||||
ndkVersion = "27.1.12297006"
|
||||
kotlinVersion = "2.0.21"
|
||||
}
|
||||
repositories {
|
||||
google()
|
||||
@@ -14,8 +14,8 @@ buildscript {
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle")
|
||||
classpath("com.facebook.react:react-native-gradle-plugin")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
|
||||
classpath("com.google.gms:google-services:4.4.1")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
|
||||
classpath("com.google.gms:google-services:4.4.1")
|
||||
}
|
||||
}
|
||||
// minibits_wallet:react-native-camera-kit
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
Vendored
+4
-1
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -84,7 +86,8 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# 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
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
Vendored
+2
@@ -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 ##########################################################################
|
||||
|
||||
+1
-6
@@ -22,12 +22,7 @@ target 'minibits_wallet' do
|
||||
# An absolute path to your application root.
|
||||
:app_path => "#{Pod::Config.instance.installation_root}/.."
|
||||
)
|
||||
|
||||
target 'minibits_walletTests' do
|
||||
inherit! :complete
|
||||
# Pods for testing
|
||||
end
|
||||
|
||||
|
||||
post_install do |installer|
|
||||
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
|
||||
react_native_post_install(
|
||||
|
||||
@@ -7,12 +7,9 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
00E356F31AD99517003FC87E /* minibits_walletTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* minibits_walletTests.m */; };
|
||||
0C80B921A6F3F58F76C31292 /* libPods-minibits_wallet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-minibits_wallet.a */; };
|
||||
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
|
||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
||||
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||
7699B88040F8A987B510C191 /* libPods-minibits_wallet-minibits_walletTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-minibits_wallet-minibits_walletTests.a */; };
|
||||
761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };
|
||||
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -27,35 +24,20 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
00E356EE1AD99517003FC87E /* minibits_walletTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = minibits_walletTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
00E356F21AD99517003FC87E /* minibits_walletTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = minibits_walletTests.m; sourceTree = "<group>"; };
|
||||
13B07F961A680F5B00A75B9A /* minibits_wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = minibits_wallet.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = minibits_wallet/AppDelegate.h; sourceTree = "<group>"; };
|
||||
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = minibits_wallet/AppDelegate.mm; sourceTree = "<group>"; };
|
||||
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = minibits_wallet/Images.xcassets; sourceTree = "<group>"; };
|
||||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = minibits_wallet/Info.plist; sourceTree = "<group>"; };
|
||||
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = minibits_wallet/main.m; sourceTree = "<group>"; };
|
||||
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = minibits_wallet/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
||||
19F6CBCC0A4E27FBF8BF4A61 /* libPods-minibits_wallet-minibits_walletTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-minibits_wallet-minibits_walletTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3B4392A12AC88292D35C810B /* Pods-minibits_wallet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-minibits_wallet.debug.xcconfig"; path = "Target Support Files/Pods-minibits_wallet/Pods-minibits_wallet.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
5709B34CF0A7D63546082F79 /* Pods-minibits_wallet.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-minibits_wallet.release.xcconfig"; path = "Target Support Files/Pods-minibits_wallet/Pods-minibits_wallet.release.xcconfig"; sourceTree = "<group>"; };
|
||||
5B7EB9410499542E8C5724F5 /* Pods-minibits_wallet-minibits_walletTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-minibits_wallet-minibits_walletTests.debug.xcconfig"; path = "Target Support Files/Pods-minibits_wallet-minibits_walletTests/Pods-minibits_wallet-minibits_walletTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
5DCACB8F33CDC322A6C60F78 /* libPods-minibits_wallet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-minibits_wallet.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = minibits_wallet/AppDelegate.swift; sourceTree = "<group>"; };
|
||||
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = minibits_wallet/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
89C6BE57DB24E9ADA2F236DE /* Pods-minibits_wallet-minibits_walletTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-minibits_wallet-minibits_walletTests.release.xcconfig"; path = "Target Support Files/Pods-minibits_wallet-minibits_walletTests/Pods-minibits_wallet-minibits_walletTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
00E356EB1AD99517003FC87E /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7699B88040F8A987B510C191 /* libPods-minibits_wallet-minibits_walletTests.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -67,15 +49,6 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
00E356EF1AD99517003FC87E /* minibits_walletTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
00E356F21AD99517003FC87E /* minibits_walletTests.m */,
|
||||
00E356F01AD99517003FC87E /* Supporting Files */,
|
||||
);
|
||||
path = minibits_walletTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
00E356F01AD99517003FC87E /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -87,12 +60,10 @@
|
||||
13B07FAE1A68108700A75B9A /* minibits_wallet */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
|
||||
13B07FB01A68108700A75B9A /* AppDelegate.mm */,
|
||||
13B07FB51A68108700A75B9A /* Images.xcassets */,
|
||||
761780EC2CA45674006654EE /* AppDelegate.swift */,
|
||||
13B07FB61A68108700A75B9A /* Info.plist */,
|
||||
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
|
||||
13B07FB71A68108700A75B9A /* main.m */,
|
||||
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */,
|
||||
);
|
||||
name = minibits_wallet;
|
||||
@@ -103,7 +74,6 @@
|
||||
children = (
|
||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
|
||||
5DCACB8F33CDC322A6C60F78 /* libPods-minibits_wallet.a */,
|
||||
19F6CBCC0A4E27FBF8BF4A61 /* libPods-minibits_wallet-minibits_walletTests.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@@ -120,7 +90,6 @@
|
||||
children = (
|
||||
13B07FAE1A68108700A75B9A /* minibits_wallet */,
|
||||
832341AE1AAA6A7D00B99B32 /* Libraries */,
|
||||
00E356EF1AD99517003FC87E /* minibits_walletTests */,
|
||||
83CBBA001A601CBA00E9B192 /* Products */,
|
||||
2D16E6871FA4F8E400B85C8A /* Frameworks */,
|
||||
BBD78D7AC51CEA395F1C20DB /* Pods */,
|
||||
@@ -134,7 +103,6 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13B07F961A680F5B00A75B9A /* minibits_wallet.app */,
|
||||
00E356EE1AD99517003FC87E /* minibits_walletTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -144,8 +112,6 @@
|
||||
children = (
|
||||
3B4392A12AC88292D35C810B /* Pods-minibits_wallet.debug.xcconfig */,
|
||||
5709B34CF0A7D63546082F79 /* Pods-minibits_wallet.release.xcconfig */,
|
||||
5B7EB9410499542E8C5724F5 /* Pods-minibits_wallet-minibits_walletTests.debug.xcconfig */,
|
||||
89C6BE57DB24E9ADA2F236DE /* Pods-minibits_wallet-minibits_walletTests.release.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
@@ -153,27 +119,6 @@
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
00E356ED1AD99517003FC87E /* minibits_walletTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "minibits_walletTests" */;
|
||||
buildPhases = (
|
||||
A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */,
|
||||
00E356EA1AD99517003FC87E /* Sources */,
|
||||
00E356EB1AD99517003FC87E /* Frameworks */,
|
||||
00E356EC1AD99517003FC87E /* Resources */,
|
||||
C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */,
|
||||
F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
00E356F51AD99517003FC87E /* PBXTargetDependency */,
|
||||
);
|
||||
name = minibits_walletTests;
|
||||
productName = minibits_walletTests;
|
||||
productReference = 00E356EE1AD99517003FC87E /* minibits_walletTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
13B07F861A680F5B00A75B9A /* minibits_wallet */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "minibits_wallet" */;
|
||||
@@ -203,10 +148,6 @@
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1210;
|
||||
TargetAttributes = {
|
||||
00E356ED1AD99517003FC87E = {
|
||||
CreatedOnToolsVersion = 6.2;
|
||||
TestTargetID = 13B07F861A680F5B00A75B9A;
|
||||
};
|
||||
13B07F861A680F5B00A75B9A = {
|
||||
LastSwiftMigration = 1120;
|
||||
};
|
||||
@@ -226,7 +167,6 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
13B07F861A680F5B00A75B9A /* minibits_wallet */,
|
||||
00E356ED1AD99517003FC87E /* minibits_walletTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -284,28 +224,6 @@
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-minibits_wallet/Pods-minibits_wallet-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
A55EABD7B0C7F3A422A6CC61 /* [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-minibits_wallet-minibits_walletTests-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;
|
||||
};
|
||||
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -328,23 +246,6 @@
|
||||
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;
|
||||
};
|
||||
C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-minibits_wallet-minibits_walletTests/Pods-minibits_wallet-minibits_walletTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-minibits_wallet-minibits_walletTests/Pods-minibits_wallet-minibits_walletTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-minibits_wallet-minibits_walletTests/Pods-minibits_wallet-minibits_walletTests-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -362,40 +263,14 @@
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-minibits_wallet/Pods-minibits_wallet-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-minibits_wallet-minibits_walletTests/Pods-minibits_wallet-minibits_walletTests-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-minibits_wallet-minibits_walletTests/Pods-minibits_wallet-minibits_walletTests-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-minibits_wallet-minibits_walletTests/Pods-minibits_wallet-minibits_walletTests-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
00E356EA1AD99517003FC87E /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
00E356F31AD99517003FC87E /* minibits_walletTests.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
13B07F871A680F5B00A75B9A /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
|
||||
13B07FC11A68108700A75B9A /* main.m in Sources */,
|
||||
761780ED2CA45674006654EE /* AppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -410,57 +285,6 @@
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
00E356F61AD99517003FC87E /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-minibits_wallet-minibits_walletTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = minibits_walletTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
"$(inherited)",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/minibits_wallet.app/minibits_wallet";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
00E356F71AD99517003FC87E /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-minibits_wallet-minibits_walletTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
INFOPLIST_FILE = minibits_walletTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
"$(inherited)",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/minibits_wallet.app/minibits_wallet";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
13B07F941A680F5B00A75B9A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-minibits_wallet.debug.xcconfig */;
|
||||
@@ -470,6 +294,7 @@
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = minibits_wallet/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
@@ -496,6 +321,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
INFOPLIST_FILE = minibits_wallet/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
@@ -562,7 +388,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
/usr/lib/swift,
|
||||
"$(inherited)",
|
||||
@@ -628,7 +454,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
/usr/lib/swift,
|
||||
"$(inherited)",
|
||||
@@ -655,15 +481,6 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "minibits_walletTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
00E356F61AD99517003FC87E /* Debug */,
|
||||
00E356F71AD99517003FC87E /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "minibits_wallet" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#import <RCTAppDelegate.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : RCTAppDelegate
|
||||
|
||||
@end
|
||||
@@ -1,31 +0,0 @@
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#import <React/RCTBundleURLProvider.h>
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
self.moduleName = @"minibits_wallet";
|
||||
// You can add your custom initial props in the dictionary below.
|
||||
// They will be passed down to the ViewController used by React Native.
|
||||
self.initialProps = @{};
|
||||
|
||||
return [super application:application didFinishLaunchingWithOptions:launchOptions];
|
||||
}
|
||||
|
||||
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
||||
{
|
||||
return [self bundleURL];
|
||||
}
|
||||
|
||||
- (NSURL *)bundleURL
|
||||
{
|
||||
#if DEBUG
|
||||
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
|
||||
#else
|
||||
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,30 @@
|
||||
import UIKit
|
||||
import React
|
||||
import React_RCTAppDelegate
|
||||
import ReactAppDependencyProvider
|
||||
|
||||
@main
|
||||
class AppDelegate: RCTAppDelegate {
|
||||
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
||||
self.moduleName = "minibits_wallet"
|
||||
self.dependencyProvider = RCTAppDependencyProvider()
|
||||
|
||||
// You can add your custom initial props in the dictionary below.
|
||||
// They will be passed down to the ViewController used by React Native.
|
||||
self.initialProps = [:]
|
||||
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
|
||||
override func sourceURL(for bridge: RCTBridge) -> URL? {
|
||||
self.bundleURL()
|
||||
}
|
||||
|
||||
override func bundleURL() -> URL? {
|
||||
#if DEBUG
|
||||
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
|
||||
#else
|
||||
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,66 +0,0 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import <React/RCTLog.h>
|
||||
#import <React/RCTRootView.h>
|
||||
|
||||
#define TIMEOUT_SECONDS 600
|
||||
#define TEXT_TO_LOOK_FOR @"Welcome to React"
|
||||
|
||||
@interface minibits_walletTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation minibits_walletTests
|
||||
|
||||
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
|
||||
{
|
||||
if (test(view)) {
|
||||
return YES;
|
||||
}
|
||||
for (UIView *subview in [view subviews]) {
|
||||
if ([self findSubviewInView:subview matching:test]) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)testRendersWelcomeScreen
|
||||
{
|
||||
UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
|
||||
BOOL foundElement = NO;
|
||||
|
||||
__block NSString *redboxError = nil;
|
||||
#ifdef DEBUG
|
||||
RCTSetLogFunction(
|
||||
^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
|
||||
if (level >= RCTLogLevelError) {
|
||||
redboxError = message;
|
||||
}
|
||||
});
|
||||
#endif
|
||||
|
||||
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
|
||||
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
||||
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
||||
|
||||
foundElement = [self findSubviewInView:vc.view
|
||||
matching:^BOOL(UIView *view) {
|
||||
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}];
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
RCTSetLogFunction(RCTDefaultLogFunction);
|
||||
#endif
|
||||
|
||||
XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
|
||||
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
|
||||
}
|
||||
|
||||
@end
|
||||
+3
-2
@@ -4,9 +4,10 @@ const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
|
||||
* Metro configuration
|
||||
* https://reactnative.dev/docs/metro
|
||||
*
|
||||
* @type {import('metro-config').MetroConfig}
|
||||
* @type {import('@react-native/metro-config').MetroConfig}
|
||||
*/
|
||||
const config = {
|
||||
const config = {
|
||||
|
||||
};
|
||||
|
||||
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
|
||||
|
||||
+50
-48
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"name": "minibits_wallet",
|
||||
"version": "0.1.11-beta.8",
|
||||
"version": "0.2.0-beta.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android:clean": "cd android && ./gradlew clean",
|
||||
"android:dev": "npx react-native run-android --active-arch-only",
|
||||
"android:test": "npx react-native run-android --mode=release",
|
||||
"android:bundle": "npx react-native build-android --mode=release",
|
||||
"android:dev": "react-native run-android",
|
||||
"android:test": "react-native run-android --mode=release",
|
||||
"android:bundle": "react-native build-android --mode=release",
|
||||
"android:apk": "cd android && ./gradlew assembleRelease",
|
||||
"ios": "react-native run-ios",
|
||||
"lint": "eslint .",
|
||||
"start": "npx react-native start",
|
||||
"start": "react-native start",
|
||||
"test": "jest",
|
||||
"test:i18n": "node __tests__/missingTranslations.js && node __tests__/incorrectTranslationPlaceholders.js",
|
||||
"adb": "adb devices && adb reverse tcp:9090 tcp:9090 && adb reverse tcp:3000 tcp:3000 && adb reverse tcp:9001 tcp:9001 && adb reverse tcp:8081 tcp:8081",
|
||||
@@ -20,80 +20,83 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@cashu/cashu-ts": "minibits-cash/cashu-ts#2b51a7ba7a8461a0040359eecda37b98b603692c",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.6.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.6.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.6.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.7.2",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.7.2",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
||||
"@fortawesome/react-native-fontawesome": "^0.3.2",
|
||||
"@gandlaf21/bc-ur": "^1.1.12",
|
||||
"@gandlaf21/bolt11-decode": "^3.1.1",
|
||||
"@gocodingnow/rn-size-matters": "^0.0.4",
|
||||
"@notifee/react-native": "^9.1.3",
|
||||
"@react-native-clipboard/clipboard": "^1.14.1",
|
||||
"@react-native-community/netinfo": "^11.4.0",
|
||||
"@react-native-firebase/app": "^20.5.0",
|
||||
"@react-native-firebase/messaging": "^20.5.0",
|
||||
"@notifee/react-native": "^9.1.8",
|
||||
"@react-native-clipboard/clipboard": "^1.16.1",
|
||||
"@react-native-community/netinfo": "^11.4.1",
|
||||
"@react-native-firebase/app": "^21.7.1",
|
||||
"@react-native-firebase/messaging": "^21.7.1",
|
||||
"@react-navigation/bottom-tabs": "^6.6.1",
|
||||
"@react-navigation/native": "^6.1.18",
|
||||
"@react-navigation/native-stack": "^6.11.0",
|
||||
"@react-navigation/stack": "^6.4.1",
|
||||
"@sentry/react-native": "^5.32.0",
|
||||
"date-fns": "^4.0.0",
|
||||
"i18n-js": "^4.4.3",
|
||||
"@scure/bip39": "1.5.0",
|
||||
"@sentry/react-native": "^6.5.0",
|
||||
"date-fns": "^4.1.0",
|
||||
"i18n-js": "^4.5.1",
|
||||
"js-lnurl": "^0.6.0",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"lodash.debounce": "4.0.8",
|
||||
"message-port-polyfill": "^0.2.0",
|
||||
"mobx": "^6.13.2",
|
||||
"mobx-react-lite": "^4.0.7",
|
||||
"mobx-state-tree": "^6.0.1",
|
||||
"mobx": "^6.13.5",
|
||||
"mobx-react-lite": "^4.1.0",
|
||||
"mobx-state-tree": "^7.0.1",
|
||||
"nostr-tools": "minibits-cash/nostr-tools#2991f59d0150a0cb2c71e2f9a4cb6c8aca3b19d7",
|
||||
"numbro": "^2.5.0",
|
||||
"patch-package": "^8.0.0",
|
||||
"postinstall-postinstall": "^2.1.0",
|
||||
"react": "18.3.1",
|
||||
"react-native": "0.75.3",
|
||||
"react-native": "0.77.0",
|
||||
"react-native-animated-pagination-dots": "^0.1.73",
|
||||
"react-native-camera-kit": "github:teslamotors/react-native-camera-kit#v14.0.0-beta15",
|
||||
"react-native-code-push": "^9.0.0",
|
||||
"react-native-camera-kit": "teslamotors/react-native-camera-kit#7e94541bbfa34f3a74756d7a1a1a7e3468e6a25c",
|
||||
"react-native-code-push": "^9.0.1",
|
||||
"react-native-dotenv": "^3.4.11",
|
||||
"react-native-exit-app": "^2.0.0",
|
||||
"react-native-flash-message": "^0.4.2",
|
||||
"react-native-gesture-handler": "^2.19.0",
|
||||
"react-native-json-tree": "^1.3.0",
|
||||
"react-native-keychain": "^8.2.0",
|
||||
"react-native-logs": "^5.1.0",
|
||||
"react-native-gesture-handler": "^2.22.1",
|
||||
"react-native-json-tree": "^1.4.0",
|
||||
"react-native-keychain": "^9.2.2",
|
||||
"react-native-logs": "^5.3.0",
|
||||
"react-native-mmkv": "^2.12.2",
|
||||
"react-native-modal": "^13.0.1",
|
||||
"react-native-pager-view": "^6.4.1",
|
||||
"react-native-qrcode-svg": "^6.3.2",
|
||||
"react-native-quick-sqlite": "8.2.7",
|
||||
"react-native-pager-view": "^6.7.0",
|
||||
"react-native-qrcode-svg": "^6.3.14",
|
||||
"react-native-quick-base64": "^2.1.2",
|
||||
"react-native-quick-crypto": "^0.7.4",
|
||||
"react-native-quick-sqlite": "github:margelo/react-native-quick-sqlite#commit=99f34ebefa91698945f3ed26622e002bd79489e0",
|
||||
"react-native-reanimated": "^3.15.2",
|
||||
"react-native-safe-area-context": "^4.11.0",
|
||||
"react-native-screens": "^3.34.0",
|
||||
"react-native-svg": "^15.6.0",
|
||||
"react-native-tab-view": "^3.5.2",
|
||||
"react-native-quick-crypto": "^0.7.11",
|
||||
"react-native-reanimated": "^3.16.7",
|
||||
"react-native-safe-area-context": "^5.1.0",
|
||||
"react-native-screens": "^4.6.0",
|
||||
"react-native-svg": "^15.11.1",
|
||||
"react-native-tab-view": "^4.0.5",
|
||||
"react-native-url-polyfill": "^2.0.0",
|
||||
"taskon": "^0.3.0",
|
||||
"taskon": "^0.3.1",
|
||||
"text-encoding-polyfill": "^0.6.7",
|
||||
"util": "^0.12.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.0",
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
||||
"@babel/preset-env": "^7.20.0",
|
||||
"@babel/runtime": "^7.20.0",
|
||||
"@react-native/babel-preset": "0.75.3",
|
||||
"@react-native/eslint-config": "0.75.3",
|
||||
"@react-native/metro-config": "0.75.3",
|
||||
"@react-native/typescript-config": "0.75.3",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/runtime": "^7.25.0",
|
||||
"@react-native-community/cli": "15.0.1",
|
||||
"@react-native-community/cli-platform-android": "15.0.1",
|
||||
"@react-native-community/cli-platform-ios": "15.0.1",
|
||||
"@react-native/babel-preset": "0.77.0",
|
||||
"@react-native/eslint-config": "0.77.0",
|
||||
"@react-native/metro-config": "0.77.0",
|
||||
"@react-native/typescript-config": "0.77.0",
|
||||
"@tsconfig/react-native": "^3.0.0",
|
||||
"@types/jest": "^29.5.13",
|
||||
"@types/lodash.clonedeep": "^4.5.9",
|
||||
"@types/react": "^18.2.6",
|
||||
"@types/react-test-renderer": "^18.0.0",
|
||||
"babel-jest": "^29.6.3",
|
||||
"babel-plugin-module-resolver": "^5.0.0",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-plugin-unused-imports": "^2.0.0",
|
||||
@@ -105,6 +108,5 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18 || 20 || 22"
|
||||
},
|
||||
"packageManager": "yarn@3.6.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/node_modules/@scure/bip32/index.ts b/node_modules/@scure/bip32/index.ts
|
||||
index 3368385..0659773 100644
|
||||
index 0c9c91c..14c9ae2 100644
|
||||
--- a/node_modules/@scure/bip32/index.ts
|
||||
+++ b/node_modules/@scure/bip32/index.ts
|
||||
@@ -8,6 +8,7 @@ import { bytesToHex, concatBytes, createView, hexToBytes, utf8ToBytes } from '@n
|
||||
@@ -25,6 +25,7 @@ import { bytesToHex, concatBytes, createView, hexToBytes, utf8ToBytes } from '@n
|
||||
import { secp256k1 as secp } from '@noble/curves/secp256k1';
|
||||
import { mod } from '@noble/curves/abstract/modular';
|
||||
import { createBase58check } from '@scure/base';
|
||||
@@ -10,28 +10,28 @@ index 3368385..0659773 100644
|
||||
|
||||
const Point = secp.ProjectivePoint;
|
||||
const base58check = createBase58check(sha256);
|
||||
@@ -97,7 +98,8 @@ export class HDKey {
|
||||
@@ -114,7 +115,8 @@ export class HDKey {
|
||||
seed.length
|
||||
);
|
||||
}
|
||||
- const I = hmac(sha512, MASTER_SECRET, seed);
|
||||
+ //const I = hmac(sha512, MASTER_SECRET, seed);
|
||||
+ // const I = hmac(sha512, MASTER_SECRET, seed);
|
||||
+ const I = new Uint8Array(QuickCrypto.createHmac('sha512', MASTER_SECRET).update(seed).digest());
|
||||
return new HDKey({
|
||||
versions,
|
||||
chainCode: I.slice(32),
|
||||
@@ -220,7 +222,8 @@ export class HDKey {
|
||||
@@ -237,7 +239,8 @@ export class HDKey {
|
||||
// Normal child: serP(point(kpar)) || ser32(index)
|
||||
data = concatBytes(this.pubKey, data);
|
||||
}
|
||||
- const I = hmac(sha512, this.chainCode, data);
|
||||
+ // const I = hmac(sha512, this.chainCode, data);
|
||||
+ const I = new Uint8Array(QuickCrypto.createHmac('sha512', this.chainCode).update(data).digest());
|
||||
+ //const I = hmac(sha512, this.chainCode, data);
|
||||
+ const I = new Uint8Array(QuickCrypto.createHmac('sha512', this.chainCode).update(data).digest())
|
||||
const childTweak = bytesToNumber(I.slice(0, 32));
|
||||
const chainCode = I.slice(32);
|
||||
if (!secp.utils.isValidPrivateKey(childTweak)) {
|
||||
diff --git a/node_modules/@scure/bip32/package.json b/node_modules/@scure/bip32/package.json
|
||||
index 5222d18..69ff82b 100644
|
||||
index e866fba..6389575 100644
|
||||
--- a/node_modules/@scure/bip32/package.json
|
||||
+++ b/node_modules/@scure/bip32/package.json
|
||||
@@ -6,15 +6,8 @@
|
||||
@@ -41,7 +41,7 @@ index 5222d18..69ff82b 100644
|
||||
- "main": "./lib/index.js",
|
||||
- "module": "./lib/esm/index.js",
|
||||
+ "main": "./index.ts",
|
||||
"types": "./lib/index.d.ts",
|
||||
"types": "./lib/index.d.ts",
|
||||
- "exports": {
|
||||
- ".": {
|
||||
- "import": "./lib/esm/index.js",
|
||||
@@ -49,5 +49,5 @@ index 5222d18..69ff82b 100644
|
||||
- }
|
||||
- },
|
||||
"dependencies": {
|
||||
"@noble/curves": "~1.7.0",
|
||||
"@noble/hashes": "~1.6.0",
|
||||
"@noble/curves": "~1.8.1",
|
||||
"@noble/hashes": "~1.7.1",
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/node_modules/react-native-keychain/android/src/main/java/com/oblador/keychain/KeychainModuleBuilder.java b/node_modules/react-native-keychain/android/src/main/java/com/oblador/keychain/KeychainModuleBuilder.java
|
||||
index b144915..278989b 100644
|
||||
--- a/node_modules/react-native-keychain/android/src/main/java/com/oblador/keychain/KeychainModuleBuilder.java
|
||||
+++ b/node_modules/react-native-keychain/android/src/main/java/com/oblador/keychain/KeychainModuleBuilder.java
|
||||
@@ -3,7 +3,7 @@ package com.oblador.keychain;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
|
||||
public class KeychainModuleBuilder {
|
||||
- public static final boolean DEFAULT_USE_WARM_UP = true;
|
||||
+ public static final boolean DEFAULT_USE_WARM_UP = false;
|
||||
|
||||
private ReactApplicationContext reactContext;
|
||||
private boolean useWarmUp = DEFAULT_USE_WARM_UP;
|
||||
@@ -0,0 +1,46 @@
|
||||
diff --git a/node_modules/react-native-modal/dist/modal.d.ts b/node_modules/react-native-modal/dist/modal.d.ts
|
||||
index b63bcfc..071204f 100644
|
||||
--- a/node_modules/react-native-modal/dist/modal.d.ts
|
||||
+++ b/node_modules/react-native-modal/dist/modal.d.ts
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
-import { Animated, EmitterSubscription, PanResponderGestureState, PanResponderInstance, StyleProp, ViewStyle, ViewProps } from 'react-native';
|
||||
+import { Animated, EmitterSubscription,NativeEventSubscription, PanResponderGestureState, PanResponderInstance, StyleProp, ViewStyle, ViewProps } from 'react-native';
|
||||
import * as PropTypes from 'prop-types';
|
||||
import * as animatable from 'react-native-animatable';
|
||||
import { Direction, OrNull, PresentationStyle, OnOrientationChange, GestureResponderEvent } from './types';
|
||||
@@ -149,6 +149,7 @@ export declare class ReactNativeModal extends React.Component<ModalProps, State>
|
||||
contentRef: any;
|
||||
panResponder: OrNull<PanResponderInstance>;
|
||||
didUpdateDimensionsEmitter: OrNull<EmitterSubscription>;
|
||||
+ backHandlerEventSubscription: OrNull<NativeEventSubscription> = null;
|
||||
interactionHandle: OrNull<number>;
|
||||
constructor(props: ModalProps);
|
||||
static getDerivedStateFromProps(nextProps: Readonly<ModalProps>, state: State): {
|
||||
diff --git a/node_modules/react-native-modal/dist/modal.js b/node_modules/react-native-modal/dist/modal.js
|
||||
index 80f4e75..30ba0b4 100644
|
||||
--- a/node_modules/react-native-modal/dist/modal.js
|
||||
+++ b/node_modules/react-native-modal/dist/modal.js
|
||||
@@ -65,6 +65,7 @@ export class ReactNativeModal extends React.Component {
|
||||
this.currentSwipingDirection = null;
|
||||
this.panResponder = null;
|
||||
this.didUpdateDimensionsEmitter = null;
|
||||
+ this.backHandlerEventSubscription
|
||||
this.interactionHandle = null;
|
||||
this.getDeviceHeight = () => this.props.deviceHeight || this.state.deviceHeight;
|
||||
this.getDeviceWidth = () => this.props.deviceWidth || this.state.deviceWidth;
|
||||
@@ -453,10 +454,12 @@ export class ReactNativeModal extends React.Component {
|
||||
if (this.state.isVisible) {
|
||||
this.open();
|
||||
}
|
||||
- BackHandler.addEventListener('hardwareBackPress', this.onBackButtonPress);
|
||||
+ this.backHandlerEventSubscription = BackHandler.addEventListener('hardwareBackPress', this.onBackButtonPress);
|
||||
}
|
||||
componentWillUnmount() {
|
||||
- BackHandler.removeEventListener('hardwareBackPress', this.onBackButtonPress);
|
||||
+ if (this.backHandlerEventSubscription) {
|
||||
+ this.backHandlerEventSubscription.remove();
|
||||
+ }
|
||||
if (this.didUpdateDimensionsEmitter) {
|
||||
this.didUpdateDimensionsEmitter.remove();
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/node_modules/react-native-nitro-sqlite/cpp/operations.cpp b/node_modules/react-native-nitro-sqlite/cpp/operations.cpp
|
||||
index 0655754..88e80cd 100644
|
||||
--- a/node_modules/react-native-nitro-sqlite/cpp/operations.cpp
|
||||
+++ b/node_modules/react-native-nitro-sqlite/cpp/operations.cpp
|
||||
@@ -165,7 +165,7 @@ SQLiteExecuteQueryResult sqliteExecute(const std::string& dbName, const std::str
|
||||
switch (column_type) {
|
||||
|
||||
case SQLITE_INTEGER: {
|
||||
- auto column_value = sqlite3_column_int64(statement, i);
|
||||
+ auto column_value = sqlite3_column_double(statement, i);
|
||||
row[column_name] = column_value;
|
||||
break;
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
diff --git a/node_modules/react-native-tab-view/src/TabBar.tsx b/node_modules/react-native-tab-view/src/TabBar.tsx
|
||||
index e8d0b4c..1c3c09f 100644
|
||||
--- a/node_modules/react-native-tab-view/src/TabBar.tsx
|
||||
+++ b/node_modules/react-native-tab-view/src/TabBar.tsx
|
||||
@@ -364,8 +364,7 @@ export function TabBar<T extends Route>({
|
||||
|
||||
const renderItem = React.useCallback(
|
||||
({ item: route, index }: ListRenderItemInfo<T>) => {
|
||||
- const props: TabBarItemProps<T> & { key: string } = {
|
||||
- key: route.key,
|
||||
+ const props: TabBarItemProps<T> = {
|
||||
position: position,
|
||||
route: route,
|
||||
navigationState: navigationState,
|
||||
@@ -446,9 +445,9 @@ export function TabBar<T extends Route>({
|
||||
<>
|
||||
{gap > 0 && index > 0 ? <Separator width={gap} /> : null}
|
||||
{renderTabBarItem ? (
|
||||
- renderTabBarItem(props)
|
||||
+ renderTabBarItem({ key: route.key, ...props })
|
||||
) : (
|
||||
- <TabBarItem {...props} />
|
||||
+ <TabBarItem key={route.key} {...props} />
|
||||
)}
|
||||
</>
|
||||
);
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { ComponentType, Fragment, ReactElement } from "react"
|
||||
import React, { ComponentType, Fragment, ReactElement, useEffect } from "react"
|
||||
import Modal from 'react-native-modal'
|
||||
import {
|
||||
StyleProp,
|
||||
@@ -7,7 +7,8 @@ import {
|
||||
View,
|
||||
ViewStyle,
|
||||
ColorValue,
|
||||
StatusBar,
|
||||
StatusBar,
|
||||
BackHandler,
|
||||
} from "react-native"
|
||||
import { colors, useThemeColor, spacing } from "../theme"
|
||||
import { Text, TextProps } from "./Text"
|
||||
@@ -105,7 +106,6 @@ interface ModalProps extends ViewProps {
|
||||
* Modal
|
||||
*/
|
||||
export function BottomModal(props: ModalProps) {
|
||||
|
||||
const {
|
||||
isVisible = true,
|
||||
onBackdropPress,
|
||||
|
||||
@@ -91,7 +91,7 @@ export const ProofsStoreModel = types
|
||||
// Proofs are not more persisted in mmkv storage but loaded from database when hydrating the model
|
||||
loadProofsFromDatabase: flow(function* loadProofsFromDatabase() {
|
||||
|
||||
const unspentAndPendingProofs = yield Database.getProofs(true, true, false)
|
||||
const unspentAndPendingProofs = yield Database.getProofs(true, true, false)
|
||||
|
||||
// Group into isUnspent and isPending
|
||||
const groupedProofs = unspentAndPendingProofs.reduce(
|
||||
|
||||
+22
-22
@@ -11,18 +11,18 @@ export interface TransactionRecord {
|
||||
fee: number
|
||||
unit: MintUnit
|
||||
data: string
|
||||
sentFrom?: string | null
|
||||
sentTo?: string | null
|
||||
profile?: string | null
|
||||
memo?: string | null
|
||||
zapRequest?: string | null
|
||||
inputToken?: string | null
|
||||
outputToken?: string | null
|
||||
proof?: string | null
|
||||
sentFrom?: string
|
||||
sentTo?: string
|
||||
profile?: string
|
||||
memo?: string
|
||||
zapRequest?: string
|
||||
inputToken?: string
|
||||
outputToken?: string
|
||||
proof?: string
|
||||
mint: string
|
||||
balanceAfter?: number | null
|
||||
noteToSelf?: string | null
|
||||
tags?: Array<string> | null
|
||||
balanceAfter?: number
|
||||
noteToSelf?: string
|
||||
tags?: Array<string>
|
||||
status: TransactionStatus
|
||||
createdAt: Date
|
||||
}
|
||||
@@ -63,18 +63,18 @@ export const TransactionModel = types
|
||||
fee: types.optional(types.integer, 0),
|
||||
unit: types.frozen<MintUnit>(),
|
||||
data: types.string,
|
||||
sentFrom: types.maybe(types.maybeNull(types.string)),
|
||||
sentTo: types.maybe(types.maybeNull(types.string)),
|
||||
profile: types.maybe(types.maybeNull(types.string)),
|
||||
memo: types.maybe(types.maybeNull(types.string)),
|
||||
sentFrom: types.maybe(types.string),
|
||||
sentTo: types.maybe(types.string),
|
||||
profile: types.maybe(types.string),
|
||||
memo: types.maybe(types.string),
|
||||
mint: types.string,
|
||||
zapRequest: types.maybe(types.maybeNull(types.string)),
|
||||
inputToken: types.maybe(types.maybeNull(types.string)),
|
||||
outputToken: types.maybe(types.maybeNull(types.string)),
|
||||
proof: types.maybe(types.maybeNull(types.string)),
|
||||
balanceAfter: types.maybe(types.maybeNull(types.integer)),
|
||||
noteToSelf: types.maybe(types.maybeNull(types.string)),
|
||||
tags: types.maybe(types.maybeNull(types.array(types.string))),
|
||||
zapRequest: types.maybe(types.string),
|
||||
inputToken: types.maybe(types.string),
|
||||
outputToken: types.maybe(types.string),
|
||||
proof: types.maybe(types.string),
|
||||
balanceAfter: types.maybe(types.integer),
|
||||
noteToSelf: types.maybe(types.string),
|
||||
tags: types.maybe(types.array(types.string)),
|
||||
status: types.frozen<TransactionStatus>(),
|
||||
createdAt: types.optional(types.Date, new Date()),
|
||||
})
|
||||
|
||||
@@ -196,11 +196,11 @@ export const TransactionsStoreModel = types
|
||||
}),
|
||||
addToHistory(limit: number, offset: number, onlyPending: boolean){
|
||||
// Appends transaction to the map and adds reference to history from database.
|
||||
const result = Database.getTransactions(limit, offset, onlyPending)
|
||||
log.trace('[addToHistory] dbResult ids', {ids: result?._array.map(t => t.id)})
|
||||
const dbTransactions = Database.getTransactions(limit, offset, onlyPending)
|
||||
log.trace('[addToHistory] dbResult ids', {ids: dbTransactions.map(t => t.id)})
|
||||
|
||||
if (result && result.length > 0) {
|
||||
for (const dbTransaction of result._array) {
|
||||
if (dbTransactions && dbTransactions.length > 0) {
|
||||
for (const dbTransaction of dbTransactions) {
|
||||
const createdAt = new Date(dbTransaction.createdAt)
|
||||
const inStoreTransaction = {...dbTransaction, createdAt}
|
||||
|
||||
|
||||
@@ -25,9 +25,8 @@ export const UserSettingsStoreModel = types
|
||||
theme: types.optional(types.frozen<ThemeCode>(), ThemeCode.DEFAULT),
|
||||
nextTheme: types.optional(types.frozen<ThemeCode>(), ThemeCode.DEFAULT),
|
||||
isOnboarded: types.optional(types.boolean, false),
|
||||
isAuthOn: types.optional(types.boolean, false),
|
||||
isLocalBackupOn: types.optional(types.boolean, true),
|
||||
isBatchClaimOn: types.optional(types.boolean, false),
|
||||
isAuthOn: types.optional(types.boolean, false),
|
||||
isBatchClaimOn: types.optional(types.boolean, true),
|
||||
isLoggerOn: types.optional(types.boolean, true),
|
||||
logLevel: types.optional(types.frozen<LogLevel>(), LogLevel.ERROR)
|
||||
})
|
||||
@@ -52,10 +51,6 @@ export const UserSettingsStoreModel = types
|
||||
self.isOnboarded = isOnboarded
|
||||
return isOnboarded
|
||||
},
|
||||
setIsLocalBackupOn: (isLocalBackupOn: boolean) => {
|
||||
self.isLocalBackupOn = isLocalBackupOn
|
||||
return isLocalBackupOn
|
||||
},
|
||||
setIsAuthOn: flow(function* setIsAuthOn(
|
||||
isAuthOn: boolean,
|
||||
) {
|
||||
|
||||
@@ -44,6 +44,12 @@ export const WalletProfileStoreModel = types
|
||||
.actions(self => ({
|
||||
publishToRelays: flow(function* publishToRelays() {
|
||||
try {
|
||||
const hasKeys = yield KeyChain.hasWalletKeys()
|
||||
|
||||
if(!hasKeys) {
|
||||
log.debug('[publishToRelays] Profile will not be published to relays, wallet keys not yet available.')
|
||||
}
|
||||
|
||||
const {pubkey, name, picture, nip05, lud16} = self
|
||||
|
||||
// announce to minibits relay + default public relays with replaceable event
|
||||
@@ -80,8 +86,9 @@ export const WalletProfileStoreModel = types
|
||||
|
||||
return publishedEvent
|
||||
|
||||
} catch (e: any) {
|
||||
log.error(e.name, e.message)
|
||||
} catch (e: any) {
|
||||
// on profile creation / recovery this fails at first as nostr keys are not yet saved
|
||||
log.warn(e.name, e.message)
|
||||
return false // silent
|
||||
}
|
||||
})
|
||||
@@ -95,8 +102,8 @@ export const WalletProfileStoreModel = types
|
||||
self.name = name // default name is set on server side, equals walletId
|
||||
self.nip05 = nip05 // default is name@minibits.cash set on server side
|
||||
self.lud16 = lud16 // equals to nip05 for all @minibits.cash addresses, set on server side
|
||||
self.picture = avatar // default picture is set on server side
|
||||
|
||||
self.picture = avatar // default picture is set on server side
|
||||
|
||||
yield self.publishToRelays()
|
||||
})
|
||||
}))
|
||||
|
||||
@@ -165,14 +165,14 @@ async function _runMigrations(rootStore: RootStore) {
|
||||
userSettingsStore.setExchangeCurrency(CurrencyCode.USD)
|
||||
userSettingsStore.setTheme(ThemeCode.DEFAULT)
|
||||
|
||||
if(!userSettingsStore.isLocalBackupOn) {
|
||||
/* if(!userSettingsStore.isLocalBackupOn) {
|
||||
const proofs = proofsStore.allProofs
|
||||
const pendingProofs = proofsStore.pendingProofs
|
||||
|
||||
Database.addOrUpdateProofs(proofs, false, false)
|
||||
Database.addOrUpdateProofs(pendingProofs, true, false)
|
||||
userSettingsStore.setIsLocalBackupOn(true)
|
||||
}
|
||||
}*/
|
||||
|
||||
for (const mint of mintsStore.allMints) {
|
||||
for(const keysetId of mint.keysetIds) {
|
||||
|
||||
@@ -75,12 +75,12 @@ export const DeveloperScreen: FC<SettingsStackScreenProps<'Developer'>> = observ
|
||||
const syncTransactionsFromDb = function () {
|
||||
setIsLoading(true)
|
||||
try {
|
||||
const result = Database.getTransactions(
|
||||
const dbTransactions = Database.getTransactions(
|
||||
maxTransactionsInHistory,
|
||||
0,
|
||||
)
|
||||
|
||||
if (result && result.length > 0) {
|
||||
if (dbTransactions && dbTransactions.length > 0) {
|
||||
// remove all from the transactionsStore model
|
||||
transactionsStore.removeAllTransactions()
|
||||
|
||||
@@ -90,7 +90,7 @@ export const DeveloperScreen: FC<SettingsStackScreenProps<'Developer'>> = observ
|
||||
transactionsStore.addRecentByUnit()
|
||||
|
||||
setIsLoading(false)
|
||||
setInfo(translate('resetCompletedDetail', { transCount: result.length }))
|
||||
setInfo(translate('resetCompletedDetail', { transCount: dbTransactions.length }))
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -291,10 +291,6 @@ export const ImportBackupScreen: FC<AppStackScreenProps<'ImportBackup'>> = obser
|
||||
|
||||
keys.SEED = seed
|
||||
|
||||
// save keys as we need them next for publishing the recovered profile to relays
|
||||
await KeyChain.saveWalletKeys(keys)
|
||||
walletStore.cleanCachedWalletKeys()
|
||||
|
||||
if(isNewProfileNeeded) {
|
||||
|
||||
await walletProfileStore.create(
|
||||
@@ -313,8 +309,10 @@ export const ImportBackupScreen: FC<AppStackScreenProps<'ImportBackup'>> = obser
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
await KeyChain.saveWalletKeys(keys)
|
||||
walletStore.cleanCachedWalletKeys()
|
||||
// force publish now that we have keys available
|
||||
await walletProfileStore.publishToRelays()
|
||||
userSettingsStore.setIsOnboarded(true)
|
||||
|
||||
if(!mintsStore.mintExists(MINIBITS_MINT_URL)) {
|
||||
|
||||
@@ -507,10 +507,6 @@ export const SeedRecoveryScreen: FC<AppStackScreenProps<'SeedRecovery'>> = obser
|
||||
|
||||
keys.SEED = seed
|
||||
|
||||
// save keys as we need them next for publishing the recovered profile to relays
|
||||
await KeyChain.saveWalletKeys(keys)
|
||||
walletStore.cleanCachedWalletKeys()
|
||||
|
||||
if(isNewProfileNeeded) {
|
||||
|
||||
await walletProfileStore.create(
|
||||
@@ -529,6 +525,10 @@ export const SeedRecoveryScreen: FC<AppStackScreenProps<'SeedRecovery'>> = obser
|
||||
)
|
||||
}
|
||||
|
||||
await KeyChain.saveWalletKeys(keys)
|
||||
walletStore.cleanCachedWalletKeys()
|
||||
// force publish now that we have keys available
|
||||
await walletProfileStore.publishToRelays()
|
||||
userSettingsStore.setIsOnboarded(true)
|
||||
|
||||
if(!mintsStore.mintExists(MINIBITS_MINT_URL)) {
|
||||
|
||||
@@ -702,6 +702,7 @@ const ReceiveInfoBlock = function (props: {
|
||||
url={sentFromUrl}
|
||||
/>
|
||||
<View style={$pictureContainer}>
|
||||
{profilePicture ? (
|
||||
<Image
|
||||
style={
|
||||
{
|
||||
@@ -711,8 +712,20 @@ const ReceiveInfoBlock = function (props: {
|
||||
}
|
||||
}
|
||||
source={{uri: profilePicture}}
|
||||
defaultSource={require('../../assets/icons/nostr.png')}
|
||||
/>
|
||||
// defaultSource={require('../../assets/icons/nostr.png')}
|
||||
/>
|
||||
):(
|
||||
<Image
|
||||
style={
|
||||
{
|
||||
width: verticalScale(40),
|
||||
height: verticalScale(40),
|
||||
borderRadius: verticalScale(40) / 2,
|
||||
}
|
||||
}
|
||||
source={require('../../assets/icons/nostr.png')}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
) : (
|
||||
|
||||
@@ -164,17 +164,30 @@ export const TransactionListItem = observer(function (
|
||||
if(profile && profile.picture) {
|
||||
return (
|
||||
<View style={$pictureContainer}>
|
||||
<Image
|
||||
style={
|
||||
{
|
||||
width: verticalScale(34),
|
||||
height: verticalScale(34),
|
||||
borderRadius: verticalScale(34) / 2,
|
||||
}
|
||||
}
|
||||
source={{uri: profile.picture}}
|
||||
defaultSource={require('../../../assets/icons/nostr.png')}
|
||||
/>
|
||||
{profile.picture ? (
|
||||
<Image
|
||||
style={
|
||||
{
|
||||
width: verticalScale(34),
|
||||
height: verticalScale(34),
|
||||
borderRadius: verticalScale(34) / 2,
|
||||
}
|
||||
}
|
||||
source={{uri: profile.picture}}
|
||||
// defaultSource={require('../../../assets/icons/nostr.png')}
|
||||
/>
|
||||
) : (
|
||||
<Image
|
||||
style={
|
||||
{
|
||||
width: verticalScale(34),
|
||||
height: verticalScale(34),
|
||||
borderRadius: verticalScale(34) / 2,
|
||||
}
|
||||
}
|
||||
source={require('../../../assets/icons/nostr.png')}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -108,11 +108,9 @@ export const WelcomeScreen: FC<AppStackScreenProps<'Welcome'>> =
|
||||
return
|
||||
}
|
||||
|
||||
setIsLoading(true)
|
||||
setIsLoading(true)
|
||||
|
||||
let walletKeys: WalletKeys | undefined = await KeyChain.getWalletKeys()
|
||||
|
||||
if(!walletKeys) {
|
||||
if(!await KeyChain.hasWalletKeys()) {
|
||||
setStatusMessage('Creating wallet keys...')
|
||||
|
||||
const keys = KeyChain.generateWalletKeys()
|
||||
|
||||
@@ -39,7 +39,7 @@ export type WalletKeys = {
|
||||
|
||||
const getSupportedBiometryType = async function () {
|
||||
try {
|
||||
const biometryType = await _Keychain.getSupportedBiometryType({})
|
||||
const biometryType = await _Keychain.getSupportedBiometryType()
|
||||
log.trace('biometryType', biometryType)
|
||||
return biometryType
|
||||
} catch (e: any) {
|
||||
@@ -174,6 +174,26 @@ const saveWalletKeys = async function (
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Has wallet keys in KeyChain/KeyStore
|
||||
*
|
||||
*/
|
||||
const hasWalletKeys = async function (): Promise<boolean> {
|
||||
try {
|
||||
const hasWalletKeys = await _Keychain.hasGenericPassword({
|
||||
service: KeyChainServiceName.KEYS,
|
||||
})
|
||||
|
||||
log.debug('[hasWalletKeys]', hasWalletKeys)
|
||||
|
||||
return hasWalletKeys
|
||||
|
||||
} catch (e: any) {
|
||||
throw new AppError(Err.KEYCHAIN_ERROR, e.message, e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Removes wallet keys from KeyChain/KeyStore
|
||||
*
|
||||
@@ -396,6 +416,7 @@ export const KeyChain = {
|
||||
saveWalletKeys,
|
||||
migrateWalletKeys,
|
||||
getWalletKeys,
|
||||
hasWalletKeys,
|
||||
removeWalletKeys,
|
||||
|
||||
generateAuthToken,
|
||||
|
||||
@@ -14,7 +14,7 @@ const {
|
||||
userSettingsStore
|
||||
} = rootStoreInstance
|
||||
|
||||
const customSentryTransport: transportFunctionType = props => {
|
||||
const customSentryTransport: transportFunctionType<{SENTRY: any}> = props => {
|
||||
|
||||
if (!props.options?.SENTRY) {
|
||||
throw Error('No sentry instance provided')
|
||||
@@ -27,7 +27,8 @@ const customSentryTransport: transportFunctionType = props => {
|
||||
|
||||
if (props.level.text === 'error') {
|
||||
// Capture error log
|
||||
if (props.rawMsg && props.rawMsg.stack && props.rawMsg.message) {
|
||||
const {stack, message} = props.rawMsg as Error
|
||||
if (stack && message) {
|
||||
// this is probably a JS error
|
||||
props.options.SENTRY.captureException(props.rawMsg)
|
||||
} else {
|
||||
@@ -53,7 +54,7 @@ const customSentryTransport: transportFunctionType = props => {
|
||||
}
|
||||
|
||||
|
||||
const log = logger.createLogger<LogLevel.TRACE | LogLevel.DEBUG | LogLevel.INFO | LogLevel.WARN | LogLevel.ERROR>({
|
||||
const log = logger.createLogger({
|
||||
severity: __DEV__ ? LogLevel.TRACE : LogLevel.DEBUG,
|
||||
levels: {
|
||||
trace: 0,
|
||||
|
||||
@@ -1160,4 +1160,4 @@ export const Database = {
|
||||
getProofs,
|
||||
getProofsByTransaction,
|
||||
updateProofsToDefaultUnit
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user