|
|
@ -1446,6 +1446,8 @@ WalletService.prototype.getNotifications = function(opts, cb) { |
|
|
|
|
|
|
|
|
|
|
|
WalletService.prototype._normalizeTxHistory = function(txs) { |
|
|
|
var now = Math.floor(Date.now() / 1000); |
|
|
|
|
|
|
|
return _.map(txs, function(tx) { |
|
|
|
var inputs = _.map(tx.vin, function(item) { |
|
|
|
return { |
|
|
@ -1471,7 +1473,7 @@ WalletService.prototype._normalizeTxHistory = function(txs) { |
|
|
|
txid: tx.txid, |
|
|
|
confirmations: tx.confirmations, |
|
|
|
fees: parseInt((tx.fees * 1e8).toFixed(0)), |
|
|
|
time: !_.isNaN(tx.time) ? tx.time : Math.floor(Date.now() / 1000), |
|
|
|
time: tx.firstSeenTs || (!_.isNaN(tx.time) ? tx.time : now) || now, |
|
|
|
inputs: inputs, |
|
|
|
outputs: outputs, |
|
|
|
}; |
|
|
@ -1517,8 +1519,6 @@ WalletService.prototype.getTxHistory = function(opts, cb) { |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
var now = Math.floor(Date.now() / 1000); |
|
|
|
|
|
|
|
return _.map(txs, function(tx) { |
|
|
|
|
|
|
|
var amountIn, amountOut, amountOutChange; |
|
|
@ -1557,7 +1557,7 @@ WalletService.prototype.getTxHistory = function(opts, cb) { |
|
|
|
action: action, |
|
|
|
amount: amount, |
|
|
|
fees: tx.fees, |
|
|
|
time: tx.firstSeenTs || tx.time || now, |
|
|
|
time: tx.time, |
|
|
|
addressTo: addressTo, |
|
|
|
confirmations: tx.confirmations, |
|
|
|
}; |
|
|
|