Browse Source

use networkname from txp

activeAddress
Matias Alejo Garcia 10 years ago
parent
commit
baf5da9b4d
  1. 6
      lib/server.js

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

Loading…
Cancel
Save