diff --git a/app.js b/app.js index eb7aab5..9519be1 100644 --- a/app.js +++ b/app.js @@ -199,6 +199,7 @@ router.post('/v1/txproposals/:id/signatures/', function(req, res) { req.body.txProposalId = req.params['id']; server.signTx(req.body, function(err, txp) { if (err) return returnError(err, res, req); + res.json(txp); res.end(); }); }); @@ -210,6 +211,7 @@ router.post('/v1/txproposals/:id/broadcast/', function(req, res) { req.body.txProposalId = req.params['id']; server.broadcastTx(req.body, function(err, txp) { if (err) return returnError(err, res, req); + res.json(txp); res.end(); }); }); @@ -220,6 +222,7 @@ router.post('/v1/txproposals/:id/rejections', function(req, res) { req.body.txProposalId = req.params['id']; server.rejectTx(req.body, function(err, txp) { if (err) return returnError(err, res, req); + res.json(txp); res.end(); }); }); diff --git a/bit-wallet/bit-broadcast b/bit-wallet/bit-broadcast index 82fa266..e97c6e2 100755 --- a/bit-wallet/bit-broadcast +++ b/bit-wallet/bit-broadcast @@ -25,6 +25,7 @@ client.getTxProposals({}, function(err, txps) { var txp = utils.findOneTxProposal(txps, txpid); client.broadcastTxProposal(txp, function(err, txid) { utils.die(err); - console.log('TX Broadcasted: ', txid); + console.log('Transaction Broadcasted: TXID: ' + x.txid); + }); }); diff --git a/bit-wallet/bit-reject b/bit-wallet/bit-reject index fcaf663..3a7ac6a 100644 --- a/bit-wallet/bit-reject +++ b/bit-wallet/bit-reject @@ -23,6 +23,9 @@ client.getTxProposals({}, function(err, txps) { var txp = utils.findOneTxProposal(txps, txpid); client.rejectTxProposal(txp, reason, function(err, tx) { utils.die(err); - console.log('Transaction rejected.'); + if (x.status == 'rejected') + console.log('Transaction finally rejected.'); + else + console.log('Transaction rejected by you.'); }); }); diff --git a/bit-wallet/bit-sign b/bit-wallet/bit-sign index 4c41f48..7c54dd9 100755 --- a/bit-wallet/bit-sign +++ b/bit-wallet/bit-sign @@ -21,6 +21,9 @@ client.getTxProposals({}, function(err, txps) { var txp = utils.findOneTxProposal(txps, txpid); client.signTxProposal(txp, function(err, x) { utils.die(err); - console.log('Transaction signed.'); + if (x.status == 'broadcasted') + console.log('Transaction Broadcasted: TXID: ' + x.txid); + else + console.log('Transaction signed by you.'); }); }); diff --git a/lib/server.js b/lib/server.js index f5a0362..e6d0114 100644 --- a/lib/server.js +++ b/lib/server.js @@ -650,6 +650,7 @@ CopayServer.prototype.signTx = function(opts, cb) { txid: txid }); +console.log('[server.js.653:txp:]',txp); //TODO return cb(null, txp); }); });