Skip to content

Commit

Permalink
refactor: Restored code check if credential_offer or chedential_offer…
Browse files Browse the repository at this point in the history
…_uri is present
  • Loading branch information
Zoë Maas committed May 23, 2024
1 parent f6c4d31 commit 66b38b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/client/lib/CredentialOfferClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export class CredentialOfferClient {
arrayTypeProperties: uri.includes('credential_offer_uri=') ? ['credential_offer_uri'] : ['credential_offer'],
requiredProperties: uri.includes('credential_offer_uri=') ? ['credential_offer_uri'] : ['credential_offer'],
}) as CredentialOfferV1_0_11;
if (credentialOffer?.credential_offer_uri === undefined && !credentialOffer?.credential_offer) {
throw Error('Either a credential_offer or credential_offer_uri should be present in ' + uri);
}
}

const request = await toUniformCredentialOfferRequest(credentialOffer, {
Expand Down

0 comments on commit 66b38b7

Please sign in to comment.