Fix select wallet

This commit is contained in:
Gustavo Maximiliano Cortez 2016-07-14 11:54:01 -03:00
parent c8058fefa4
commit 42a8176d7c
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
1 changed files with 7 additions and 5 deletions

View File

@ -35,19 +35,21 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
$scope.type = 'SELL';
$scope.wallets = wallets;
$scope.self = self;
$ionicModal.fromTemplateUrl('views/modals/wallets.html', {
scope: $scope
scope: $scope,
animation: 'slide-in-up'
}).then(function(modal) {
$scope.walletsModal = modal;
$scope.walletsModal.show();
});
$scope.$on('walletSelected', function(ev, obj) {
$scope.$on('walletSelected', function(ev, walletId) {
$timeout(function() {
self.selectedWalletId = obj.walletId;
self.selectedWalletName = obj.walletName;
client = obj.client;
client = profileService.getClient(walletId);
self.selectedWalletId = walletId;
self.selectedWalletName = client.credentials.walletName;
$scope.$apply();
}, 100);
$scope.walletsModal.hide();