normalize db records to server records
This commit is contained in:
parent
c4e557e86d
commit
59e93445ec
4 changed files with 59 additions and 47 deletions
|
|
@ -286,7 +286,7 @@ function executeTx (session, tx, authority, cb) {
|
|||
logger.error(err)
|
||||
return cb(err)
|
||||
}
|
||||
var cryptoAtomsToSend = toSend.satoshis
|
||||
var cryptoAtomsToSend = toSend.cryptoAtoms
|
||||
if (cryptoAtomsToSend === 0) {
|
||||
logger.debug('No cryptoAtoms to send')
|
||||
return cb(null, {statusCode: 204, txId: tx.txId, txHash: null})
|
||||
|
|
@ -324,10 +324,10 @@ function reapTx (row) {
|
|||
var session = {fingerprint: row.device_fingerprint, id: row.session_id}
|
||||
var tx = {
|
||||
fiat: 0,
|
||||
satoshis: new BigNumber(row.satoshis),
|
||||
toAddress: row.to_address,
|
||||
currencyCode: row.currency_code,
|
||||
cryptoCode: row.crypto_code,
|
||||
cryptoAtoms: new BigNumber(row.cryptoAtoms),
|
||||
toAddress: row.toAddress,
|
||||
currencyCode: row.currencyCode,
|
||||
cryptoCode: row.cryptoCode,
|
||||
incoming: row.incoming
|
||||
}
|
||||
if (!row.incoming) reapOutgoingTx(session, tx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue