-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c55953b
commit e5d69d8
Showing
631 changed files
with
14,814 additions
and
10,853 deletions.
There are no files selected for viewing
13 changes: 0 additions & 13 deletions
13
.yarn/patches/@tamagui-animations-moti-npm-1.92.0-a8dde990ec.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/lib/browser/eip1193.js b/lib/browser/eip1193.js | ||
index ce028c25a164d8af8d513bc0eae4cf104234f6e8..81ba2f29d379f18c04c57b5a560cc6c4f4b57e0d 100644 | ||
--- a/lib/browser/eip1193.js | ||
+++ b/lib/browser/eip1193.js | ||
@@ -70,6 +70,7 @@ class Eip1193 extends eip1193_bridge_1.Eip1193Bridge { | ||
yield _super.send.call(this, method, params); | ||
// Providers will not "rewind" to an older block number nor notice chain changes, so they must be reset. | ||
this.utils.providers.forEach((provider) => provider.reset()); | ||
+ this.emit('chainChanged', params[0].chainId); | ||
break; | ||
default: | ||
result = yield _super.send.call(this, method, params); |
132 changes: 0 additions & 132 deletions
132
.yarn/patches/expo-local-authentication-npm-13.0.2-e7639a51e4.patch
This file was deleted.
Oops, something went wrong.
136 changes: 136 additions & 0 deletions
136
.yarn/patches/expo-local-authentication-npm-13.8.0-3a1b5c983f.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
diff --git a/android/src/main/java/expo/modules/localauthentication/LocalAuthenticationModule.kt b/android/src/main/java/expo/modules/localauthentication/LocalAuthenticationModule.kt | ||
index 996ee2ec5b77386b360fed3118fd6d6d4244d3c4..4aa70a89a7fb5d01b5b700d55c9817c213322e4d 100644 | ||
--- a/android/src/main/java/expo/modules/localauthentication/LocalAuthenticationModule.kt | ||
+++ b/android/src/main/java/expo/modules/localauthentication/LocalAuthenticationModule.kt | ||
@@ -4,6 +4,8 @@ package expo.modules.localauthentication | ||
import android.app.Activity | ||
import android.app.KeyguardManager | ||
import android.content.Context | ||
+import android.content.Intent | ||
+import android.provider.Settings | ||
import android.os.Build | ||
import android.os.Bundle | ||
import androidx.annotation.UiThread | ||
@@ -51,7 +53,7 @@ class LocalAuthenticationModule : Module() { | ||
|
||
AsyncFunction("supportedAuthenticationTypesAsync") { | ||
val results = mutableSetOf<Int>() | ||
- if (canAuthenticateUsingWeakBiometrics() == BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE) { | ||
+ if (canAuthenticateUsingStrongBiometrics() == BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE) { | ||
return@AsyncFunction results | ||
} | ||
|
||
@@ -67,12 +69,29 @@ class LocalAuthenticationModule : Module() { | ||
return@AsyncFunction results | ||
} | ||
|
||
+ AsyncFunction("enrollForAuthentication") { | ||
+ if (Build.VERSION.SDK_INT >= 30) { | ||
+ val intent = Intent(Settings.ACTION_BIOMETRIC_ENROLL) | ||
+ intent.putExtra( | ||
+ Settings.EXTRA_BIOMETRIC_AUTHENTICATORS_ALLOWED, | ||
+ BiometricManager.Authenticators.BIOMETRIC_STRONG | ||
+ ) | ||
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) | ||
+ currentActivity?.startActivity(intent) | ||
+ return@AsyncFunction true | ||
+ } else { | ||
+ val intent = Intent(Settings.ACTION_FINGERPRINT_ENROLL) | ||
+ currentActivity?.startActivity(intent) | ||
+ return@AsyncFunction true | ||
+ } | ||
+ } | ||
+ | ||
AsyncFunction("hasHardwareAsync") { | ||
- canAuthenticateUsingWeakBiometrics() != BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE | ||
+ canAuthenticateUsingStrongBiometrics() != BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE | ||
} | ||
|
||
AsyncFunction("isEnrolledAsync") { | ||
- canAuthenticateUsingWeakBiometrics() == BiometricManager.BIOMETRIC_SUCCESS | ||
+ canAuthenticateUsingStrongBiometrics() == BiometricManager.BIOMETRIC_SUCCESS | ||
} | ||
|
||
AsyncFunction("getEnrolledLevelAsync") { | ||
@@ -80,7 +99,7 @@ class LocalAuthenticationModule : Module() { | ||
if (isDeviceSecure) { | ||
level = SECURITY_LEVEL_SECRET | ||
} | ||
- if (canAuthenticateUsingWeakBiometrics() == BiometricManager.BIOMETRIC_SUCCESS) { | ||
+ if (canAuthenticateUsingStrongBiometrics() == BiometricManager.BIOMETRIC_SUCCESS) { | ||
level = SECURITY_LEVEL_BIOMETRIC | ||
} | ||
return@AsyncFunction level | ||
@@ -235,10 +254,19 @@ class LocalAuthenticationModule : Module() { | ||
if (disableDeviceFallback) { | ||
setNegativeButtonText(cancelLabel) | ||
} else { | ||
- setAllowedAuthenticators( | ||
- BiometricManager.Authenticators.BIOMETRIC_WEAK | ||
- or BiometricManager.Authenticators.DEVICE_CREDENTIAL | ||
- ) | ||
+ if (Build.VERSION.SDK_INT >= 30) { | ||
+ setAllowedAuthenticators( | ||
+ BiometricManager.Authenticators.BIOMETRIC_STRONG | ||
+ or BiometricManager.Authenticators.DEVICE_CREDENTIAL | ||
+ ) | ||
+ } else { | ||
+ setAllowedAuthenticators( | ||
+ BiometricManager.Authenticators.BIOMETRIC_STRONG | ||
+ ) | ||
+ cancelLabel?.let { | ||
+ setNegativeButtonText(it) | ||
+ } | ||
+ } | ||
} | ||
setConfirmationRequired(requireConfirmation) | ||
} | ||
@@ -336,6 +364,9 @@ class LocalAuthenticationModule : Module() { | ||
private fun canAuthenticateUsingWeakBiometrics(): Int = | ||
biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK) | ||
|
||
+ private fun canAuthenticateUsingStrongBiometrics(): Int = | ||
+ biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_STRONG) | ||
+ | ||
private fun createResponse( | ||
error: String? = null, | ||
warning: String? = null | ||
diff --git a/src/LocalAuthentication.ts b/src/LocalAuthentication.ts | ||
index b9f3f0732b61138f790e7c3a33a92d8d726a71f1..b847e90d87e91e4a5be83d1b9c90dbc6fe6188bb 100644 | ||
--- a/src/LocalAuthentication.ts | ||
+++ b/src/LocalAuthentication.ts | ||
@@ -78,12 +78,17 @@ export async function getEnrolledLevelAsync(): Promise<SecurityLevel> { | ||
* @return Returns a promise which fulfils with [`LocalAuthenticationResult`](#localauthenticationresult). | ||
*/ | ||
export async function authenticateAsync( | ||
- options: LocalAuthenticationOptions = {} | ||
+ options: LocalAuthenticationOptions | ||
): Promise<LocalAuthenticationResult> { | ||
if (!ExpoLocalAuthentication.authenticateAsync) { | ||
throw new UnavailabilityError('expo-local-authentication', 'authenticateAsync'); | ||
} | ||
|
||
+ invariant( | ||
+ typeof options.cancelLabel === 'string' && options.cancelLabel.length, | ||
+ 'LocalAuthentication.authenticateAsync : `options.cancelLabel` must be a non-empty string.' | ||
+ ); | ||
+ | ||
if (options.hasOwnProperty('promptMessage')) { | ||
invariant( | ||
typeof options.promptMessage === 'string' && options.promptMessage.length, | ||
diff --git a/src/LocalAuthentication.types.ts b/src/LocalAuthentication.types.ts | ||
index a65b16d5bc5d18c03cee3ca8e4d223c9b736659b..d1ae18df61714b2bd44f3b9867718568707c1dc6 100644 | ||
--- a/src/LocalAuthentication.types.ts | ||
+++ b/src/LocalAuthentication.types.ts | ||
@@ -42,9 +42,9 @@ export type LocalAuthenticationOptions = { | ||
*/ | ||
promptMessage?: string; | ||
/** | ||
- * Allows to customize the default `Cancel` label shown. | ||
+ * Allows to customize the default `Cancel` label shown. Required to be non-empty for Android or it might cause crashes. | ||
*/ | ||
- cancelLabel?: string; | ||
+ cancelLabel: string; | ||
/** | ||
* After several failed attempts the system will fallback to the device passcode. This setting | ||
* allows you to disable this option and instead handle the fallback yourself. This can be |
19 changes: 19 additions & 0 deletions
19
.yarn/patches/react-native-context-menu-view-npm-1.15.0-c8a9d10d8c.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.java b/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.java | ||
index 9fc8eeb9b6b66061fca818a17127ff6f21df3126..6a3c9f1addd4bd8bcea3afc2e60aca52cd4c8248 100644 | ||
--- a/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.java | ||
+++ b/android/src/main/java/com/mpiannucci/reactnativecontextmenu/ContextMenuView.java | ||
@@ -67,6 +67,14 @@ public class ContextMenuView extends ReactViewGroup implements View.OnCreateCont | ||
} | ||
} | ||
} | ||
+ | ||
+ @Override | ||
+ public boolean onDoubleTap(MotionEvent e) { | ||
+ if (dropdownMenuMode && !disabled) { | ||
+ showContextMenu(e.getX(), e.getY()); | ||
+ } | ||
+ return super.onSingleTapConfirmed(e); | ||
+ } | ||
}); | ||
} | ||
|
70 changes: 0 additions & 70 deletions
70
.yarn/patches/react-native-context-menu-view-npm-1.6.0-f5f5410f50.patch
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.