fix receive wallet scope

This commit is contained in:
Javier 2016-08-24 11:21:07 -03:00
commit fee7034863
3 changed files with 9 additions and 2 deletions

View file

@ -55,7 +55,7 @@ Error: {{addrError}}
</div>
</div>
<wallets></wallets>
<wallets only-complete="true"></wallets>
</ion-content>
</ion-view>

View file

@ -43,8 +43,11 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
};
$scope.$on('Wallet/Changed', function(event, wallet) {
if (!wallet) {
$log.debug('No wallet provided');
return;
}
$log.debug('Wallet changed: ' + wallet.name);
$scope.defaultWallet = wallet;
$scope.setAddress(wallet);
});

View file

@ -163,6 +163,10 @@ angular.module('copayApp.directives')
if (minBalance)
filterWallet();
else {
scope.content.wallets = wallets;
scope.$emit('Wallet/Changed', scope.content.wallets[0]);
}
scope.$on("$ionicSlides.sliderInitialized", function(event, data) {
scope.slider = data.slider;