182
182
</li >
183
183
<li class =" list-group-item" >
184
184
<div class =" row" >
185
- <div class =" col" >
185
+ <div class =" col-md-6 " >
186
186
<div class =" row" >
187
187
<div class =" col-md-12" >
188
188
<b-form-checkbox switch size =" lg" v-model =" widgetConfigTemp.zkProof.enabled" >{{
205
205
206
206
<div class =" col" v-if =" widgetConfigTemp.zkProof.enabled" >
207
207
<div class =" " >
208
-
209
208
<div class =" " >
210
209
<label for =" " ><strong >Select Proof Type: </strong ></label >
211
210
<b-form-select class =" col-md-10" v-model =" slectProof" :options =" proofTypeOptions"
235
234
</div >
236
235
</li >
237
236
<li class =" list-group-item" >
238
- <div class =" row" v-if = " widgetConfigTemp.zkProof.enabled " >
237
+ <div class =" row" >
239
238
<div class =" col" >
240
239
<b-form-checkbox switch size =" lg" v-model =" widgetConfigTemp.onChainId.enabled" >{{
241
240
this.widgetConfigUI.onChainId.label }} <HFBeta ></HFBeta ></b-form-checkbox >
@@ -361,13 +360,16 @@ export default {
361
360
},
362
361
// TODO : check why this is not working... we need to trigger warning that its an experimental feature once user enables zk
363
362
watch: {
364
- // widgetConfigTemp: function (newValue,) {
365
- // console.log(newValue)
366
- // // if (newValue.zkProof.enabled) {
367
- // this.warnUsers('b-toaster-top-full')
368
- // console.log('warningn....')
369
- // // }
370
- // }
363
+ ' widgetConfigTemp.zkProof.enabled' :
364
+ {
365
+ handler (newValue ) {
366
+ if (! newValue) {
367
+ console .log (' going to disabled onchainId' )
368
+ this .widgetConfigTemp .onChainId .enabled = false
369
+ }
370
+ },
371
+ deep: true
372
+ },
371
373
},
372
374
computed: {
373
375
... mapState ({
@@ -435,9 +437,12 @@ export default {
435
437
436
438
this .trustedIssuersList = this .getMarketPlaceApps ;
437
439
this .appId = this .$route .params .appId ;
440
+ // eslint-disable-next-line
441
+ debugger ;
438
442
if (this .appId ) {
439
443
this .app = { ... this .getAppByAppId (this .appId ) }
440
444
if (this .app ) {
445
+ console .log (this .app )
441
446
this .widgetConfigTemp .userConsent .domain = this .app .domain ? this .app .domain : this .widgetConfigTemp .userConsent .domain ;
442
447
this .widgetConfigTemp .userConsent .logoUrl = this .app .logoUrl ? this .app .logoUrl : this .widgetConfigTemp .userConsent .logoUrl ;
443
448
if (! this .widgetConfigTemp .issuerDID ) {
@@ -447,7 +452,11 @@ export default {
447
452
if (! this .getMarketPlaceApps .find (x => x .appId == this .app .appId )) {
448
453
this .trustedIssuersList .push ({ ... this .app })
449
454
}
455
+ } else {
456
+ console .error (" No app found" );
450
457
}
458
+ } else {
459
+ console .error (" No appId found" );
451
460
}
452
461
453
462
if (this .widgetConfigTemp .issuerDID ) {
@@ -610,22 +619,30 @@ export default {
610
619
if (! this .widgetConfigTemp .issuerDID ) {
611
620
throw new Error (' Issuer DID is required' )
612
621
}
622
+ console .log (this .widgetConfigTemp .idOcr )
613
623
614
624
if (! this .widgetConfigTemp .idOcr ? .enabled ) {
615
625
this .widgetConfigTemp .idOcr .documentType = null
616
626
} else {
617
627
if (! this .widgetConfigTemp .idOcr .documentType ) {
618
- throw new Error ( ' Kindly select a document type ' )
628
+ this . widgetConfigTemp . idOcr . documentType = ' passport '
619
629
}
620
630
}
621
631
622
- if (! this .widgetConfigTemp .onChainId .enabled || ! this . widgetConfigTemp . zkProof . enabled ) {
632
+ if (! this .widgetConfigTemp .onChainId .enabled ) {
623
633
this .widgetConfigTemp .onChainId .selectedOnChainKYCconfiguration = null
624
634
this .widgetConfigTemp .onChainId .enabled = false
625
635
} else {
636
+
637
+
626
638
if (! this .widgetConfigTemp .onChainId .selectedOnChainKYCconfiguration ) {
627
639
throw new Error (' Kindly select a onchain configuration' )
628
640
}
641
+
642
+ if (! this .widgetConfigTemp .zkProof .enabled ) {
643
+ throw new Error (' Enable ZK Proof to enable onchainId' )
644
+ }
645
+
629
646
}
630
647
},
631
648
async saveConfiguration () {
0 commit comments