Skip to content

Commit 7914ba5

Browse files
authored
Merge pull request #183 from blocknative/enhancement/incorrect-wallet-name-error
Add error for incorrect walletName parameter. Closes #181
2 parents f7d9fad + 4dcef61 commit 7914ba5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/modules/select/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ function select(
2424
const { walletName, ...initParams } = wallet
2525
const module = getModule(walletName)
2626

27+
if (!module) {
28+
throw new Error(`${walletName} is not a valid walletName.`)
29+
}
30+
2731
return (
2832
module &&
2933
module.then((m: any) => m.default({ ...initParams, networkId }))

0 commit comments

Comments
 (0)