@walletconnect/react-native-compat 2.21.5-canary-native-fix.1 → 2.21.5-canary-native-fix.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,13 @@
1
1
  package com.walletconnect.reactnativemodule
2
2
 
3
- import com.facebook.react.BaseReactPackage
3
+ import com.facebook.react.TurboReactPackage
4
4
  import com.facebook.react.bridge.ReactApplicationContext
5
5
  import com.facebook.react.bridge.NativeModule
6
6
  import com.facebook.react.module.model.ReactModuleInfoProvider
7
7
  import com.facebook.react.module.model.ReactModuleInfo
8
8
  import java.util.HashMap
9
9
 
10
- class RNWalletConnectModulePackage : BaseReactPackage() {
11
- override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
12
- return listOf(RNWalletConnectModuleModule(reactContext))
13
- }
14
-
10
+ class RNWalletConnectModulePackage : TurboReactPackage() {
15
11
  override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? {
16
12
  return if (name == RNWalletConnectModuleModule.NAME) {
17
13
  RNWalletConnectModuleModule(reactContext)
@@ -23,13 +19,15 @@ class RNWalletConnectModulePackage : BaseReactPackage() {
23
19
  override fun getReactModuleInfoProvider(): ReactModuleInfoProvider {
24
20
  return ReactModuleInfoProvider {
25
21
  val moduleInfos: MutableMap<String, ReactModuleInfo> = HashMap()
22
+ val isTurboModule: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
26
23
  moduleInfos[RNWalletConnectModuleModule.NAME] = ReactModuleInfo(
27
24
  RNWalletConnectModuleModule.NAME,
28
25
  RNWalletConnectModuleModule.NAME,
29
26
  false, // canOverrideExistingModule
30
27
  false, // needsEagerInit
31
28
  true, // hasConstants
32
- false // isCxxModule
29
+ false, // isCxxModule,
30
+ isTurboModule // isTurboModule
33
31
  )
34
32
  moduleInfos
35
33
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walletconnect/react-native-compat",
3
3
  "description": "Shims for WalletConnect Protocol in React Native Projects",
4
- "version": "2.21.5-canary-native-fix.1",
4
+ "version": "2.21.5-canary-native-fix.2",
5
5
  "author": "WalletConnect, Inc. <walletconnect.com>",
6
6
  "homepage": "https://github.com/walletconnect/walletconnect-monorepo/",
7
7
  "license": "Apache-2.0",