Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow optional jsonRpcStreamName for inpage provider #390

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.35,
branches: 64.65,
functions: 65.65,
lines: 65.21,
statements: 65.32,
lines: 65.51,
statements: 65.61,
},
},

Expand Down
2 changes: 1 addition & 1 deletion src/MetaMaskInpageProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export type MetaMaskInpageProviderOptions = {
shouldSendMetadata?: boolean;

jsonRpcStreamName?: string | undefined;
} & Partial<Omit<StreamProviderOptions, 'rpcMiddleware'>>;
} & Partial<Omit<StreamProviderOptions, 'rpcMiddleware' | 'jsonRpcStreamName'>>;

type SentWarningsState = {
// methods
Expand Down
3 changes: 0 additions & 3 deletions src/initializeInpageProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ 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
Loading