Skip to content

Commit

Permalink
fix: rename initializeProvider -> initializeInpageProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejonas committed Apr 28, 2021
1 parent 3c1b3a3 commit c34952a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/MetaMaskInpageProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
JsonRpcRequest,
JsonRpcResponse,
} from 'json-rpc-engine';
import { createStreamMiddleware } from 'json-rpc-middleware-stream';
import { ethErrors } from 'eth-rpc-errors';
import sendSiteMetadata from './siteMetadata';
import messages from './messages';
Expand All @@ -20,7 +19,7 @@ export interface SendSyncJsonRpcRequest extends JsonRpcRequest<unknown> {

type WarningEventName = keyof SentWarningsState['events'];

export interface MetaMaskProviderOptions extends BaseProviderOptions {
export interface MetaMaskInpageProviderOptions extends BaseProviderOptions {

/**
* Whether the provider should send page metadata.
Expand Down Expand Up @@ -88,7 +87,7 @@ export default class MetaMaskInpageProvider extends BaseProvider {
logger = console,
maxEventListeners = 100,
shouldSendMetadata = true,
}: MetaMaskProviderOptions = {},
}: MetaMaskInpageProviderOptions = {},
) {

super(connectionStream, { jsonRpcStreamName, logger, maxEventListeners });
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import MetaMaskInpageProvider from './MetaMaskInpageProvider';
import BaseProvider from './BaseProvider';
import { initializeProvider, setGlobalProvider } from './initializeProvider';
import { initializeProvider, setGlobalProvider } from './initializeInpageProvider';
import shimWeb3 from './shimWeb3';

export {
Expand Down
4 changes: 2 additions & 2 deletions src/initializeProvider.ts → src/initializeInpageProvider.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Duplex } from 'stream';
import MetaMaskInpageProvider, { MetaMaskProviderOptions } from './MetaMaskInpageProvider';
import MetaMaskInpageProvider, { MetaMaskInpageProviderOptions } from './MetaMaskInpageProvider';
import shimWeb3 from './shimWeb3';

interface InitializeProviderOptions extends MetaMaskProviderOptions {
interface InitializeProviderOptions extends MetaMaskInpageProviderOptions {

/**
* The stream used to connect to the wallet.
Expand Down

0 comments on commit c34952a

Please sign in to comment.