diff --git a/project.task.yaml b/project.task.yaml index 1e7684a1..5981aa8d 100644 --- a/project.task.yaml +++ b/project.task.yaml @@ -1,9 +1,10 @@ tasks: -- fix timeSafari.org cert renewals -- anchor hash into BTC -- add more detail on TimeSafari.org +- .5 fix timeSafari.org cert renewals +- .2 anchor hash into BTC +- 04 allow backup of localStorage key +- .5 add more detail on TimeSafari.org - .1 show better error when user with no ID goes to the "My Project" page - add button to front page to prompt for ideas for gratitude - show previous on "Your" screen diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index fee863bc..b614acf2 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -688,7 +688,7 @@ export default class AccountViewView extends Vue { ) { this.publicHex = identity.keys[0].publicKeyHex; this.publicBase64 = Buffer.from(this.publicHex, "hex").toString("base64"); - this.derivationPath = identity.keys[0].meta.derivationPath as string; + this.derivationPath = identity.keys[0].meta?.derivationPath as string; db.settings.update(MASTER_SETTINGS_KEY, { activeDid: identity.did, @@ -974,7 +974,8 @@ export default class AccountViewView extends Vue { if (identity) { this.checkLimitsFor(identity); } else { - this.limitsMessage = "You have no identifier."; + this.limitsMessage = + "You have no identifier, or your data has been corrupted."; } } diff --git a/src/views/NewEditProjectView.vue b/src/views/NewEditProjectView.vue index 187aa8c7..62a204d2 100644 --- a/src/views/NewEditProjectView.vue +++ b/src/views/NewEditProjectView.vue @@ -188,7 +188,7 @@ export default class NewEditProjectView extends Vue { .where("did") .equals(activeDid) .first(); - const identity = JSON.parse(account?.identity || "null"); + const identity = JSON.parse((account?.identity as string) || "null"); if (!identity) { throw new Error( @@ -210,8 +210,8 @@ export default class NewEditProjectView extends Vue { async created() { await db.open(); const settings = await db.settings.get(MASTER_SETTINGS_KEY); - this.activeDid = settings?.activeDid || ""; - this.apiServer = settings?.apiServer || ""; + this.activeDid = (settings?.activeDid as string) || ""; + this.apiServer = (settings?.apiServer as string) || ""; if (this.projectId) { if (this.numAccounts === 0) { @@ -341,7 +341,9 @@ export default class NewEditProjectView extends Vue { if (serverError) { console.error("Got error from server", serverError); if (Object.prototype.hasOwnProperty.call(serverError, "message")) { - userMessage = serverError.response?.data?.error?.message || ""; // This is info for the user. + userMessage = + (serverError.response?.data?.error?.message as string) || + userMessage; // This is info for the user. this.$notify( { group: "alert",