Skip to content

Commit

Permalink
Added check for options type while creating network
Browse files Browse the repository at this point in the history
  • Loading branch information
yatharthagoenka committed Feb 14, 2023
1 parent 57f5956 commit 262685f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/protocol/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ class Network {
if (typeof options === 'string')
options = networks[options];

if (options instanceof Object)
assert(!options.type, 'Unknown network.');

assert(options, 'Unknown network.');

if (Network[options.type])
Expand Down

0 comments on commit 262685f

Please sign in to comment.