diff --git a/src/views/ClaimView.vue b/src/views/ClaimView.vue index 42e6d35a..34b43108 100644 --- a/src/views/ClaimView.vue +++ b/src/views/ClaimView.vue @@ -121,7 +121,7 @@ You have confirmed this claim.
- You cannot confirm this claim because it contains a DID that is hidden + You cannot confirm this claim because it contains data that is hidden from you.
@@ -419,51 +419,53 @@ export default class ClaimView extends Vue { } async confirmClaim() { - // similar logic is found in endorser-mobile - const goodClaim = serverUtil.removeSchemaContext( - serverUtil.removeVisibleToDids( - serverUtil.addLastClaimOrHandleAsIdIfMissing( - this.veriClaim.claim, - this.veriClaim.id, - this.veriClaim.handleId, + if (confirm("Do you personally confirm that this is true?")) { + // similar logic is found in endorser-mobile + const goodClaim = serverUtil.removeSchemaContext( + serverUtil.removeVisibleToDids( + serverUtil.addLastClaimOrHandleAsIdIfMissing( + this.veriClaim.claim, + this.veriClaim.id, + this.veriClaim.handleId, + ), ), - ), - ); - const confirmationClaim: serverUtil.GenericVerifiableCredential & { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - object: any; - } = { - "@context": "https://schema.org", - "@type": "AgreeAction", - object: goodClaim, - }; - const result = await serverUtil.createAndSubmitClaim( - confirmationClaim, - await this.getIdentity(this.activeDid), - this.apiServer, - this.axios, - ); - if (result.type === "success") { - this.$notify( - { - group: "alert", - type: "success", - title: "Success", - text: "Confirmation submitted.", - }, - 5000, ); - } else { - console.log("Got error submitting the confirmation:", result); - this.$notify( - { - group: "alert", - type: "danger", - title: "Error", - text: "There was a problem submitting the confirmation. See logs for more info.", - }, - -1, + const confirmationClaim: serverUtil.GenericVerifiableCredential & { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + object: any; + } = { + "@context": "https://schema.org", + "@type": "AgreeAction", + object: goodClaim, + }; + const result = await serverUtil.createAndSubmitClaim( + confirmationClaim, + await this.getIdentity(this.activeDid), + this.apiServer, + this.axios, ); + if (result.type === "success") { + this.$notify( + { + group: "alert", + type: "success", + title: "Success", + text: "Confirmation submitted.", + }, + 5000, + ); + } else { + console.log("Got error submitting the confirmation:", result); + this.$notify( + { + group: "alert", + type: "danger", + title: "Error", + text: "There was a problem submitting the confirmation. See logs for more info.", + }, + -1, + ); + } } } }