@coinflowlabs/react-native 1.0.0-SNAPSHOT.2 → 1.0.0-SNAPSHOT.4
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/build/CoinflowWebView.js +19 -17
- package/build/CoinflowWebView.js.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/package.json +3 -2
package/build/CoinflowWebView.js
CHANGED
|
@@ -6,23 +6,25 @@ export function CoinflowWebView(props) {
|
|
|
6
6
|
var url = useMemo(function () {
|
|
7
7
|
return ReactNativeCoinflowUtils.getCoinflowUrl(props);
|
|
8
8
|
}, [props]);
|
|
9
|
-
if (!props.publicKey)
|
|
10
|
-
return null;
|
|
11
9
|
var handleIframeMessages = props.handleIframeMessages, WebViewRef = props.WebViewRef, style = props.style, onLoad = props.onLoad;
|
|
12
|
-
return useMemo(function () {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
return useMemo(function () {
|
|
11
|
+
if (!props.publicKey)
|
|
12
|
+
return null;
|
|
13
|
+
return (React.createElement(WebView, { style: [
|
|
14
|
+
{
|
|
15
|
+
flex: 1,
|
|
16
|
+
},
|
|
17
|
+
style,
|
|
18
|
+
], keyboardDisplayRequiresUserAction: false, showsVerticalScrollIndicator: false, onShouldStartLoadWithRequest: function (request) {
|
|
19
|
+
// TODO handle other explorers
|
|
20
|
+
if (request.url.includes('solscan')) {
|
|
21
|
+
Linking.openURL(request.url).catch();
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
return true;
|
|
25
|
+
}, ref: WebViewRef, source: { uri: url }, onMessage: function (event) {
|
|
26
|
+
return handleIframeMessages({ data: event.nativeEvent.data });
|
|
27
|
+
}, onLoad: onLoad }));
|
|
28
|
+
}, [url]);
|
|
27
29
|
}
|
|
28
30
|
//# sourceMappingURL=CoinflowWebView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowWebView.js","sourceRoot":"","sources":["../src/CoinflowWebView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AAGpE,MAAM,UAAU,eAAe,CAAC,KAAwC;IACtE,IAAM,GAAG,GAAG,OAAO,CAAC;QAClB,OAAO,wBAAwB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"CoinflowWebView.js","sourceRoot":"","sources":["../src/CoinflowWebView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AAGpE,MAAM,UAAU,eAAe,CAAC,KAAwC;IACtE,IAAM,GAAG,GAAG,OAAO,CAAC;QAClB,OAAO,wBAAwB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEL,IAAA,oBAAoB,GAA+B,KAAK,qBAApC,EAAE,UAAU,GAAmB,KAAK,WAAxB,EAAE,KAAK,GAAY,KAAK,MAAjB,EAAE,MAAM,GAAI,KAAK,OAAT,CAAU;IAChE,OAAO,OAAO,CAAC;QACb,IAAI,CAAC,KAAK,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC;QAElC,OAAO,CACL,oBAAC,OAAO,IACN,KAAK,EAAE;gBACL;oBACE,IAAI,EAAE,CAAC;iBACR;gBACD,KAAK;aACN,EACD,iCAAiC,EAAE,KAAK,EACxC,4BAA4B,EAAE,KAAK,EACnC,4BAA4B,EAAE,UAAA,OAAO;gBACnC,8BAA8B;gBAC9B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;oBACnC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;oBACrC,OAAO,KAAK,CAAC;iBACd;gBACD,OAAO,IAAI,CAAC;YACd,CAAC,EACD,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,EAAC,GAAG,EAAE,GAAG,EAAC,EAClB,SAAS,EAAE,UAAA,KAAK;gBACd,OAAA,oBAAoB,CAAC,EAAC,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI,EAAC,CAAC;YAApD,CAAoD,EAEtD,MAAM,EAAE,MAAM,GACd,CACH,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACZ,CAAC"}
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAC;AAExC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinflowlabs/react-native",
|
|
3
|
-
"version": "1.0.0-SNAPSHOT.
|
|
3
|
+
"version": "1.0.0-SNAPSHOT.4",
|
|
4
4
|
"description": "React Native Component for Coinflow",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -36,11 +36,12 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
+
"react-native-get-random-values": "^1.8.0",
|
|
39
40
|
"bs58": "^5.0.0",
|
|
40
41
|
"bn.js": "^5.2.1"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
|
-
"@types/react": "^18.0
|
|
44
|
+
"@types/react": "^18.2.0",
|
|
44
45
|
"@types/react-native": "^0.71.6",
|
|
45
46
|
"eslint-config-react-app": "^7.0.1",
|
|
46
47
|
"typescript": "^5.0.4",
|