@@ -345,17 +345,17 @@ export class VcIssuer<DIDDoc extends object> {
345345 throw new Error ( CREDENTIAL_MISSING_ERROR )
346346 }
347347 // remove the previous nonce
348- this . cNonces . delete ( cNonceState . cNonce )
348+ await this . cNonces . delete ( cNonceState . cNonce )
349349
350350 if ( preAuthorizedCode && preAuthSession ) {
351351 preAuthSession . lastUpdatedAt = + new Date ( )
352352 preAuthSession . status = IssueStatus . CREDENTIAL_ISSUED
353- this . _credentialOfferSessions . set ( preAuthorizedCode , preAuthSession )
353+ await this . _credentialOfferSessions . set ( preAuthorizedCode , preAuthSession )
354354 } else if ( issuerState && authSession ) {
355355 // If both were set we used the pre auth flow above as well, hence the else if
356356 authSession . lastUpdatedAt = + new Date ( )
357357 authSession . status = IssueStatus . CREDENTIAL_ISSUED
358- this . _credentialOfferSessions . set ( issuerState , authSession )
358+ await this . _credentialOfferSessions . set ( issuerState , authSession )
359359 }
360360
361361 return {
@@ -385,7 +385,7 @@ export class VcIssuer<DIDDoc extends object> {
385385 preAuthSession . lastUpdatedAt = + new Date ( )
386386 preAuthSession . status = IssueStatus . ERROR
387387 preAuthSession . error = error instanceof Error ? error . message : error ?. toString ( )
388- this . _credentialOfferSessions . set ( preAuthorizedCode , preAuthSession )
388+ await this . _credentialOfferSessions . set ( preAuthorizedCode , preAuthSession )
389389 }
390390 }
391391 if ( issuerState ) {
@@ -394,7 +394,7 @@ export class VcIssuer<DIDDoc extends object> {
394394 authSession . lastUpdatedAt = + new Date ( )
395395 authSession . status = IssueStatus . ERROR
396396 authSession . error = error instanceof Error ? error . message : error ?. toString ( )
397- this . _credentialOfferSessions . set ( issuerState , authSession )
397+ await this . _credentialOfferSessions . set ( issuerState , authSession )
398398 }
399399 }
400400 }
0 commit comments