@walletconnect/react-native-compat 2.23.1-canary.0 → 2.23.1-canary.1
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.
package/android/build.gradle
CHANGED
|
@@ -112,7 +112,12 @@ dependencies {
|
|
|
112
112
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
113
113
|
|
|
114
114
|
// Yttrium - WalletConnect Pay uniffi bindings
|
|
115
|
-
implementation("com.github.reown-com.yttrium:yttrium-wcpay:0.9.119")
|
|
115
|
+
implementation("com.github.reown-com.yttrium:yttrium-wcpay:0.9.119") {
|
|
116
|
+
// Exclude JNA jar, we'll use the AAR version for Android
|
|
117
|
+
exclude group: 'net.java.dev.jna', module: 'jna'
|
|
118
|
+
}
|
|
119
|
+
// JNA for Android (AAR with native libraries)
|
|
120
|
+
implementation "net.java.dev.jna:jna:5.17.0@aar"
|
|
116
121
|
|
|
117
122
|
// Coroutines for async uniffi calls
|
|
118
123
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
|
package/android/src/main/java/com/walletconnect/reactnativemodule/RNWalletConnectPayModule.kt
CHANGED
|
@@ -4,7 +4,7 @@ import com.facebook.react.bridge.ReactApplicationContext
|
|
|
4
4
|
import com.facebook.react.bridge.ReactMethod
|
|
5
5
|
import com.facebook.react.bridge.Promise
|
|
6
6
|
import kotlinx.coroutines.*
|
|
7
|
-
import uniffi.
|
|
7
|
+
import uniffi.yttrium_wcpay.WalletConnectPayJson
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* React Native module for WalletConnect Pay
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
2
|
-
import { getApplicationModule } from "./module/index.ts";
|
|
2
|
+
import { getApplicationModule, getPayModule } from "./module/index.ts";
|
|
3
3
|
|
|
4
4
|
// Polyfill TextEncode / TextDecode
|
|
5
5
|
import "fast-text-encoding";
|
|
@@ -76,3 +76,18 @@ if (typeof global?.Application === "undefined") {
|
|
|
76
76
|
console.error("react-native-compat: Application module is not available");
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
|
|
80
|
+
// Set up globalThis.ReactNative.NativeModules.RNWalletConnectPay for @walletconnect/pay
|
|
81
|
+
try {
|
|
82
|
+
const payModule = getPayModule();
|
|
83
|
+
if (payModule) {
|
|
84
|
+
if (typeof globalThis.ReactNative === "undefined") {
|
|
85
|
+
globalThis.ReactNative = { NativeModules: {} };
|
|
86
|
+
} else if (!globalThis.ReactNative.NativeModules) {
|
|
87
|
+
globalThis.ReactNative.NativeModules = {};
|
|
88
|
+
}
|
|
89
|
+
globalThis.ReactNative.NativeModules.RNWalletConnectPay = payModule;
|
|
90
|
+
}
|
|
91
|
+
} catch (e) {
|
|
92
|
+
// Pay module not available - this is fine, it's optional
|
|
93
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walletconnect/react-native-compat",
|
|
3
3
|
"description": "Native modules and shims for WalletConnect Protocol in React Native Projects",
|
|
4
|
-
"version": "2.23.1-canary.
|
|
4
|
+
"version": "2.23.1-canary.1",
|
|
5
5
|
"author": "WalletConnect, Inc. <walletconnect.com>",
|
|
6
6
|
"homepage": "https://github.com/walletconnect/walletconnect-monorepo/",
|
|
7
7
|
"license": "SEE LICENSE IN LICENSE.md",
|