Merge pull request #2260 from isocolsky/wallet_home

Fix wallet home
This commit is contained in:
Matias Alejo Garcia 2015-01-04 12:24:31 -03:00
commit df471d4a55

View file

@ -1,13 +1,18 @@
'use strict'; 'use strict';
var watching;
angular.module('copayApp.controllers').controller('HomeWalletController', function($scope, $rootScope, $timeout, $filter, $modal, rateService, notification, txStatus, identityService) { angular.module('copayApp.controllers').controller('HomeWalletController', function($scope, $rootScope, $timeout, $filter, $modal, rateService, notification, txStatus, identityService) {
$scope.initHome = function() { $scope.initHome = function() {
$rootScope.title = 'Home'; $rootScope.title = 'Home';
var w = $rootScope.wallet; if (!watching) {
watching = $rootScope.$watch('wallet', function (w) {
$scope.isShared = w.isShared(); $scope.isShared = w.isShared();
$scope.requiresMultipleSignatures = w.requiresMultipleSignatures(); $scope.requiresMultipleSignatures = w.requiresMultipleSignatures();
if ($scope.isShared) if ($scope.isShared)
$scope.copayers = w.getRegisteredPeerIds(); $scope.copayers = w.getRegisteredPeerIds();
});
}
}; };
$scope.openTxModal = function(tx) { $scope.openTxModal = function(tx) {