removed transaction proposals from history. Just list transactions sent

This commit is contained in:
Gustavo Maximiliano Cortez 2014-10-30 21:32:49 -03:00
commit 950a89727b
5 changed files with 75 additions and 53 deletions

View file

@ -60,6 +60,9 @@ angular.module('copayApp.controllers').controller('HistoryController',
_.each(res, function (r) {
r.ts = r.minedTs || r.sentTs;
if (r.action === 'sent') {
r.actionList = controllerUtils.getActionList(r.peerActions);
}
});
$scope.blockchain_txs = w.cached_txs = res;
$scope.loading = false;

View file

@ -79,7 +79,7 @@ angular.module('copayApp.controllers').controller('SendController',
setTimeout(function() {
$scope.loading = false;
$rootScope.$digest();
}, 0);
}, 1);
}
$scope.showAddressBook = function() {

View file

@ -2841,6 +2841,9 @@ Wallet.prototype.getTransactionHistory = function(cb) {
tx.amount = tx.amountSat * satToUnit;
tx.sentTs = proposal ? proposal.sentTs : undefined;
tx.minedTs = !_.isNaN(tx.time) ? tx.time * 1000 : undefined;
tx.merchant = proposal ? proposal.merchant : undefined;
tx.peerActions = proposal ? proposal.peerActions : undefined;
tx.finallyRejected = proposal ? proposal.finallyRejected : undefined;
};
if (addresses.length > 0) {

View file

@ -399,6 +399,10 @@ angular.module('copayApp.services')
});
};
root.getActionList = function(actions) {
return getActionList(actions);
};
function getActionList(actions) {
var peers = Object.keys(actions).map(function(i) {
return {