Skip to content

Commit

Permalink
Merge pull request #349 from Concordium/fix-proof-blank-screen-caused…
Browse files Browse the repository at this point in the history
…-by-credential-not-on-chain

Fix proof blank screen, when wallet contains vc that is not on chain
  • Loading branch information
shjortConcordium authored Aug 24, 2023
2 parents be7e52c + e4688c8 commit 35ca88b
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 35ca88b

Please sign in to comment.