Skip to content

Commit

Permalink
Fix compilation errors (#2594)
Browse files Browse the repository at this point in the history
  • Loading branch information
reinkrul authored Nov 9, 2023
1 parent 76f3214 commit 0b397c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions vcr/holder/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (h wallet) buildJWTPresentation(ctx context.Context, subjectDID did.DID, cr
headers := map[string]interface{}{
jws.TypeKey: "JWT",
}
id := subjectDID
id := did.DIDURL{DID: subjectDID}
id.Fragment = strings.ToLower(uuid.NewString())
claims := map[string]interface{}{
jwt.IssuerKey: subjectDID.String(),
Expand Down Expand Up @@ -145,7 +145,7 @@ func (h wallet) buildJSONLDPresentation(ctx context.Context, subjectDID did.DID,
types := []ssi.URI{VerifiablePresentationLDType}
types = append(types, options.AdditionalTypes...)

id := subjectDID
id := did.DIDURL{DID: subjectDID}
id.Fragment = strings.ToLower(uuid.NewString())
idURI := id.URI()
unsignedVP := &vc.VerifiablePresentation{
Expand Down
4 changes: 2 additions & 2 deletions vcr/holder/wallet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestWallet_BuildPresentation(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, result)
require.NotNil(t, result.ID, "id must be set")
assert.Equal(t, testDID, did.MustParseDIDURL(result.ID.String()).WithoutURL(), "id must be the DID of the holder")
assert.Equal(t, testDID, did.MustParseDIDURL(result.ID.String()).DID, "id must be the DID of the holder")
assert.NotEmpty(t, result.ID.Fragment, "id must have a fragment")
assert.Equal(t, JSONLDPresentationFormat, result.Format())
})
Expand Down Expand Up @@ -148,7 +148,7 @@ func TestWallet_BuildPresentation(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, result)
require.NotNil(t, result.ID, "id must be set")
assert.Equal(t, testDID, did.MustParseDIDURL(result.ID.String()).WithoutURL(), "id must be the DID of the holder")
assert.Equal(t, testDID, did.MustParseDIDURL(result.ID.String()).DID, "id must be the DID of the holder")
assert.NotEmpty(t, result.ID.Fragment, "id must have a fragment")
assert.Equal(t, JWTPresentationFormat, result.Format())
assert.NotNil(t, result.JWT())
Expand Down

0 comments on commit 0b397c8

Please sign in to comment.