Allow any Networkish for getDefaultProvider (#2031).

This commit is contained in:
Richard Moore 2021-10-04 10:57:00 -04:00
parent 375627f6b1
commit cc250b2060
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

View File

@ -43,7 +43,7 @@ const logger = new Logger(version);
//////////////////////// ////////////////////////
// Helper Functions // Helper Functions
function getDefaultProvider(network?: Network | string, options?: any): BaseProvider { function getDefaultProvider(network?: Networkish, options?: any): BaseProvider {
if (network == null) { network = "homestead"; } if (network == null) { network = "homestead"; }
// If passed a URL, figure out the right type of provider based on the scheme // If passed a URL, figure out the right type of provider based on the scheme