added sentTs and minedTs to tx history

This commit is contained in:
Ivan Socolsky 2014-10-27 16:51:29 -03:00
commit e60a34cdad
2 changed files with 13 additions and 11 deletions

View file

@ -977,13 +977,13 @@ Wallet.prototype.toObj = function() {
Wallet.fromUntrustedObj = function(obj, readOpts) {
obj = _.clone(obj);
obj = _.clone(obj);
var o = {};
_.each(Wallet.PERSISTED_PROPERTIES, function(p) {
o[p] = obj[p];
});
return Wallet.fromObj(o,readOpts);
return Wallet.fromObj(o, readOpts);
};
/**
@ -2518,10 +2518,10 @@ Wallet.prototype.close = function(cb) {
this.blockchain.destroy();
log.debug('## CLOSING Wallet: ' + this.id);
// TODO
// this.lock.release(function() {
if (cb) return cb();
// });
// TODO
// this.lock.release(function() {
if (cb) return cb();
// });
};
/**
@ -2906,6 +2906,8 @@ Wallet.prototype.getTransactionHistory = function(cb) {
tx.labelTo = firstOut ? firstOut.label : undefined;
tx.amountSat = Math.abs(amount);
tx.amount = tx.amountSat * satToUnit;
tx.sentTs = proposal ? proposal.sentTs : undefined;
tx.minedTs = tx.time * 1000;
};
if (addresses.length > 0) {

View file

@ -40,13 +40,13 @@
<span class="btn-copy" clip-copy="btx.txid"></span>
</div>
<div class="large-4 medium-5 small-8 columns text-right">
<div data-ng-show="btx.firstSeenTs">
<span translate>first seen at</span>
<time>{{btx.firstSeenTs * 1000 | amCalendar}}</time>
<div data-ng-show="btx.sentTs">
<span translate>broadcasted</span>
<time>{{btx.sentTs | amCalendar}}</time>
</div>
<div data-ng-show="btx.time && !btx.firstSeenTs">
<div data-ng-show="btx.minedTs">
<span translate>mined</span>
<time>{{btx.time * 1000 | amCalendar}}</time>
<time>{{btx.minedTs | amCalendar}}</time>
</div>
</div>
</div>