removed debug

This commit is contained in:
Josh Harvey 2017-03-22 01:41:38 +02:00
parent b7a93b89f5
commit fe1ed536c5
4 changed files with 1 additions and 18 deletions

View file

@ -18,7 +18,6 @@ function post (tx, pi) {
const sql = 'select * from cash_in_txs where id=$1'
const sql2 = 'select * from bills where cash_in_txs_id=$1'
console.log('DEBUG888: %j', tx)
return t.oneOrNone(sql, [tx.id])
.then(row => {
return t.any(sql2, [tx.id])
@ -114,7 +113,6 @@ function insertNewBills (billRows, tx) {
const dbBills = _.map(massage, bills)
const columns = _.keys(dbBills[0])
console.log('DEBUG333: %j', dbBills)
const sql = pgp.helpers.insert(dbBills, columns, 'bills')
return db.none(sql)
@ -136,8 +134,6 @@ function upsert (row, tx) {
function insert (tx) {
const dbTx = massage(tx)
console.log('DEBUG334: %j', dbTx)
const sql = pgp.helpers.insert(dbTx, null, 'cash_in_txs') + ' returning *'
return db.one(sql)
.then(toObj)
@ -156,7 +152,6 @@ function update (tx, changes) {
if (_.isEmpty(changes)) return Promise.resolve(tx)
const dbChanges = massage(changes)
console.log('DEBUG893: %j', dbChanges)
const sql = pgp.helpers.update(dbChanges, null, 'cash_in_txs') +
pgp.as.format(' where id=$1', [tx.id]) + ' returning *'
@ -170,10 +165,7 @@ function postProcess (txVector, pi) {
if (newTx.send && !oldTx.send) {
return pi.sendCoins(newTx)
.then(txHash => ({txHash}))
.catch(error => {
console.log('DEBUG895: %j', error)
return {error}
})
.catch(error => ({error}))
}
return Promise.resolve({})