use contact name in proposal card

This commit is contained in:
Javier 2016-12-14 13:24:02 -03:00
commit 880e3ebe14

View file

@ -1,22 +1,26 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('proposalsController', angular.module('copayApp.controllers').controller('proposalsController',
function($timeout, $scope, profileService, $log, txpModalService) { function($timeout, $scope, profileService, $log, txpModalService, addressbookService) {
$scope.fetchingProposals = true; $scope.fetchingProposals = true;
$scope.$on("$ionicView.enter", function(event, data){ $scope.$on("$ionicView.enter", function(event, data) {
profileService.getTxps(50, function(err, txps) { addressbookService.list(function(err, ab) {
$scope.fetchingProposals = false; if (err) $log.error(err);
if (err) { $scope.addressbook = ab || {};
$log.error(err);
return; profileService.getTxps(50, function(err, txps) {
} $scope.fetchingProposals = false;
$scope.txps = txps; if (err) {
$timeout(function() { $log.error(err);
$scope.$apply(); return;
}, 1); }
$scope.txps = txps;
$timeout(function() {
$scope.$apply();
});
});
}); });
}); });