Merge pull request #148 from isocolsky/fix/history

Fix/history
This commit is contained in:
Ivan Socolsky 2015-03-19 13:18:05 -03:00
commit 1e65294212
2 changed files with 3 additions and 3 deletions

View File

@ -952,6 +952,7 @@ WalletService.prototype.getTxHistory = function(opts, cb) {
});
};
var now = Math.floor(Date.now() / 1000);
return _.map(txs, function(tx) {
var inputs = classify(tx.inputs);
@ -979,7 +980,7 @@ WalletService.prototype.getTxHistory = function(opts, cb) {
action: action,
amount: amount,
fees: tx.fees,
time: tx.time,
time: tx.time || now,
addressTo: addressTo,
confirmations: tx.confirmations,
};
@ -1003,7 +1004,6 @@ WalletService.prototype.getTxHistory = function(opts, cb) {
function paginate(txs) {
var limited = opts.limit && opts.limit != -1;
if (!opts.minTs && !opts.maxTs && !limited) return;
var minTs = opts.minTs || 0;
var maxTs = opts.maxTs || Math.ceil(Date.now() / 1000);

View File

@ -2,7 +2,7 @@
"name": "bitcore-wallet-service",
"description": "A service for Mutisig HD Bitcoin Wallets",
"author": "BitPay Inc",
"version": "0.0.9",
"version": "0.0.10",
"keywords": [
"bitcoin",
"copay",