From 711ce290fa09efed20b44df006a25e6c1e729f1b Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Fri, 18 Oct 2024 05:51:22 +0000 Subject: [PATCH] fix: validate param jsonRpcStreamName --- src/initializeInpageProvider.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/initializeInpageProvider.ts b/src/initializeInpageProvider.ts index 3fba9600..20ecb5e5 100644 --- a/src/initializeInpageProvider.ts +++ b/src/initializeInpageProvider.ts @@ -52,6 +52,9 @@ export function initializeProvider({ shouldSetOnWindow = true, shouldShimWeb3 = false, }: InitializeProviderOptions): MetaMaskInpageProvider { + if (!jsonRpcStreamName) { + throw new Error('Required paramater: jsonRpcStreamName'); + } const provider = new MetaMaskInpageProvider(connectionStream, { jsonRpcStreamName, logger,