fix compatibility with ConvertToKeycardAccount after recent changes

This commit is contained in:
Roman Volosovskyi 2023-02-02 12:05:21 +01:00
parent eed38fe082
commit db417cb3a3
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
6 changed files with 15 additions and 13 deletions

View File

@ -1307,8 +1307,10 @@ 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 {
final String keyStoreDir = this.getKeyStorePath(keyUID);
// Temporary fix for broken status-go compatibilty
executeRunnableStatusGoMethod(() -> Statusgo.convertToKeycardAccount(accountData, options, password, newPassword), callback);
executeRunnableStatusGoMethod(() -> {
Statusgo.initKeystore(keyStoreDir);
return Statusgo.convertToKeycardAccount(accountData, options, password, newPassword);
}, callback);
}
}

View File

@ -694,6 +694,7 @@ RCT_EXPORT_METHOD(convertToKeycardAccount:(NSString *)keyUID
NSLog(@"convertToKeycardAccount() method called");
#endif
NSURL *multiaccountKeystoreDir = [self getKeyStoreDir:keyUID];
StatusgoInitKeystore(multiaccountKeystoreDir.path);
NSString *result = StatusgoConvertToKeycardAccount(accountData, settings, currentPassword, newPassword);
callback(@[result]);
}

View File

@ -26,7 +26,7 @@
(rf/defn dispatch-event
[_ event]
{:dispatch [event]})
{:dispatch-n [[event]]})
(defn vector->string
"Converts numbers stored in vector into string,

View File

@ -276,12 +276,11 @@
(common/vector->string (get-in db
[:keycard :pin
:current])))]
(rf/merge cofx
{:keycard/generate-and-load-key
{:mnemonic mnemonic
:pin pin'
:key-uid (:key-uid multiaccount)
:delete-multiaccount? (get-in db [:keycard :delete-account?])}})))
{:keycard/generate-and-load-key
{:mnemonic mnemonic
:pin pin'
:key-uid (:key-uid multiaccount)
:delete-multiaccount? (get-in db [:keycard :delete-account?])}}))
(rf/defn factory-reset-card-toggle
{:events [:keycard.onboarding.intro.ui/factory-reset-card-toggle]}

View File

@ -3,7 +3,7 @@
(rf/defn show-bottom-sheet
[{:keys [db]} {:keys [view options]}]
{:dispatch [:dismiss-keyboard]
{:dispatch-n [[:dismiss-keyboard]]
:show-bottom-sheet-overlay nil
:db (assoc db
:bottom-sheet/show? true

View File

@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v0.128.0",
"commit-sha1": "82596b2b67f82ae6329ad88e34be6240d08c8ff1",
"src-sha256": "17n461i2cglvs66rpqxdxpka4k9ld9ds2ha6scdli2nrfg9jb4q3"
"version": "v0.128.1",
"commit-sha1": "551715f493130f436a1f0c1b42efe84720f7e55c",
"src-sha256": "1p546m1qghay1j3yawgiadgcim95ld9qafxs3rarvr4xjppj0qgn"
}