Fix: modal choose wallet. Sell in Coinbase and Glidera. Spinner

This commit is contained in:
Gustavo Maximiliano Cortez 2016-06-16 18:29:56 -03:00
commit f08f30240a
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
13 changed files with 123 additions and 81 deletions

View file

@ -5,7 +5,7 @@ angular.module('copayApp.controllers').controller('buyCoinbaseController',
var self = this;
this.init = function(testnet) {
self.allWallets = profileService.getWallets(testnet ? 'testnet' : 'livenet', 1)
self.allWallets = profileService.getWallets(testnet ? 'testnet' : 'livenet');
var client = profileService.focusedClient;
if (client) {
@ -45,8 +45,6 @@ angular.module('copayApp.controllers').controller('buyCoinbaseController',
$scope.openWalletsModal = function(wallets) {
self.error = null;
self.selectedWalletId = null;
self.selectedWalletName = null;
$scope.type = 'BUY';
$scope.wallets = wallets;
@ -60,6 +58,15 @@ angular.module('copayApp.controllers').controller('buyCoinbaseController',
$scope.walletsModal = modal;
$scope.walletsModal.show();
});
$scope.$on('walletSelected', function(ev, obj) {
$timeout(function() {
self.selectedWalletId = obj.walletId;
self.selectedWalletName = obj.walletName;
$scope.$apply();
}, 100);
$scope.walletsModal.hide();
});
};
this.buyRequest = function(token, account) {