Skip to content

Commit

Permalink
fix: remove checks for a @context field
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceanis committed Mar 12, 2020
1 parent ac73688 commit b814b6c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
9 changes: 0 additions & 9 deletions src/__tests__/resolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,6 @@ describe('web did resolver', () => {
)
})

it('fails if the did document is missing a context', () => {
mockedFetch.mockResolvedValueOnce({
json: () => noContextResponse
})
return expect(didResolver.resolve(did)).rejects.toThrowError(
'DID document missing context'
)
})

it('fails if the did document id does not match', () => {
mockedFetch.mockResolvedValueOnce({
json: () => wrongIdResponse
Expand Down
3 changes: 0 additions & 3 deletions src/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ export function getResolver() {
)
}

const hasContext = data['@context'] === 'https://w3id.org/did/v1'
if (!hasContext) throw new Error('DID document missing context')

const docIdMatchesDid = data.id === did
if (!docIdMatchesDid) {
throw new Error('DID document id does not match requested did')
Expand Down

0 comments on commit b814b6c

Please sign in to comment.