From e60a34cdad8f01ae3a78888b6d94736144c8e1a3 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Mon, 27 Oct 2014 16:51:29 -0300 Subject: [PATCH 1/2] added sentTs and minedTs to tx history --- js/models/Wallet.js | 14 ++++++++------ views/transactions.html | 10 +++++----- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/js/models/Wallet.js b/js/models/Wallet.js index 608dbea3d..3f9e10418 100644 --- a/js/models/Wallet.js +++ b/js/models/Wallet.js @@ -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) { diff --git a/views/transactions.html b/views/transactions.html index eeea1045e..aca259e80 100644 --- a/views/transactions.html +++ b/views/transactions.html @@ -40,13 +40,13 @@
-
- first seen at - +
+ broadcasted +
-
+
mined - +
From e1f3f29db0495a4481c7d62acdafb0fd4f2e8954 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Mon, 27 Oct 2014 17:16:24 -0300 Subject: [PATCH 2/2] refreshing view --- js/controllers/transactions.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/controllers/transactions.js b/js/controllers/transactions.js index ebaa017ae..3bf002351 100644 --- a/js/controllers/transactions.js +++ b/js/controllers/transactions.js @@ -64,6 +64,9 @@ angular.module('copayApp.controllers').controller('TransactionsController', $scope.blockchain_txs = w.cached_txs = res; $scope.loading = false; + setTimeout(function() { + $scope.$digest(); + }, 1); }); };