Skip to content

Commit

Permalink
Fix: show a better pairing code error
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Oct 25, 2023
1 parent 53f9907 commit 45698a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/walletconnect/WcInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 45698a9

Please sign in to comment.