diff --git a/lib/cash-in-tx.js b/lib/cash-in-tx.js index eb06352a..2460f03c 100644 --- a/lib/cash-in-tx.js +++ b/lib/cash-in-tx.js @@ -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({}) diff --git a/lib/cash-out-tx.js b/lib/cash-out-tx.js index 88f61bf9..96a5c52b 100644 --- a/lib/cash-out-tx.js +++ b/lib/cash-out-tx.js @@ -19,7 +19,6 @@ function post (tx, pi) { function transaction (t) { const sql = 'select * from cash_out_txs where id=$1' - console.log('DEBUG988: %j', tx) return t.oneOrNone(sql, [tx.id]) .then(toObj) .then(oldTx => { @@ -132,8 +131,6 @@ function insert (tx) { const dbTx = toDb(tx) const sql = pgp.helpers.insert(dbTx, null, 'cash_out_txs') + ' returning *' - console.log('DEBUG901: %s', sql) - console.log('DEBUG902: %j', dbTx) return db.one(sql) .then(toObj) } @@ -142,7 +139,6 @@ function update (tx, changes) { if (_.isEmpty(changes)) return Promise.resolve(tx) const dbChanges = toDb(tx) - console.log('DEBUG893: %j', dbChanges) const sql = pgp.helpers.update(dbChanges, null, 'cash_out_txs') + pgp.as.format(' where id=$1', [tx.id]) @@ -154,7 +150,6 @@ function update (tx, changes) { function preProcess (tx, newTx, pi) { if (!tx) { - console.log('DEBUG910') return pi.newAddress(newTx) .then(_.set('toAddress', _, newTx)) } diff --git a/lib/plugins.js b/lib/plugins.js index 5ea5d9a6..bfcfeb38 100644 --- a/lib/plugins.js +++ b/lib/plugins.js @@ -220,8 +220,6 @@ function plugins (settings, deviceId) { function fiatBalance (fiatCode, cryptoCode) { const config = configManager.scoped(cryptoCode, deviceId, settings.config) - console.log('DEBUG222: %j', config) - console.log('DEBUG223: %j', [cryptoCode, deviceId]) return Promise.all([ ticker.getRates(settings, fiatCode, cryptoCode), wallet.balance(settings, cryptoCode) diff --git a/lib/routes.js b/lib/routes.js index 5d4a2580..dc4cf994 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -80,14 +80,12 @@ function poll (req, res, next) { } function getTx (req, res, next) { - console.log('DEBUG333: %s', req.query.status) if (req.query.status) { return helpers.fetchStatusTx(req.params.id, req.query.status) .then(r => res.json(r)) .catch(next) } - console.log('DEBUG334') return next(httpError('Not Found', 404)) }