mirror of https://github.com/BTCPrivate/copay.git
added watch for .wallet
This commit is contained in:
parent
5dffcf79c9
commit
458f2b0638
|
@ -1,14 +1,19 @@
|
||||||
'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) {
|
||||||
$scope.isShared = w.isShared();
|
watching = $rootScope.$watch('wallet', function (w) {
|
||||||
$scope.requiresMultipleSignatures = w.requiresMultipleSignatures();
|
$scope.isShared = w.isShared();
|
||||||
if ($scope.isShared)
|
$scope.requiresMultipleSignatures = w.requiresMultipleSignatures();
|
||||||
$scope.copayers = w.getRegisteredPeerIds();
|
if ($scope.isShared)
|
||||||
};
|
$scope.copayers = w.getRegisteredPeerIds();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
$scope.openTxModal = function(tx) {
|
$scope.openTxModal = function(tx) {
|
||||||
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
||||||
|
|
Loading…
Reference in New Issue