[#3174] add js injection support for service worker

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Dmitry Novotochinov 2018-04-13 11:51:55 +03:00 committed by Andrey Shovkoplyas
parent 210ea5df7d
commit 05379747da
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
7 changed files with 13 additions and 4 deletions

1
.env
View File

@ -17,3 +17,4 @@ MIXPANEL_TOKEN=3f2e1a8970f159aa2a3d5dc5d65eab38
DEFAULT_NETWORK=mainnet_rpc
TESTFAIRY_TOKEN=969f6c921cb435cea1d41d1ea3f5b247d6026d55
INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c
DEBUG_WEBVIEW=1

View File

@ -15,4 +15,5 @@ MIXPANEL_TOKEN=3f2e1a8970f159aa2a3d5dc5d65eab38
POW_TARGET=0.002
POW_TIME=1
DEFAULT_NETWORK=testnet_rpc
INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c
INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c
DEBUG_WEBVIEW=1

View File

@ -17,3 +17,4 @@ POW_TARGET=0.002
POW_TIME=1
DEFAULT_NETWORK=mainnet_rpc
INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c
DEBUG_WEBVIEW=1

View File

@ -17,3 +17,4 @@ POW_TARGET=0.002
POW_TIME=1
DEFAULT_NETWORK=testnet_rpc
INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c
DEBUG_WEBVIEW=0

View File

@ -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<String, String> callRPC = statusPackage.getCallRPC();
List<ReactPackage> packages = new ArrayList<ReactPackage>(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")

2
package-lock.json generated
View File

@ -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"

View File

@ -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",