From e8446d45376c8a444de2815ccc5cc90cb38bba54 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Wed, 8 Jul 2015 15:29:54 -0400 Subject: [PATCH] Removed double network call --- lib/script/script.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/script/script.js b/lib/script/script.js index c2f9bad..6bffeb0 100644 --- a/lib/script/script.js +++ b/lib/script/script.js @@ -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); };