@@ -197,7 +197,14 @@ ul {
197
197
<div class =" " >
198
198
<span class =" zkbadge rounded " style =" cursor : grab ;" @click =" deleteZkProof(proof.proofType)"
199
199
v-for =" proof in widgetConfigTemp.zkProof.proofs" v-bind:key =" proof.proofType" ><b-icon
200
- style =" color :green ;" icon =" check-circle" aria-hidden =" true" ></b-icon > {{ proof.proofType }}
200
+ style =" color :green ;" icon =" check-circle" aria-hidden =" true" ></b-icon >
201
+ <span v-if =" proof.proofType == SupportedZkProofTypes.PROOF_OF_AGE" >
202
+ {{ proof.proofType }} > {{ proof.criteria }}
203
+ </span >
204
+ <span v-else >
205
+ {{ proof.proofType }}
206
+ </span >
207
+
201
208
<b-icon class =" trash" style =" color :red " icon =" trash" aria-hidden =" true" ></b-icon ></span >
202
209
</div >
203
210
</div >
@@ -341,13 +348,13 @@ import { mapGetters, mapMutations } from 'vuex/dist/vuex.common.js';
341
348
// import TrustedIssuer from './components/TrustedIssuer.vue';
342
349
import MarketplaceList from ' ../../../components/MarketplaceList.vue' ;
343
350
import HFBeta from ' ../../../components/element/HFBeta.vue' ;
344
- const SupportedZkProofTypes = Object .freeze ({
345
- PROOF_OF_KYC : ' zkProofOfKYC' ,
346
- PROOF_OF_PERSONHOOD : ' zkProofOfPersonHood' ,
347
- PROOF_OF_AGE : ' zkProofOfAge' ,
348
- PROOF_OF_MEMBERSHIP : ' zkProofOfMembership' ,
349
- PROOF_OF_DOB : ' zkProofOfDOB' ,
350
- })
351
+ // const SupportedZkProofTypes = Object.freeze({
352
+ // PROOF_OF_KYC: 'zkProofOfKYC',
353
+ // PROOF_OF_PERSONHOOD: 'zkProofOfPersonHood',
354
+ // PROOF_OF_AGE: 'zkProofOfAge',
355
+ // PROOF_OF_MEMBERSHIP: 'zkProofOfMembership',
356
+ // PROOF_OF_DOB: 'zkProofOfDOB',
357
+ // })
351
358
352
359
export default {
353
360
name: " WidgetConfig" ,
@@ -488,6 +495,13 @@ export default {
488
495
},
489
496
data () {
490
497
return {
498
+ SupportedZkProofTypes: Object .freeze ({
499
+ PROOF_OF_KYC : ' zkProofOfKYC' ,
500
+ PROOF_OF_PERSONHOOD : ' zkProofOfPersonHood' ,
501
+ PROOF_OF_AGE : ' zkProofOfAge' ,
502
+ PROOF_OF_MEMBERSHIP : ' zkProofOfMembership' ,
503
+ PROOF_OF_DOB : ' zkProofOfDOB' ,
504
+ }),
491
505
widgetConfigUI: {
492
506
faceRecog: {
493
507
label: " Enable Facial Recoginition" ,
@@ -644,6 +658,15 @@ export default {
644
658
}
645
659
646
660
}
661
+
662
+ if (this .widgetConfigTemp .zkProof .enabled ) {
663
+ if (! this .widgetConfigTemp .idOcr .enabled ) {
664
+ const t = this .widgetConfigTemp .zkProof .proofs .filter (x => (x .proofType != this .SupportedZkProofTypes .PROOF_OF_PERSONHOOD ))
665
+ if (t .length > 0 ) {
666
+ throw new Error (' You are trying to configure zk proof types which required ID Documentation verification. Please enabled ID document to proceed.' )
667
+ }
668
+ }
669
+ }
647
670
},
648
671
async saveConfiguration () {
649
672
try {
@@ -679,7 +702,7 @@ export default {
679
702
this .widgetConfigTemp .zkProof .proofs = []
680
703
}
681
704
682
- if (proofType == SupportedZkProofTypes .PROOF_OF_AGE ) {
705
+ if (proofType == this . SupportedZkProofTypes .PROOF_OF_AGE ) {
683
706
if (! criteria) {
684
707
return this .notifyErr (' Kindly specify age criteria to generate proof' )
685
708
}
@@ -699,7 +722,7 @@ export default {
699
722
}
700
723
this .slectProof = null
701
724
702
- this .updateConfiguration ()
725
+ // this.updateConfiguration()
703
726
},
704
727
705
728
async updateConfiguration () {
0 commit comments