diff --git a/.env b/.env index 8ecc7624a0..2cecb7f3f0 100644 --- a/.env +++ b/.env @@ -17,3 +17,4 @@ MIXPANEL_TOKEN=3f2e1a8970f159aa2a3d5dc5d65eab38 DEFAULT_NETWORK=mainnet_rpc TESTFAIRY_TOKEN=969f6c921cb435cea1d41d1ea3f5b247d6026d55 INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c +DEBUG_WEBVIEW=1 diff --git a/.env.e2e b/.env.e2e index fa7ceb6d99..47820bbe50 100644 --- a/.env.e2e +++ b/.env.e2e @@ -15,4 +15,5 @@ MIXPANEL_TOKEN=3f2e1a8970f159aa2a3d5dc5d65eab38 POW_TARGET=0.002 POW_TIME=1 DEFAULT_NETWORK=testnet_rpc -INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c \ No newline at end of file +INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c +DEBUG_WEBVIEW=1 diff --git a/.env.jenkins b/.env.jenkins index a12b00e1f9..eca125e2f3 100644 --- a/.env.jenkins +++ b/.env.jenkins @@ -17,3 +17,4 @@ POW_TARGET=0.002 POW_TIME=1 DEFAULT_NETWORK=mainnet_rpc INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c +DEBUG_WEBVIEW=1 diff --git a/.env.prod b/.env.prod index 2087053a55..18c33a60bc 100644 --- a/.env.prod +++ b/.env.prod @@ -17,3 +17,4 @@ POW_TARGET=0.002 POW_TIME=1 DEFAULT_NETWORK=testnet_rpc INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c +DEBUG_WEBVIEW=0 diff --git a/android/app/src/main/java/im/status/ethereum/MainApplication.java b/android/app/src/main/java/im/status/ethereum/MainApplication.java index 135421afe5..1e18833813 100644 --- a/android/app/src/main/java/im/status/ethereum/MainApplication.java +++ b/android/app/src/main/java/im/status/ethereum/MainApplication.java @@ -50,6 +50,11 @@ public class MainApplication extends MultiDexApplication implements ReactApplica jscEnabled = true; } + boolean webViewDebugEnabled = false; + if (BuildConfig.DEBUG_WEBVIEW == "1") { + webViewDebugEnabled = true; + } + StatusPackage statusPackage = new StatusPackage(BuildConfig.DEBUG, devCluster, jscEnabled, BuildConfig.LOG_LEVEL_STATUS_GO); Function callRPC = statusPackage.getCallRPC(); List packages = new ArrayList(Arrays.asList( @@ -69,7 +74,7 @@ public class MainApplication extends MultiDexApplication implements ReactApplica new ImageResizerPackage(), new PickerPackage(), new TestFairyPackage(), - new WebViewBridgePackage(BuildConfig.DEBUG, callRPC), + new WebViewBridgePackage(webViewDebugEnabled, callRPC), new ReactNativeConfigPackage(), new RNInstabugReactnativePackage.Builder(BuildConfig.INSTABUG_TOKEN,MainApplication.this) .setInvocationEvent("shake") diff --git a/package-lock.json b/package-lock.json index efe7a444bf..b617cf9877 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7282,7 +7282,7 @@ } }, "react-native-webview-bridge": { - "version": "github:status-im/react-native-webview-bridge#b4200c08c0036a90ee07199b118849a65c7cc635", + "version": "github:status-im/react-native-webview-bridge#9b40cce26f1732772dbbeac11fe2fda44fb8703c", "requires": { "invariant": "2.2.0", "keymirror": "0.1.1" diff --git a/package.json b/package.json index 88b81665bc..5c348b81eb 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "react-native-tcp": "3.3.0", "react-native-testfairy": "2.8.0", "react-native-udp": "2.2.1", - "react-native-webview-bridge": "github:status-im/react-native-webview-bridge#feature/camera-permissions", + "react-native-webview-bridge": "github:status-im/react-native-webview-bridge#fix-web3-injection", "realm": "2.3.3", "rn-snoopy": "github:status-im/rn-snoopy", "string_decoder": "0.10.31",