Skip to content

Commit 4dcef61

Browse files
Aaron BarnardAaron Barnard
authored andcommitted
Add error for incorrect walletName parameter
1 parent f7d9fad commit 4dcef61

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)