From 45698a9e2b3c32a6770a0dee9283e715f2a88611 Mon Sep 17 00:00:00 2001 From: katspaugh Date: Wed, 25 Oct 2023 16:35:03 +0200 Subject: [PATCH] Fix: show a better pairing code error --- src/components/walletconnect/WcInput/index.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/walletconnect/WcInput/index.tsx b/src/components/walletconnect/WcInput/index.tsx index ed6a507285..ef24526f7a 100644 --- a/src/components/walletconnect/WcInput/index.tsx +++ b/src/components/walletconnect/WcInput/index.tsx @@ -18,6 +18,12 @@ const WcInput = ({ uri }: { uri: string }) => { if (!walletConnect) return setValue(val) + + if (val && !isPairingUri(val)) { + setError(new Error('Invalid pairing code')) + return + } + setError(undefined) if (!val) return