Skip to content

Commit 711ce29

Browse files
committed
fix: validate param jsonRpcStreamName
1 parent af2ac32 commit 711ce29

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/initializeInpageProvider.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ export function initializeProvider({
5252
shouldSetOnWindow = true,
5353
shouldShimWeb3 = false,
5454
}: InitializeProviderOptions): MetaMaskInpageProvider {
55+
if (!jsonRpcStreamName) {
56+
throw new Error('Required paramater: jsonRpcStreamName');
57+
}
5558
const provider = new MetaMaskInpageProvider(connectionStream, {
5659
jsonRpcStreamName,
5760
logger,

0 commit comments

Comments
 (0)