Skip to content

Commit 0b57aec

Browse files
committed
chore: fix debugging mode detection for new arch
1 parent 5084d09 commit 0b57aec

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ FastRsa_kotlinVersion=1.7.0
22
FastRsa_minSdkVersion=21
33
FastRsa_targetSdkVersion=33
44
FastRsa_compileSdkVersion=33
5-
FastRsa_ndkversion=23.1.7779620
5+
FastRsa_ndkversion=28.0.13004108

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-fast-rsa",
3-
"version": "2.6.0",
3+
"version": "2.6.1",
44
"description": "library for use RSA",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ import { VerifyPSSBytesRequest } from './model/verify-pssbytes-request';
3434
import { VerifyPKCS1v15BytesRequest } from './model/verify-pkcs1v15-bytes-request';
3535

3636
const FastRSANativeModules = (NativeModules as NativeModulesDef).FastRsa;
37-
const isDebuggingEnabled = typeof atob !== 'undefined';
37+
const isDebuggingEnabled =
38+
typeof atob !== 'undefined' && typeof HermesInternal === 'undefined';
3839

3940
typeof global.FastRSACallPromise === 'undefined' &&
4041
!isDebuggingEnabled &&

src/utils/text-decoder.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { NativeModules } from 'react-native';
22

33
const FastRSANativeModules = (NativeModules as NativeModulesDef).FastRsa;
4-
const isDebuggingEnabled = typeof atob !== 'undefined';
4+
const isDebuggingEnabled =
5+
typeof atob !== 'undefined' && typeof HermesInternal === 'undefined';
56

67
typeof global.FastRSADecodeText === 'undefined' &&
78
!isDebuggingEnabled &&

src/utils/text-encoder.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { NativeModules } from 'react-native';
22

33
const FastRSANativeModules = (NativeModules as NativeModulesDef).FastRsa;
4-
const isDebuggingEnabled = typeof atob !== 'undefined';
4+
const isDebuggingEnabled =
5+
typeof atob !== 'undefined' && typeof HermesInternal === 'undefined';
56

67
typeof global.FastRSAEncodeText === 'undefined' &&
78
!isDebuggingEnabled &&

0 commit comments

Comments
 (0)