Removed double network call
This commit is contained in:
parent
ef26931645
commit
e8446d4537
|
@ -780,12 +780,11 @@ Script.prototype.getAddressInfo = function() {
|
|||
* @return {Address|boolean} the associated address for this script if possible, or false
|
||||
*/
|
||||
Script.prototype.toAddress = function(network) {
|
||||
network = Networks.get(network) || this._network || Networks.defaultNetwork;
|
||||
var info = this.getAddressInfo();
|
||||
if (!info) {
|
||||
return false;
|
||||
}
|
||||
info.network = Networks.get(network) || Networks.defaultNetwork;
|
||||
info.network = Networks.get(network) || this._network || Networks.defaultNetwork;
|
||||
return new Address(info);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue