refactor(local pair sync)_: move partial config to backend (#19753)
cba3ac57...90b18d4f
This commit is contained in:
parent
56ff84f475
commit
ce3d32dc0a
|
@ -47,7 +47,8 @@ class AccountManager(private val reactContext: ReactApplicationContext) : ReactC
|
|||
|
||||
private fun updateConfig(jsonConfigString: String, absRootDirPath: String, keystoreDirPath: String): String {
|
||||
val jsonConfig = JSONObject(jsonConfigString)
|
||||
val dataDirPath = jsonConfig.getString("DataDir")
|
||||
// when doing local pair syncing, backend will provide default data dir
|
||||
val dataDirPath = jsonConfig.optString("DataDir","")
|
||||
val logEnabled = jsonConfig.getBoolean("LogEnabled")
|
||||
val gethLogFile = if (logEnabled) logManager.prepareLogsFile(reactContext) else null
|
||||
val gethLogDirPath = gethLogFile?.parent
|
||||
|
@ -140,7 +141,6 @@ class AccountManager(private val reactContext: ReactApplicationContext) : ReactC
|
|||
updatedJsonConfigString
|
||||
} catch (e: JSONException) {
|
||||
Log.e(TAG, "updateConfig failed: ${e.message}")
|
||||
System.exit(1)
|
||||
""
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,6 +66,9 @@ RCT_EXPORT_METHOD(restoreAccountAndLogin:(NSString *)request) {
|
|||
NSData *configData = [config dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSDictionary *configJSON = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:nil];
|
||||
NSString *relativeDataDir = [configJSON objectForKey:@"DataDir"];
|
||||
if (relativeDataDir == nil) {
|
||||
relativeDataDir = @"";
|
||||
}
|
||||
NSString *absDataDir = [rootUrl.path stringByAppendingString:relativeDataDir];
|
||||
NSURL *absDataDirUrl = [NSURL fileURLWithPath:absDataDir];
|
||||
NSString *keystoreDir = [@"/keystore/" stringByAppendingString:keyUID];
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
[clojure.string :as string]
|
||||
[legacy.status-im.utils.deprecated-types :as types]
|
||||
[react-native.platform :as platform]
|
||||
[status-im.config :as config]
|
||||
[utils.ethereum.chain :as chain]))
|
||||
[status-im.config :as config]))
|
||||
|
||||
(defn- add-log-level
|
||||
[config log-level]
|
||||
|
@ -117,10 +116,7 @@
|
|||
{:keys [installation-id log-level
|
||||
waku-bloom-filter-mode]}
|
||||
profile]
|
||||
(cond-> {:NetworkId (chain/chain-keyword->chain-id :mainnet)
|
||||
:DataDir "/ethereum/mainnet_rpc"
|
||||
:UpstreamConfig {:Enabled true
|
||||
:URL config/mainnet-rpc-url}}
|
||||
(cond-> {}
|
||||
:always
|
||||
(get-base-node-config)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "v0.179.9",
|
||||
"commit-sha1": "ebca8b87d1c0a17262c604ea3c07157eaca7a7db",
|
||||
"src-sha256": "1nf0pz4k502vh1va1pc45birnm3p83y56a82cynj80y1y7rjmc2m"
|
||||
"version": "v0.179.10",
|
||||
"commit-sha1": "90b18d4f8801b09f68bb5b794a5b6af92001d26e",
|
||||
"src-sha256": "0dlrnpr7wj9z2ywm90avgdzdr9wg71dy82v5jjc9wmiz537mn7wy"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue