use networkname from txp

This commit is contained in:
Matias Alejo Garcia 2015-02-06 15:51:40 -03:00
parent 1200f2b2f0
commit baf5da9b4d
1 changed files with 3 additions and 3 deletions

View File

@ -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);