added watch for .wallet
This commit is contained in:
parent
5dffcf79c9
commit
458f2b0638
1 changed files with 11 additions and 6 deletions
|
|
@ -1,14 +1,19 @@
|
|||
'use strict';
|
||||
|
||||
var watching;
|
||||
angular.module('copayApp.controllers').controller('HomeWalletController', function($scope, $rootScope, $timeout, $filter, $modal, rateService, notification, txStatus, identityService) {
|
||||
|
||||
$scope.initHome = function() {
|
||||
$rootScope.title = 'Home';
|
||||
var w = $rootScope.wallet;
|
||||
$scope.isShared = w.isShared();
|
||||
$scope.requiresMultipleSignatures = w.requiresMultipleSignatures();
|
||||
if ($scope.isShared)
|
||||
$scope.copayers = w.getRegisteredPeerIds();
|
||||
};
|
||||
if (!watching) {
|
||||
watching = $rootScope.$watch('wallet', function (w) {
|
||||
$scope.isShared = w.isShared();
|
||||
$scope.requiresMultipleSignatures = w.requiresMultipleSignatures();
|
||||
if ($scope.isShared)
|
||||
$scope.copayers = w.getRegisteredPeerIds();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.openTxModal = function(tx) {
|
||||
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue