@@ -49,7 +49,7 @@ import QrIcon from '../../../icons/qr-code-white.svg?vue-component';
4949import AccountInfo from ' ../components/AccountInfo' ;
5050import BoxButton from ' ../components/BoxButton' ;
5151import axios from ' axios' ;
52- import { HYPERSIGN_AUTH_SERVER_DID } from ' ../../utils/hsConstants' ;
52+ import { HS_AUTH_DID_URL } from ' ../../utils/hsConstants' ;
5353
5454export default {
5555 name: ' Account' ,
@@ -70,6 +70,7 @@ export default {
7070 credentialUrl: ' ' ,
7171 loading: false ,
7272 verifiableCredential: {},
73+ hsAuthDid: " "
7374 };
7475 },
7576 computed: {
@@ -85,6 +86,14 @@ export default {
8586 console .log (JSONData)
8687 this .receiveOrGiveCredential (JSONData);
8788 }
89+
90+
91+ axios .get (HS_AUTH_DID_URL ).then (res => {
92+ console .log (res)
93+ if (res && res .data ){
94+ this .hsAuthDid = res .data .message
95+ }
96+ })
8897
8998 },
9099 methods: {
@@ -181,7 +190,6 @@ export default {
181190 const { appDid , schemaId } = qrData;
182191
183192 if (! schemaId) throw new Error (' Invalid schemaId' );
184- if (! HYPERSIGN_AUTH_SERVER_DID ) throw new Error (' Hypersign Auth Server did is not set ' ) // this check can go at startign of the app and not here.... bad way
185193
186194 this .$store .commit (' addRequestingAppInfo' , qrData);
187195 this .verifiableCredential = this .hypersign .credentials .find ((x ) => {
@@ -192,16 +200,11 @@ export default {
192200 schemaId
193201 })
194202 if (credentialSchemaId === schemaId){
195- console .log ({
196- issuer: x .issuer ,
197- appDid: appDid,
198- HYPERSIGN_AUTH_SERVER_DID : HYPERSIGN_AUTH_SERVER_DID
199- })
200203 if (x .issuer === appDid ){ // check if the app company issued this credential ;; the registration flow
201204 return x;
202205 }
203206
204- if (x .issuer === HYPERSIGN_AUTH_SERVER_DID ){ // of the issuer is Hypersign Auth server? ;; without registration flow
207+ if (x .issuer === this . hsAuthDid ){ // of the issuer is Hypersign Auth server? ;; without registration flow
205208 return x;
206209 }
207210 }
0 commit comments