@walletconnect/react-native-compat 2.10.0-canary-af1c2bee → 2.10.0-rc-a6fe729
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +12 -0
- package/package.json +4 -2
package/index.js
CHANGED
@@ -4,6 +4,9 @@ import "fast-text-encoding";
|
|
4
4
|
// Polyfill crypto.getRandomvalues
|
5
5
|
import "react-native-get-random-values";
|
6
6
|
|
7
|
+
// Polyfill URL()
|
8
|
+
import "react-native-url-polyfill/auto";
|
9
|
+
|
7
10
|
// Polyfill Buffer
|
8
11
|
if (typeof Buffer === "undefined") {
|
9
12
|
global.Buffer = require("buffer").Buffer;
|
@@ -26,3 +29,12 @@ if (typeof global?.Platform === "undefined") {
|
|
26
29
|
console.error("react-native-compat: react-native.Platform is not available");
|
27
30
|
}
|
28
31
|
}
|
32
|
+
|
33
|
+
if (typeof global?.NetInfo === "undefined") {
|
34
|
+
try {
|
35
|
+
global.NetInfo = require("@react-native-community/netinfo");
|
36
|
+
} catch (e) {
|
37
|
+
// eslint-disable-next-line no-console
|
38
|
+
console.error("react-native-compat: react-native.NetInfo is not available", e);
|
39
|
+
}
|
40
|
+
}
|
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.10.0-
|
4
|
+
"version": "2.10.0-rc-a6fe729",
|
5
5
|
"author": "WalletConnect, Inc. <walletconnect.com>",
|
6
6
|
"homepage": "https://github.com/walletconnect/walletconnect-monorepo/",
|
7
7
|
"license": "Apache-2.0",
|
@@ -22,10 +22,12 @@
|
|
22
22
|
},
|
23
23
|
"dependencies": {
|
24
24
|
"events": "3.3.0",
|
25
|
-
"fast-text-encoding": "^1.0.6"
|
25
|
+
"fast-text-encoding": "^1.0.6",
|
26
|
+
"react-native-url-polyfill": "^2.0.0"
|
26
27
|
},
|
27
28
|
"peerDependencies": {
|
28
29
|
"@react-native-async-storage/async-storage": "*",
|
30
|
+
"@react-native-community/netinfo": "*",
|
29
31
|
"react-native-get-random-values": "*"
|
30
32
|
}
|
31
33
|
}
|