Skip to content

Commit fcfb915

Browse files
committed
chore: update deps
1 parent e2cae0c commit fcfb915

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/client/lib/OpenID4VCIClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ export class OpenID4VCIClient {
482482
request: NotificationRequest,
483483
accessToken?: string,
484484
): Promise<NotificationResult> {
485-
return sendNotification(credentialRequestOpts, request, accessToken ?? (this.hasAccessTokenResponse() ? this.accessTokenResponse.access_token : this._state.accessToken));
485+
return sendNotification(credentialRequestOpts, request, accessToken ?? this._state.accessToken ?? this._state.accessTokenResponse?.access_token);
486486
}
487487

488488
getCredentialOfferTypes(): string[][] {

packages/client/lib/functions/notifications.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export async function sendNotification(
1414
}
1515
const token = accessToken ?? credentialRequestOpts.token;
1616
const response = await post<NotificationErrorResponse>(credentialRequestOpts.notificationEndpoint, JSON.stringify(request), {
17-
bearerToken: token,
17+
...(token && {bearerToken: token}),
1818
});
1919
const error = response.errorBody?.error !== undefined;
2020
const result = {

0 commit comments

Comments
 (0)