bug fixes
This commit is contained in:
parent
5987f288a7
commit
836e6a8cf0
3 changed files with 7 additions and 3 deletions
|
|
@ -156,7 +156,7 @@ function pullNewBills (billRows, machineTx) {
|
|||
return _.differenceBy(_.get('id'), machineTx.bills, bills)
|
||||
}
|
||||
|
||||
const massage = _.flow(_.omit(['direction', 'bills']), convertBigNumFields, _.mapKeys(_.snakeCase))
|
||||
const massage = _.flow(_.omit(['direction', 'cryptoNetwork', 'bills']), convertBigNumFields, _.mapKeys(_.snakeCase))
|
||||
|
||||
function insertNewBills (billRows, machineTx) {
|
||||
const bills = pullNewBills(billRows, machineTx)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ let t0
|
|||
function _balance (cryptoCode) {
|
||||
const cryptoRec = coinUtils.getCryptoCurrency(cryptoCode)
|
||||
const unitScale = cryptoRec.unitScale
|
||||
BN(10).shift(unitScale).round()
|
||||
return BN(10).shift(unitScale).round()
|
||||
}
|
||||
|
||||
function balance (account, cryptoCode) {
|
||||
|
|
|
|||
|
|
@ -100,7 +100,11 @@ function postTx (req, res, next) {
|
|||
|
||||
return Tx.post(_.set('deviceId', req.deviceId, req.body), pi)
|
||||
.then(tx => {
|
||||
if (tx.errorCode) throw httpError(tx.error, 500)
|
||||
if (tx.errorCode) {
|
||||
logger.error(tx.error)
|
||||
throw httpError(tx.error, 500)
|
||||
}
|
||||
|
||||
return res.json(tx)
|
||||
})
|
||||
.catch(next)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue