Skip to content

Commit

Permalink
Include error to invalid ID proofs rejections
Browse files Browse the repository at this point in the history
  • Loading branch information
Radiokot committed Apr 3, 2024
1 parent 7741ea0 commit 16b3799
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ private constructor(
Error.InvalidRequest
)
)
respondError(responseMessage)
respondError(if (e == null) responseMessage else "$responseMessage: $e")
mutableStateFlow.tryEmit(State.Idle)
}

Expand Down Expand Up @@ -759,7 +759,11 @@ private constructor(
val accounts = getAvailableAccounts()
val initialAccounts = sessionRequestIdentityRequest.credentialStatements.map { statement ->
// Prefer session account
if (isValidIdentityForStatement(identities[sessionRequestAccount.identityId]!!, statement))
if (isValidIdentityForStatement(
identities[sessionRequestAccount.identityId]!!,
statement
)
)
sessionRequestAccount
else {
// Otherwise find any account that can prove the statement
Expand Down

0 comments on commit 16b3799

Please sign in to comment.