2016-09-01 19:14:18 -03:00
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
angular.module('copayApp.controllers').controller('proposalsController',
|
|
|
|
|
function($timeout, $scope, profileService, $log, txpModalService) {
|
|
|
|
|
|
2016-09-22 01:47:39 -03:00
|
|
|
$scope.fetchingProposals = true;
|
2016-09-01 19:14:18 -03:00
|
|
|
|
2016-09-22 01:47:39 -03:00
|
|
|
$scope.$on("$ionicView.enter", function(event, data){
|
2016-09-01 19:14:18 -03:00
|
|
|
profileService.getTxps(50, function(err, txps) {
|
2016-09-22 01:47:39 -03:00
|
|
|
$scope.fetchingProposals = false;
|
2016-09-01 19:14:18 -03:00
|
|
|
if (err) {
|
2016-09-22 01:47:39 -03:00
|
|
|
$log.error(err);
|
2016-09-01 19:14:18 -03:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$scope.txps = txps;
|
|
|
|
|
$timeout(function() {
|
|
|
|
|
$scope.$apply();
|
|
|
|
|
}, 1);
|
|
|
|
|
});
|
2016-09-22 01:47:39 -03:00
|
|
|
});
|
2016-09-01 19:14:18 -03:00
|
|
|
|
|
|
|
|
$scope.openTxpModal = txpModalService.open;
|
|
|
|
|
});
|