use networkname from txp
This commit is contained in:
parent
1200f2b2f0
commit
baf5da9b4d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue