Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed Jun 12, 2024
1 parent e2cae0c commit fcfb915
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/client/lib/OpenID4VCIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ export class OpenID4VCIClient {
request: NotificationRequest,
accessToken?: string,
): Promise<NotificationResult> {
return sendNotification(credentialRequestOpts, request, accessToken ?? (this.hasAccessTokenResponse() ? this.accessTokenResponse.access_token : this._state.accessToken));
return sendNotification(credentialRequestOpts, request, accessToken ?? this._state.accessToken ?? this._state.accessTokenResponse?.access_token);
}

getCredentialOfferTypes(): string[][] {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/lib/functions/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function sendNotification(
}
const token = accessToken ?? credentialRequestOpts.token;
const response = await post<NotificationErrorResponse>(credentialRequestOpts.notificationEndpoint, JSON.stringify(request), {
bearerToken: token,
...(token && {bearerToken: token}),
});
const error = response.errorBody?.error !== undefined;
const result = {
Expand Down

0 comments on commit fcfb915

Please sign in to comment.