From 66ff29080a7d716ac126ef141e2c2466da33f48c Mon Sep 17 00:00:00 2001 From: Roland Groen Date: Mon, 12 Feb 2024 16:51:49 +0100 Subject: [PATCH] Add store credential functionality in issuer.go Added code to store the issued credential in vcrStore within the issuer.go file. --- vcr/issuer/issuer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vcr/issuer/issuer.go b/vcr/issuer/issuer.go index e4a4693128..df3ae061fc 100644 --- a/vcr/issuer/issuer.go +++ b/vcr/issuer/issuer.go @@ -129,6 +129,10 @@ func (i issuer) Issue(ctx context.Context, template vc.VerifiableCredential, opt return nil, fmt.Errorf("unable to store the issued credential: %w", err) } + if err = i.vcrStore.StoreCredential(*createdVC, nil); err != nil { + return nil, fmt.Errorf("unable to store the issued credential: %w", err) + } + if options.Publish { // Try to issue over OpenID4VCI if it's enabled and if the credential is not public // (public credentials are always published on the network).