WIP
This commit is contained in:
parent
98e863d31d
commit
318811e4ff
1 changed files with 6 additions and 6 deletions
|
|
@ -147,14 +147,14 @@ function cashOut (req, res) {
|
|||
var tx = req.body
|
||||
tx.cryptoAtoms = new BigNumber(tx.cryptoAtoms)
|
||||
|
||||
plugins.cashOut(session(req), req.body, function (err, bitcoinAddress) {
|
||||
if (err) logger.error(err)
|
||||
|
||||
return plugins.cashOut(session(req), req.body)
|
||||
.then(cryptoAddress => res.json({bitcoinAddress: cryptoAddress}))
|
||||
.catch(err => {
|
||||
res.json({
|
||||
err: err && err.message,
|
||||
errType: err && err.name,
|
||||
bitcoinAddress: bitcoinAddress
|
||||
err: err.message,
|
||||
errType: err.name
|
||||
})
|
||||
logger.error(err)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue