Fix: modal choose wallet. Sell in Coinbase and Glidera. Spinner
This commit is contained in:
parent
6d9bc56144
commit
f08f30240a
13 changed files with 123 additions and 81 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('coinbaseTxDetailsController', function($scope, coinbaseService) {
|
||||
angular.module('copayApp.controllers').controller('coinbaseTxDetailsController', function($scope, $rootScope, coinbaseService) {
|
||||
|
||||
$scope.remove = function() {
|
||||
coinbaseService.savePendingTransaction($scope.tx, {
|
||||
|
|
|
|||
|
|
@ -2,25 +2,24 @@
|
|||
|
||||
angular.module('copayApp.controllers').controller('walletsController', function($scope, bwsError, profileService) {
|
||||
|
||||
var self = $scope.self;
|
||||
|
||||
$scope.selectWallet = function(walletId, walletName) {
|
||||
if (!profileService.getClient(walletId).isComplete()) {
|
||||
self.error = bwsError.msg({
|
||||
'code': 'WALLET_NOT_COMPLETE'
|
||||
}, 'Could not choose the wallet');
|
||||
self.error = {
|
||||
errors: [{
|
||||
message: 'The Wallet could not be selected'
|
||||
}]
|
||||
};
|
||||
$scope.cancel();
|
||||
return;
|
||||
}
|
||||
self.selectedWalletId = walletId;
|
||||
self.selectedWalletName = walletName;
|
||||
self.fc = profileService.getClient(self.selectedWalletId);
|
||||
$scope.cancel();
|
||||
|
||||
var client = profileService.getClient(walletId);
|
||||
$scope.errorSelectedWallet = {};
|
||||
|
||||
profileService.isReady(client, function(err) {
|
||||
if (err) {
|
||||
$scope.errorSelectedWallet[walletId] = bwsError.msg(err);
|
||||
return;
|
||||
}
|
||||
|
||||
var obj = {
|
||||
'walletId': walletId,
|
||||
'walletName': walletName,
|
||||
'client': profileService.getClient(walletId)
|
||||
}
|
||||
$scope.$emit('walletSelected', obj);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.cancel = function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue