From ec2f925c1691de17fd32910b0c3bc015645c0e72 Mon Sep 17 00:00:00 2001 From: Josh Harvey Date: Wed, 25 May 2016 16:57:02 +0300 Subject: [PATCH] remove toSend partial send stuff --- lib/plugins.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/plugins.js b/lib/plugins.js index 9e32d3b5..94cb70f7 100644 --- a/lib/plugins.js +++ b/lib/plugins.js @@ -277,20 +277,17 @@ function _sendCoins (toAddress, cryptoAtoms, cryptoCode, cb) { } function executeTx (session, tx, authority, cb) { - db.addOutgoingTx(session, tx, function (err, toSend) { + db.addOutgoingTx(session, tx, function (err) { if (err) { logger.error(err) return cb(err) } - var cryptoAtomsToSend = toSend.cryptoAtoms - if (cryptoAtomsToSend.eq(0)) { - logger.debug('No cryptoAtoms to send') - return cb(null, {statusCode: 204, txId: tx.txId, txHash: null}) - } var cryptoCode = tx.cryptoCode - _sendCoins(tx.toAddress, cryptoAtomsToSend, cryptoCode, function (_err, txHash) { + _sendCoins(tx.toAddress, tx.cryptoAtoms, cryptoCode, function (_err, txHash) { var fee = null // Need to fill this out in plugins + var toSend = {cryptoAtoms: tx.cryptoAtoms, fiat: tx.fiat} + if (_err) { logger.error(_err) toSend = {cryptoAtoms: new BigNumber(0), fiat: 0}