fix: check backup file version first before importing

This commit is contained in:
Baptiste Grob
2020-09-08 18:01:05 +02:00
parent a1727b1b1e
commit 6f798e3ba9

View File

@@ -346,7 +346,7 @@ class AccountMenuCtrl extends PureCtrl {
if (!data) {
return;
}
const version = data?.auth_params?.version || data?.keyParams?.version;
const version = data.version || data.auth_params?.version || data?.keyParams?.version;
if (!protocolManager.supportedVersions().includes(version)) {
this.setState({ importData: null });
this.alertManager.alert({ text: STRING_IMPORT_FAILED_NEWER_BACKUP });