diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java index f99d8c5d8e..94b2845a2a 100644 --- a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java +++ b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java @@ -228,6 +228,16 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL } } catch (Exception e) { + } + try { + JSONObject whisperConfig = (JSONObject) jsonConfig.get("WhisperConfig"); + if (whisperConfig == null) { + whisperConfig = new JSONObject(); + } + whisperConfig.put("LightClient", true); + jsonConfig.put("WhisperConfig", whisperConfig); + } catch (Exception e) { + } jsonConfig.put("KeyStoreDir", newKeystoreDir); @@ -237,7 +247,16 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL Log.d(TAG, "Default configuration will be used"); } - Log.d(TAG, "Node config " + config); + String configOutput = config; + final int maxOutputLen = 4000; + while (!configOutput.isEmpty()) { + Log.d(TAG, "Node config:" + configOutput.substring(0, Math.min(maxOutputLen, configOutput.length()))); + if (configOutput.length() > maxOutputLen) { + configOutput = configOutput.substring(maxOutputLen); + } else { + break; + } + } String res = Statusgo.StartNode(config); if (res.startsWith("{\"error\":\"\"")) { diff --git a/modules/react-native-status/ios/RCTStatus/RCTStatus.m b/modules/react-native-status/ios/RCTStatus/RCTStatus.m index 2ded38d32f..cc91bde073 100644 --- a/modules/react-native-status/ios/RCTStatus/RCTStatus.m +++ b/modules/react-native-status/ios/RCTStatus/RCTStatus.m @@ -205,6 +205,7 @@ RCT_EXPORT_METHOD(startNode:(NSString *)configString) { [resultingConfigJson setValue:logUrl.path forKey:@"LogFile"]; [resultingConfigJson setValue:([logLevel length] == 0 ? [NSString stringWithUTF8String: "ERROR"] : logLevel) forKey:@"LogLevel"]; + [resultingConfigJson setValue:[NSNumber numberWithBool:YES] forKeyPath:@"WhisperConfig.LightClient"]; if(upstreamURL != nil) { [resultingConfigJson setValue:[NSNumber numberWithBool:YES] forKeyPath:@"UpstreamConfig.Enabled"]; [resultingConfigJson setValue:upstreamURL forKeyPath:@"UpstreamConfig.URL"];