Skip to content

Commit

Permalink
Merge pull request #1489 from WalletConnect/call_onResolve_when_error
Browse files Browse the repository at this point in the history
Call onResolve when insert error
  • Loading branch information
jakubuid committed Aug 28, 2024
2 parents 92436ef + 870b351 commit 913c2ef
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ class ResolveAttestationIdUseCase(private val verifyInterface: VerifyInterface,
private fun insertContext(context: VerifyContext, onResolve: (VerifyContext) -> Unit) {
scope.launch {
supervisorScope {
repository.insertOrAbort(context)
onResolve(context)
try {
repository.insertOrAbort(context)
onResolve(context)
} catch (e: Exception) {
onResolve(context)
}
}
}
}
Expand Down

0 comments on commit 913c2ef

Please sign in to comment.