diff --git a/packages/providers/src.ts/web3-provider.ts b/packages/providers/src.ts/web3-provider.ts index ebe0cfb190..f9893f49bb 100644 --- a/packages/providers/src.ts/web3-provider.ts +++ b/packages/providers/src.ts/web3-provider.ts @@ -12,6 +12,7 @@ import { JsonRpcProvider } from "./json-rpc-provider"; // Exported Types export type ExternalProvider = { isMetaMask?: boolean; + isStatus?: boolean; host?: string; path?: string; sendAsync?: (request: { method: string, params?: Array }, callback: (error: any, response: any) => void) => void @@ -29,7 +30,7 @@ function buildWeb3LegacyFetcher(provider: ExternalProvider, sendFunc: Web3Legacy return function(method: string, params: Array): Promise { // Metamask complains about eth_sign (and on some versions hangs) - if (method == "eth_sign" && provider.isMetaMask) { + if (method == "eth_sign" && (provider.isMetaMask || provider.isStatus)) { // https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_sign method = "personal_sign"; params = [ params[1], params[0] ]; @@ -64,7 +65,7 @@ function buildEip1193Fetcher(provider: ExternalProvider): JsonRpcFetchFunc { if (params == null) { params = [ ]; } // Metamask complains about eth_sign (and on some versions hangs) - if (method == "eth_sign" && provider.isMetaMask) { + if (method == "eth_sign" && (provider.isMetaMask || provider.isStatus)) { // https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_sign method = "personal_sign"; params = [ params[1], params[0] ];