From 4cec3859ea44af28912445b5eea0ae6e623751da Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 19 Mar 2023 18:29:02 -0600 Subject: [PATCH] refactor: misc tweaks for types, lint, etc --- project.yaml | 2 +- src/views/AccountViewView.vue | 1 - src/views/NewEditProjectView.vue | 15 ++++++--------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/project.yaml b/project.yaml index b5b654c..f9b35da 100644 --- a/project.yaml +++ b/project.yaml @@ -17,7 +17,7 @@ - parse input more robustly (with CSV lib and not commas) - refactor alerts: - - They show at the top and can be missed, eg. account bakcup download + - They show at the top and can be missed, eg. account data download - commit screen diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index f15cb22..e12ca29 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -310,7 +310,6 @@ export default class AccountViewView extends Vue { const blob = await db.export({ prettyJson: true }); const url = URL.createObjectURL(blob); - console.log("typeof", typeof this.$refs.downloadLink); const downloadAnchor = this.$refs.downloadLink as HTMLAnchorElement; downloadAnchor.href = url; downloadAnchor.download = db.name + "-backup.json"; diff --git a/src/views/NewEditProjectView.vue b/src/views/NewEditProjectView.vue index ebe13ae..03fcffc 100644 --- a/src/views/NewEditProjectView.vue +++ b/src/views/NewEditProjectView.vue @@ -126,8 +126,10 @@ export default class NewEditProjectView extends Vue { async LoadProject(identity: IIdentifier) { const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER; - // eslint-disable-next-line prettier/prettier - const url = endorserApiServer + "/api/claim/byHandle/" + encodeURIComponent(this.projectId); + const url = + endorserApiServer + + "/api/claim/byHandle/" + + encodeURIComponent(this.projectId); const token = await accessToken(identity); const headers = { "Content-Type": "application/json", @@ -161,7 +163,6 @@ export default class NewEditProjectView extends Vue { } // Make a payload for the claim const vcPayload = { - sub: "PlanAction", vc: { "@context": ["https://www.w3.org/2018/credentials/v1"], type: ["VerifiableCredential"], @@ -169,12 +170,8 @@ export default class NewEditProjectView extends Vue { }, }; // create a signature using private key of identity - if ( - identity.keys[0].privateKeyHex !== "undefined" && - identity.keys[0].privateKeyHex !== null - ) { - // eslint-disable-next-line - const privateKeyHex: string = identity.keys[0].privateKeyHex!; + if (identity.keys[0].privateKeyHex != null) { + const privateKeyHex: string = identity.keys[0].privateKeyHex; const signer = await SimpleSigner(privateKeyHex); const alg = undefined; // create a JWT for the request