Skip to content

Commit bd69209

Browse files
committed
Fix Validation
1 parent 4d2ef42 commit bd69209

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/modules/select/wallets/wallet-connect.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ function walletConnect(
2121
networkId
2222
} = options
2323

24-
if (!infuraKey || (rpc && !rpc[networkId])) {
25-
throw new Error(
26-
`A "infuraKey" or a "rpc" object with a parameter of ${networkId} must be included in the WalletConnect initialization object`
27-
)
24+
if (!infuraKey) {
25+
if (!rpc || !rpc[networkId]) {
26+
throw new Error(
27+
`A "infuraKey" or a "rpc" object with a parameter of ${networkId} must be included in the WalletConnect initialization object`
28+
)
29+
}
2830
}
2931

3032
return {

0 commit comments

Comments
 (0)