|
|
@ -506,7 +506,6 @@ export default class AccountViewView extends Vue { |
|
|
|
const account: { identity?: string } | undefined = |
|
|
|
await accountsDB.accounts.where("did").equals(activeDid).first(); |
|
|
|
|
|
|
|
accountsDB.close(); |
|
|
|
// Return parsed identity or null if not found |
|
|
|
return JSON.parse((account?.identity as string) || "null"); |
|
|
|
} catch (error) { |
|
|
@ -561,7 +560,6 @@ export default class AccountViewView extends Vue { |
|
|
|
async beforeCreate() { |
|
|
|
await accountsDB.open(); |
|
|
|
this.numAccounts = await accountsDB.accounts.count(); |
|
|
|
accountsDB.close(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -586,7 +584,6 @@ export default class AccountViewView extends Vue { |
|
|
|
if (identity) { |
|
|
|
this.processIdentity(identity); |
|
|
|
} |
|
|
|
db.close(); |
|
|
|
} catch (err: unknown) { |
|
|
|
this.handleError(err); |
|
|
|
} |
|
|
@ -683,7 +680,6 @@ export default class AccountViewView extends Vue { |
|
|
|
db.settings.update(MASTER_SETTINGS_KEY, { |
|
|
|
showContactGivesInline: this.showContactGives, |
|
|
|
}); |
|
|
|
db.close(); |
|
|
|
} catch (err) { |
|
|
|
this.$notify( |
|
|
|
{ |
|
|
@ -868,7 +864,6 @@ export default class AccountViewView extends Vue { |
|
|
|
isRegistered: true, |
|
|
|
}); |
|
|
|
this.isRegistered = true; |
|
|
|
db.close(); |
|
|
|
} catch (err) { |
|
|
|
console.error("Got an error updating settings:", err); |
|
|
|
this.$notify( |
|
|
@ -940,7 +935,6 @@ export default class AccountViewView extends Vue { |
|
|
|
} else { |
|
|
|
await this.switchToAccountNumber(accountNum); |
|
|
|
} |
|
|
|
db.close(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -975,8 +969,6 @@ export default class AccountViewView extends Vue { |
|
|
|
await db.settings.update(MASTER_SETTINGS_KEY, { activeDid: account.did }); |
|
|
|
|
|
|
|
this.updateActiveAccountProperties(account); |
|
|
|
db.close(); |
|
|
|
accountsDB.close(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -1004,7 +996,6 @@ export default class AccountViewView extends Vue { |
|
|
|
apiServer: this.apiServerInput, |
|
|
|
}); |
|
|
|
this.apiServer = this.apiServerInput; |
|
|
|
db.close(); |
|
|
|
} |
|
|
|
|
|
|
|
async onClickSavePushServer() { |
|
|
@ -1022,7 +1013,6 @@ export default class AccountViewView extends Vue { |
|
|
|
}, |
|
|
|
-1, |
|
|
|
); |
|
|
|
db.close(); |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|