feat(resend): Re-send process improvements

This commit is contained in:
Damian Mee 2014-10-01 01:54:11 +02:00
parent f7f98d986e
commit 9ea8af28f8
3 changed files with 79 additions and 65 deletions

View file

@ -103,11 +103,14 @@ function verifyTx(req, res) {
function send(req, res) {
plugins.sendBitcoins(getFingerprint(req), req.body, function(err, status) {
// TODO: use status.statusCode here after confirming machine compatibility
res.json({
var j = {
errType: err && err.name,
err: err && err.message,
txHash: status && status.txHash
});
txHash: status && status.txHash,
txId: status && status.txId
};
logger.debug('send: %j', j);
res.json(j);
});
}