Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
luu-alex committed Oct 24, 2023
1 parent c4896e7 commit 51831a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/web3-core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export const isWeb3Provider = <API extends Web3APISpec>(

export const isMetaMaskProvider = <API extends Web3APISpec>(
provider: SupportedProviders<API>,
): provider is MetaMaskProvider<API> =>{
return typeof provider !== 'string' &&
): provider is MetaMaskProvider<API> =>
typeof provider !== 'string' &&
'request' in provider &&
provider.request.constructor.name === 'AsyncFunction' && 'isMetaMask' in provider && provider.isMetaMask;

Check warning on line 38 in packages/web3-core/src/utils.ts

View check run for this annotation

Codecov / codecov/patch

packages/web3-core/src/utils.ts#L36-L38

Added lines #L36 - L38 were not covered by tests
}


export const isLegacyRequestProvider = <API extends Web3APISpec>(
provider: SupportedProviders<API>,
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-types/src/web3_base_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export abstract class Web3BaseProvider<API extends Web3APISpec = EthExecutionAPI
newObj.request = async function request(
args: Web3APIPayload<API, Web3APIMethod<API>>,
): Promise<unknown> {
// eslint-disable-next-line @typescript-eslint/no-unnece ssary-type-assertion
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
const response = (await originalRequest(args)) as JsonRpcResponseWithResult<unknown>;
return response.result;
} as typeof newObj.request;
Expand Down

0 comments on commit 51831a6

Please sign in to comment.