From 51831a6448cf21515cc10e873d8409cff157bb28 Mon Sep 17 00:00:00 2001 From: luu-alex Date: Mon, 23 Oct 2023 23:24:29 -0400 Subject: [PATCH] fix lint --- packages/web3-core/src/utils.ts | 6 +++--- packages/web3-types/src/web3_base_provider.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/web3-core/src/utils.ts b/packages/web3-core/src/utils.ts index b2964ef6c36..34c5162c488 100644 --- a/packages/web3-core/src/utils.ts +++ b/packages/web3-core/src/utils.ts @@ -32,11 +32,11 @@ export const isWeb3Provider = ( export const isMetaMaskProvider = ( provider: SupportedProviders, -): provider is MetaMaskProvider =>{ -return typeof provider !== 'string' && +): provider is MetaMaskProvider => + typeof provider !== 'string' && 'request' in provider && provider.request.constructor.name === 'AsyncFunction' && 'isMetaMask' in provider && provider.isMetaMask; -} + export const isLegacyRequestProvider = ( provider: SupportedProviders, diff --git a/packages/web3-types/src/web3_base_provider.ts b/packages/web3-types/src/web3_base_provider.ts index c58b9dafcb6..5f840aa7488 100644 --- a/packages/web3-types/src/web3_base_provider.ts +++ b/packages/web3-types/src/web3_base_provider.ts @@ -243,7 +243,7 @@ export abstract class Web3BaseProvider>, ): Promise { - // 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; return response.result; } as typeof newObj.request;