diff --git a/lib/server.js b/lib/server.js index 7650f88..c699a5a 100644 --- a/lib/server.js +++ b/lib/server.js @@ -1701,11 +1701,15 @@ WalletService.prototype._normalizeTxHistory = function(txs) { } }); + var t = tx.time; // blocktime + if (!t || _.isNaN(t)) t = tx.firstSeenTs; + if (!t || _.isNaN(t)) t = now; + return { txid: tx.txid, confirmations: tx.confirmations, fees: parseInt((tx.fees * 1e8).toFixed(0)), - time: tx.firstSeenTs || (!_.isNaN(tx.time) ? tx.time : now) || now, + time: t, inputs: inputs, outputs: outputs, };