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 d9dc7d57ef..92198da015 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 @@ -312,10 +312,10 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL } @ReactMethod - public void saveAccountAndLogin(final String accountData, final String password, final String config, final String subAccountsData) { + public void saveAccountAndLogin(final String multiaccountData, final String password, final String config, final String accountsData) { Log.d(TAG, "saveAccountAndLogin"); String finalConfig = prepareDirAndUpdateConfig(config); - String result = Statusgo.saveAccountAndLogin(accountData, password, finalConfig, subAccountsData); + String result = Statusgo.saveAccountAndLogin(multiaccountData, password, finalConfig, accountsData); if (result.startsWith("{\"error\":\"\"")) { Log.d(TAG, "saveAccountAndLogin result: " + result); Log.d(TAG, "Geth node started"); @@ -325,10 +325,10 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL } @ReactMethod - public void saveAccountAndLoginWithKeycard(final String accountData, final String password, final String config, final String chatKey) { + public void saveAccountAndLoginWithKeycard(final String multiaccountData, final String password, final String config, final String accountsData, final String chatKey) { Log.d(TAG, "saveAccountAndLoginWithKeycard"); String finalConfig = prepareDirAndUpdateConfig(config); - String result = Statusgo.saveAccountAndLoginWithKeycard(accountData, password, finalConfig, chatKey); + String result = Statusgo.saveAccountAndLoginWithKeycard(multiaccountData, password, finalConfig, accountsData, chatKey); if (result.startsWith("{\"error\":\"\"")) { Log.d(TAG, "saveAccountAndLoginWithKeycard result: " + result); Log.d(TAG, "Geth node started"); diff --git a/modules/react-native-status/ios/RCTStatus/RCTStatus.m b/modules/react-native-status/ios/RCTStatus/RCTStatus.m index 03a59f075f..3e27a4de5c 100644 --- a/modules/react-native-status/ios/RCTStatus/RCTStatus.m +++ b/modules/react-native-status/ios/RCTStatus/RCTStatus.m @@ -378,28 +378,29 @@ RCT_EXPORT_METHOD(prepareDirAndUpdateConfig:(NSString *)config } //////////////////////////////////////////////////////////////////// saveAccountAndLogin -RCT_EXPORT_METHOD(saveAccountAndLogin:(NSString *)accountData +RCT_EXPORT_METHOD(saveAccountAndLogin:(NSString *)multiaccountData password:(NSString *)password config:(NSString *)config - subAccountsData:(NSString *)subAccountsData) { + accountsData:(NSString *)accountsData) { #if DEBUG NSLog(@"SaveAccountAndLogin() method called"); #endif NSString *finalConfig = [self prepareDirAndUpdateConfig:config]; - NSString *result = StatusgoSaveAccountAndLogin(accountData, password, finalConfig, subAccountsData); + NSString *result = StatusgoSaveAccountAndLogin(multiaccountData, password, finalConfig, accountsData); NSLog(@"%@", result); } //////////////////////////////////////////////////////////////////// saveAccountAndLoginWithKeycard -RCT_EXPORT_METHOD(saveAccountAndLoginWithKeycard:(NSString *)accountData +RCT_EXPORT_METHOD(saveAccountAndLoginWithKeycard:(NSString *)multiaccountData password:(NSString *)password config:(NSString *)config + accountsData:(NSString *)accountsData chatKey:(NSString *)chatKey) { #if DEBUG NSLog(@"SaveAccountAndLoginWithKeycard() method called"); #endif NSString *finalConfig = [self prepareDirAndUpdateConfig:config]; - NSString *result = StatusgoSaveAccountAndLoginWithKeycard(accountData, password, finalConfig, chatKey); + NSString *result = StatusgoSaveAccountAndLoginWithKeycard(multiaccountData, password, finalConfig, accountsData, chatKey); NSLog(@"%@", result); } diff --git a/src/status_im/multiaccounts/create/core.cljs b/src/status_im/multiaccounts/create/core.cljs index 566853ef9a..5488a74ab5 100644 --- a/src/status_im/multiaccounts/create/core.cljs +++ b/src/status_im/multiaccounts/create/core.cljs @@ -208,10 +208,11 @@ :chat true})]) (fx/defn save-account-and-login-with-keycard - [_ multiaccount-data password node-config chat-key] + [_ multiaccount-data password node-config accounts-data chat-key] {::save-account-and-login-with-keycard [(types/clj->json multiaccount-data) password node-config + (types/clj->json accounts-data) chat-key]}) (fx/defn save-account-and-login @@ -275,6 +276,7 @@ (save-account-and-login-with-keycard new-multiaccount password (node/get-new-config db) + accounts-data chat-key) (save-account-and-login multiaccount-data (ethereum/sha3 (security/safe-unmask-data password)) @@ -382,8 +384,9 @@ accounts-data))) (re-frame/reg-fx ::save-account-and-login-with-keycard - (fn [[multiaccount-data password config chat-key]] + (fn [[multiaccount-data password config accounts-data chat-key]] (status/save-account-and-login-with-keycard multiaccount-data (security/safe-unmask-data password) config + accounts-data chat-key))) diff --git a/src/status_im/native_module/core.cljs b/src/status_im/native_module/core.cljs index 2fd01588ac..b5187f8f4e 100644 --- a/src/status_im/native_module/core.cljs +++ b/src/status_im/native_module/core.cljs @@ -53,9 +53,9 @@ (defn save-account-and-login-with-keycard "NOTE: chat-key is a whisper private key sent from keycard" - [multiaccount-data password config chat-key] + [multiaccount-data password config accounts-data chat-key] (log/debug "[native-module] save-account-and-login-with-keycard") - (.saveAccountAndLoginWithKeycard (status) multiaccount-data password config chat-key)) + (.saveAccountAndLoginWithKeycard (status) multiaccount-data password config accounts-data chat-key)) (defn login "NOTE: beware, the password has to be sha3 hashed" diff --git a/status-go-version.json b/status-go-version.json index 0586dee152..bb50573cc8 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -2,7 +2,7 @@ "_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh ' instead", "owner": "status-im", "repo": "status-go", - "version": "v0.38.1", - "commit-sha1": "f8552280103000d720be98fa69ea09c7ae52d88f", - "src-sha256": "04nrwkj34hj6mdv8h1ky8fa1xxxh4vx1jss5x1rxjb46ckd808mq" + "version": "v0.38.2", + "commit-sha1": "655031616c46233e93767d8a3d8c54568ca043f2", + "src-sha256": "0bi1k1yf70zhayqd5lyrpc84nwdjvja1nsjj1pv75f1s0c2qbmw6" }