Skip to content

Commit

Permalink
Fix proof blank screen, when wallet contains vc that is not on chain
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjort committed Aug 24, 2023
1 parent be7e52c commit e4688c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/browser-wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixed

- Wallet crashing when showing a proof request, while having a verifiable credential that is not yet on chain (or we otherwise fail to retrieve the status)

## 1.1.1

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ async function getAllCredentialStatuses(
): Promise<Record<string, VerifiableCredentialStatus | undefined>> {
const statuses = await Promise.all(
credentials.map((credential) =>
getVerifiableCredentialStatus(client, credential.id).then((status) => [credential.id, status])
getVerifiableCredentialStatus(client, credential.id)
.then((status) => [credential.id, status])
.catch(() => [credential.id, VerifiableCredentialStatus.Pending])
)
);
return Object.fromEntries(statuses);
Expand Down

0 comments on commit e4688c8

Please sign in to comment.