From 7fb66b0f84aeeca2b4d2b4692d643a9d3d5f537e Mon Sep 17 00:00:00 2001 From: kkmanos Date: Mon, 2 Dec 2024 11:02:14 +0200 Subject: [PATCH] minor fix --- src/lib/services/OpenID4VCIClient.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/services/OpenID4VCIClient.ts b/src/lib/services/OpenID4VCIClient.ts index 12f80607f..6e18e1e8c 100644 --- a/src/lib/services/OpenID4VCIClient.ts +++ b/src/lib/services/OpenID4VCIClient.ts @@ -405,11 +405,11 @@ export class OpenID4VCIClient implements IOpenID4VCIClient { audience: this.config.credentialIssuerIdentifier }) } - const generateProofsResult = cachedProofs ? { proof_jwts: cachedProofs } : await this.generateNonceProofs(inputs); - proofsArray = generateProofsResult.proof_jwts; - if (proofsArray) { + const generateProofsResult = cachedProofs ? { proof_jwts: cachedProofs } : await this.generateNonceProofs(inputs).then((res) => { dispatchEvent(new CustomEvent("generatedProof")); - } + return res; + }); + proofsArray = generateProofsResult.proof_jwts; } catch (err) { console.error(err);