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

@ -9,7 +9,7 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
this.success = null;
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) {
@ -23,8 +23,6 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
$scope.openWalletsModal = function(wallets) {
self.error = null;
self.selectedWalletId = null;
self.selectedWalletName = null;
$scope.type = 'BUY';
$scope.wallets = wallets;
@ -38,6 +36,15 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
$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.getBuyPrice = function(token, price) {