refactor: use new snjs protocol upgrade API
This commit is contained in:
@@ -168,13 +168,14 @@ export class WebApplication extends SNApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async performProtocolUpgrade() {
|
async performProtocolUpgrade() {
|
||||||
const errors = await this.upgradeProtocolVersion();
|
const result = await this.upgradeProtocolVersion();
|
||||||
if (!errors || errors.length === 0) {
|
if (result.success) {
|
||||||
this.alertService!.alert(
|
this.alertService!.alert(
|
||||||
"Success! Your encryption version has been upgraded." +
|
"Success! Your encryption version has been upgraded." +
|
||||||
" You'll be asked to enter your credentials again on other devices you're signed into."
|
" You'll be asked to enter your credentials again on other devices you're signed into."
|
||||||
);
|
);
|
||||||
} else {
|
} else if (result.error) {
|
||||||
|
console.error(result.error);
|
||||||
this.alertService!.alert(
|
this.alertService!.alert(
|
||||||
"Unable to upgrade encryption version. Please try again."
|
"Unable to upgrade encryption version. Please try again."
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user