From baf5da9b4d7c60d37fc82859d891f3552993770c Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 6 Feb 2015 15:51:40 -0300 Subject: [PATCH] use networkname from txp --- lib/server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/server.js b/lib/server.js index fb3d228..66a5450 100644 --- a/lib/server.js +++ b/lib/server.js @@ -460,9 +460,9 @@ CopayServer.prototype.getTx = function(opts, cb) { }); }; -CopayServer.prototype._broadcastTx = function(txp, networkName, cb) { +CopayServer.prototype._broadcastTx = function(txp, cb) { var raw = txp.getRawTx(); - var bc = this._getBlockExplorer('insight', networkName); + var bc = this._getBlockExplorer('insight', txp.getNetworkName()); bc.broadcast(raw, function(err, txid) { return cb(err, txid); }) @@ -511,7 +511,7 @@ CopayServer.prototype.signTx = function(opts, cb) { if (err) return cb(err); if (txp.status == 'accepted') { - self._broadcastTx(txp, wallet.getNetworkName(), function(err, txid) { + self._broadcastTx(txp, function(err, txid) { if (err) return cb(err, txp); txp.setBroadcasted(txid);