@exodus/react-native-webview 11.26.1-exodus.26 → 11.26.1-exodus.27

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.
@@ -171,6 +171,7 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
171
171
  public RNCWebViewManager() {
172
172
  cameraPermissionOriginWhitelist = new HashSet<>();
173
173
  cameraPermissionOriginWhitelist.add("https://alchemy.veriff.com/");
174
+ cameraPermissionOriginWhitelist.add("https://magic.veriff.me/");
174
175
 
175
176
  mWebViewConfig = new WebViewConfig() {
176
177
  public void configWebView(WebView webView) {
@@ -28,7 +28,7 @@ export declare const useWebWiewLogic: ({ startInLoadingState, onLoadStart, onLoa
28
28
  onLoadingFinish: (event: WebViewNavigationEvent) => void;
29
29
  onMessage: (event: WebViewMessageEvent) => void;
30
30
  onOpenWindow: (event: WebViewOpenWindowEvent) => void;
31
- passesWhitelist: (url: string) => boolean | null;
31
+ passesWhitelist: (url: string) => boolean | "";
32
32
  viewState: "IDLE" | "LOADING" | "ERROR";
33
33
  setViewState: React.Dispatch<React.SetStateAction<"IDLE" | "LOADING" | "ERROR">>;
34
34
  lastErrorEvent: WebViewError | null;
@@ -17,9 +17,7 @@ const matchWithStringList = (prefixes, value) => {
17
17
  const _passesWhitelist = (compiledWhitelist, url) => {
18
18
  try {
19
19
  const { origin } = new URL(url);
20
- if (!origin)
21
- return null;
22
- return matchWithRegexList(compiledWhitelist, origin);
20
+ return origin && matchWithRegexList(compiledWhitelist, origin);
23
21
  }
24
22
  catch {
25
23
  return false;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "Thibault Malbranche <malbranche.thibault@gmail.com>"
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "11.26.1-exodus.26",
12
+ "version": "11.26.1-exodus.27",
13
13
  "homepage": "https://github.com/ExodusMovement/react-native-webview#readme",
14
14
  "scripts": {
15
15
  "android": "react-native run-android",