Skip to content

Commit

Permalink
Adapt to status-go backend changes for ConvertToKeycardAccount (#15846)
Browse files Browse the repository at this point in the history
  • Loading branch information
qfrank authored May 9, 2023
1 parent ebb110e commit c275205
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1354,11 +1354,12 @@ public void reEncryptDbAndKeystore(final String keyUID, final String password, f
}

@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);
}

Expand Down
3 changes: 2 additions & 1 deletion modules/react-native-status/ios/RCTStatus/RCTStatus.m
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ - (void) migrateKeystore:(NSString *)accountData
RCT_EXPORT_METHOD(convertToKeycardAccount:(NSString *)keyUID
accountData:(NSString *)accountData
settings:(NSString *)settings
keycardUID:(NSString *)keycardUID
currentPassword:(NSString *)currentPassword
newPassword:(NSString *)newPassword
callback:(RCTResponseSenderBlock)callback) {
Expand All @@ -700,7 +701,7 @@ - (void) migrateKeystore:(NSString *)accountData
#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]);
}

Expand Down
1 change: 1 addition & 0 deletions src/native_module/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@
key-uid
(types/clj->json multiaccount-data)
(types/clj->json settings)
""
current-password#
new-password
callback))
Expand Down
6 changes: 3 additions & 3 deletions status-go-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"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"
}

0 comments on commit c275205

Please sign in to comment.