Skip to content

Commit

Permalink
fix: validate param jsonRpcStreamName
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Oct 18, 2024
1 parent af2ac32 commit c96ee7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ const baseConfig = {
// An object that configures minimum threshold enforcement for coverage results
coverageThreshold: {
global: {
branches: 64.65,
branches: 64.35,
functions: 65.65,
lines: 65.51,
statements: 65.61,
lines: 65.21,
statements: 65.32,
},
},

Expand Down
3 changes: 3 additions & 0 deletions src/initializeInpageProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c96ee7a

Please sign in to comment.