fixed out of bitcoins; cleanup

This commit is contained in:
Josh Harvey 2014-04-26 23:13:58 -04:00
parent 96f480a73c
commit 30084617c3
3 changed files with 27 additions and 21 deletions

View file

@ -57,7 +57,11 @@ var trade = function (req, res) {
var send = function(req, res) {
var fingerprint = req.connection.getPeerCertificate().fingerprint;
_trader.sendBitcoins(fingerprint, req.body, function(err, txHash) {
res.json({err: err, txHash: txHash});
res.json({
err: err && err.message,
txHash: txHash,
errType: err && err.name
});
});
};