Wallet/js/controllers/homeWallet.js

13 lines
445 B
JavaScript
Raw Normal View History

2014-10-31 11:49:52 -03:00
'use strict';
angular.module('copayApp.controllers').controller('HomeWalletController',
2014-11-29 18:35:48 -03:00
function($scope, $rootScope) {
2014-10-31 11:49:52 -03:00
$rootScope.title = 'Home';
2014-11-29 18:35:48 -03:00
$scope.addr = _.last($rootScope.wallet.getReceiveAddresses());
2014-10-31 11:49:52 -03:00
2014-11-29 18:35:48 -03:00
// This is necesarry, since wallet can change in homeWallet, without running init() again.
$rootScope.$watch('wallet', function() {
$scope.addr = _.last($rootScope.wallet.getReceiveAddresses());
});
2014-10-31 11:49:52 -03:00
}
);