From 870b351fb8a1ebd220c3226679825c5a7b94afab Mon Sep 17 00:00:00 2001 From: kubel Date: Wed, 28 Aug 2024 09:08:47 +0200 Subject: [PATCH] Call onResolve when insert error --- .../android/verify/domain/ResolveAttestationIdUseCase.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/android/src/main/kotlin/com/walletconnect/android/verify/domain/ResolveAttestationIdUseCase.kt b/core/android/src/main/kotlin/com/walletconnect/android/verify/domain/ResolveAttestationIdUseCase.kt index 09a4d54b8..9ad879eb0 100644 --- a/core/android/src/main/kotlin/com/walletconnect/android/verify/domain/ResolveAttestationIdUseCase.kt +++ b/core/android/src/main/kotlin/com/walletconnect/android/verify/domain/ResolveAttestationIdUseCase.kt @@ -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) + } } } }