From 4ab68f5cf697e3204e793b0be95563827a56a4d3 Mon Sep 17 00:00:00 2001 From: Talha Ali <> Date: Mon, 11 Mar 2024 09:35:55 -0500 Subject: [PATCH] added try-catch to default in case of error --- .../walletconnect/android/pairing/client/PairingProtocol.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/android/src/main/kotlin/com/walletconnect/android/pairing/client/PairingProtocol.kt b/core/android/src/main/kotlin/com/walletconnect/android/pairing/client/PairingProtocol.kt index 2327b1955..0c5e3521b 100644 --- a/core/android/src/main/kotlin/com/walletconnect/android/pairing/client/PairingProtocol.kt +++ b/core/android/src/main/kotlin/com/walletconnect/android/pairing/client/PairingProtocol.kt @@ -122,7 +122,11 @@ internal class PairingProtocol(private val koinApp: KoinApplication = wcKoinApp) } override fun validatePairingUri(uri: String): Boolean { - return Validator.validateWCUri(uri) != null + return try { + Validator.validateWCUri(uri) != null + } catch (e: Exception) { + false + } } private suspend fun awaitConnection(onConnection: () -> Unit, errorLambda: (Throwable) -> Unit = {}) {