2014-10-31 07:49:52 -07:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
angular.module('copayApp.controllers').controller('HomeWalletController',
|
2014-11-29 13:35:48 -08:00
|
|
|
function($scope, $rootScope) {
|
2014-10-31 07:49:52 -07:00
|
|
|
$rootScope.title = 'Home';
|
2014-11-29 13:35:48 -08:00
|
|
|
$scope.addr = _.last($rootScope.wallet.getReceiveAddresses());
|
2014-10-31 07:49:52 -07:00
|
|
|
|
2014-11-29 13:35:48 -08: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 07:49:52 -07:00
|
|
|
}
|
|
|
|
);
|