From 7fb29ff2c3628d06339cc0c4fe270af086867399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yasin=20=C3=87al=C4=B1=C5=9Fkan?= Date: Thu, 9 May 2024 16:57:08 +0300 Subject: [PATCH] Throw error if WC version mismatch --- src/PeraWalletConnect.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/PeraWalletConnect.ts b/src/PeraWalletConnect.ts index cd38329..5c98832 100644 --- a/src/PeraWalletConnect.ts +++ b/src/PeraWalletConnect.ts @@ -477,7 +477,14 @@ class PeraWalletConnect { if (!walletDetails?.chainId) { await resetWalletDetailsFromStorage(); - return; + reject( + new PeraWalletConnectError( + { + type: "SESSION_RECONNECT", + detail: "Failed to reconnect session due to Wallet Connect version mismatch" + }, + "Failed to reconnect session" + )); } if (!walletDetails) {