From 84c68ac5c17b10897ade966d6c8fac1f1f66a4af Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Tue, 28 Apr 2020 04:54:08 -0400 Subject: [PATCH] Removed old EIP-1193 experimental provider; it can now be supported by Web3Provider as EIP-1193 is now backwards compatible. --- packages/experimental/src.ts/eip-provider.ts | 40 -------------------- 1 file changed, 40 deletions(-) delete mode 100644 packages/experimental/src.ts/eip-provider.ts diff --git a/packages/experimental/src.ts/eip-provider.ts b/packages/experimental/src.ts/eip-provider.ts deleted file mode 100644 index 44d6a7c65b..0000000000 --- a/packages/experimental/src.ts/eip-provider.ts +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; - -import { ethers } from "ethers"; - -import { version } from "./_version"; - -const logger = new ethers.utils.Logger(version); - -//import { Networkish } from "@ethersproject/networks"; -//import { defineReadOnly } from "@ethersproject/properties"; - -//import { Logger } from "@ethersproject/logger"; -//import { version } from "./_version"; -//const logger = new Logger(version); - -//import { JsonRpcProvider } from "./json-rpc-provider"; - - -// Exported Types -export interface Eip1193Provider { - send: (message: string, params?: Array) => Promise; - on(eventName: string, listener: (...args: Array) => void): this; -} - - -export class EipWrappedProvider extends ethers.providers.JsonRpcProvider { - readonly provider: Eip1193Provider; - - constructor(provider: Eip1193Provider, network?: ethers.providers.Networkish) { - logger.checkNew(new.target, EipWrappedProvider); - - super("eip1193:/\/", network); - - ethers.utils.defineReadOnly(this, "provider", provider); - } - - send(method: string, params: any): Promise { - return this.provider.send(method, params); - } -}