remove toSend partial send stuff
This commit is contained in:
parent
59db6d803c
commit
ec2f925c16
1 changed files with 4 additions and 7 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue