From c275205bed9d5abb93914fa6abafe52e30b6fc7d Mon Sep 17 00:00:00 2001 From: frank Date: Tue, 9 May 2023 20:51:08 +0800 Subject: [PATCH] Adapt to status-go backend changes for ConvertToKeycardAccount (#15846) --- .../main/java/im/status/ethereum/module/StatusModule.java | 5 +++-- modules/react-native-status/ios/RCTStatus/RCTStatus.m | 3 ++- src/native_module/core.cljs | 1 + status-go-version.json | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) 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 e315e99412..9a06de2aa2 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 @@ -1354,11 +1354,12 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL } @ReactMethod - public void convertToKeycardAccount(final String keyUID, final String accountData, final String options, final String password, final String newPassword, final Callback callback) throws JSONException { + public void convertToKeycardAccount(final String keyUID, final String accountData, final String options, final String keycardUID, final String password, + final String newPassword, final Callback callback) throws JSONException { final String keyStoreDir = this.getKeyStorePath(keyUID); executeRunnableStatusGoMethod(() -> { Statusgo.initKeystore(keyStoreDir); - return Statusgo.convertToKeycardAccount(accountData, options, password, newPassword); + return Statusgo.convertToKeycardAccount(accountData, options, keycardUID, password, newPassword); }, callback); } diff --git a/modules/react-native-status/ios/RCTStatus/RCTStatus.m b/modules/react-native-status/ios/RCTStatus/RCTStatus.m index c86e428ddb..be22920d7b 100644 --- a/modules/react-native-status/ios/RCTStatus/RCTStatus.m +++ b/modules/react-native-status/ios/RCTStatus/RCTStatus.m @@ -692,6 +692,7 @@ RCT_EXPORT_METHOD(reEncryptDbAndKeystore:(NSString *)keyUID RCT_EXPORT_METHOD(convertToKeycardAccount:(NSString *)keyUID accountData:(NSString *)accountData settings:(NSString *)settings + keycardUID:(NSString *)keycardUID currentPassword:(NSString *)currentPassword newPassword:(NSString *)newPassword callback:(RCTResponseSenderBlock)callback) { @@ -700,7 +701,7 @@ RCT_EXPORT_METHOD(convertToKeycardAccount:(NSString *)keyUID #endif NSURL *multiaccountKeystoreDir = [self getKeyStoreDir:keyUID]; StatusgoInitKeystore(multiaccountKeystoreDir.path); - NSString *result = StatusgoConvertToKeycardAccount(accountData, settings, currentPassword, newPassword); + NSString *result = StatusgoConvertToKeycardAccount(accountData, settings, keycardUID, currentPassword, newPassword); callback(@[result]); } diff --git a/src/native_module/core.cljs b/src/native_module/core.cljs index 4ec7f7b584..26ff69457a 100644 --- a/src/native_module/core.cljs +++ b/src/native_module/core.cljs @@ -513,6 +513,7 @@ key-uid (types/clj->json multiaccount-data) (types/clj->json settings) + "" current-password# new-password callback)) diff --git a/status-go-version.json b/status-go-version.json index d91f979438..21478d9f26 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "v0.148.4", - "commit-sha1": "269bbc1429c354f5e0a625f9118c643b5a8babd4", - "src-sha256": "077biyv345psjihyi8zar7wq1kz9v8q1p31icwvj6zfcs28l21jg" + "version": "v0.150.2", + "commit-sha1": "31144ed5a38589fd129945b634f54e800b39645a", + "src-sha256": "0jh6bidhf0gs15samqh5whw4iigr7ql11cx0v6ma7achr6j4r1d2" }