Changed Web3Proivder url to empty string instead of unknown if it cannot be determined.

This commit is contained in:
Richard Moore 2018-07-12 02:50:44 -04:00
parent 272265f085
commit b7e143b4f3
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295
2 changed files with 2 additions and 2 deletions

@ -28,7 +28,7 @@ var Web3Provider = /** @class */ (function (_super) {
errors.throwError('invalid web3Provider', errors.INVALID_ARGUMENT, { arg: 'web3Provider', value: web3Provider });
}
// HTTP has a host; IPC has a path.
var url = web3Provider.host || web3Provider.path || 'unknown';
var url = web3Provider.host || web3Provider.path || '';
_this = _super.call(this, url, network) || this;
errors.checkNew(_this, Web3Provider);
properties_1.defineReadOnly(_this, '_web3Provider', web3Provider);

@ -37,7 +37,7 @@ export class Web3Provider extends JsonRpcProvider {
}
// HTTP has a host; IPC has a path.
var url = web3Provider.host || web3Provider.path || 'unknown';
var url = web3Provider.host || web3Provider.path || '';
super(url, network);
errors.checkNew(this, Web3Provider);