Skip to content

Commit

Permalink
Moved getDefaultProvider to providers package.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Nov 1, 2019
1 parent e1509a6 commit 51e4ef2
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions packages/ethers/src.ts/ethers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { Wallet } from "@ethersproject/wallet";
import * as constants from "@ethersproject/constants";

import * as providers from "@ethersproject/providers";
import { getDefaultProvider } from "@ethersproject/providers";

import { Wordlist, wordlists} from "@ethersproject/wordlists";

import * as utils from "./utils";
Expand Down Expand Up @@ -53,21 +55,6 @@ import {
} from "@ethersproject/contracts";


////////////////////////
// Helper Functions

function getDefaultProvider(network?: providers.Network | string, options?: any): providers.BaseProvider {
if (network == null) { network = "homestead"; }
let n = providers.getNetwork(network);
if (!n || !n._defaultProvider) {
logger.throwError("unsupported getDefaultProvider network", Logger.errors.NETWORK_ERROR, {
operation: "getDefaultProvider",
network: network
});
}
return n._defaultProvider(providers, options);
}

////////////////////////
// Exports

Expand Down

0 comments on commit 51e4ef2

Please sign in to comment.