mirror of https://github.com/BTCPrivate/copay.git
added watch for .wallet
This commit is contained in:
parent
5dffcf79c9
commit
458f2b0638
|
@ -1,13 +1,18 @@
|
|||
'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;
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue