Fix loading

This commit is contained in:
Gustavo Maximiliano Cortez 2017-01-13 01:37:13 -03:00
commit b5f3648aee
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
3 changed files with 9 additions and 5 deletions

View file

@ -12,7 +12,9 @@ angular.module('copayApp.controllers').controller('coinbaseController', function
$scope.accessToken = at; $scope.accessToken = at;
// Update Access Token if necessary // Update Access Token if necessary
$scope.loading = true;
coinbaseService.init(function(err, data) { coinbaseService.init(function(err, data) {
$scope.loading = false;
if (err || lodash.isEmpty(data)) { if (err || lodash.isEmpty(data)) {
if (err) { if (err) {
popupService.showAlert(gettextCatalog.getString('Error'), err); popupService.showAlert(gettextCatalog.getString('Error'), err);

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('tabSettingsController', function($scope, appConfigService, $window, $log, lodash, uxLanguage, platformInfo, profileService, feeService, configService, externalLinkService, bitpayCardService, storageService, glideraService, coinbaseService, gettextCatalog) { angular.module('copayApp.controllers').controller('tabSettingsController', function($scope, appConfigService, $log, lodash, uxLanguage, platformInfo, profileService, feeService, configService, externalLinkService, bitpayCardService, storageService, glideraService, coinbaseService, gettextCatalog) {
var updateConfig = function() { var updateConfig = function() {
var isCordova = platformInfo.isCordova; var isCordova = platformInfo.isCordova;
@ -44,9 +44,8 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
if ($scope.coinbaseEnabled) { if ($scope.coinbaseEnabled) {
coinbaseService.setCredentials(); coinbaseService.setCredentials();
storageService.getCoinbaseToken(coinbaseService.getNetwork(), function(err, token) { coinbaseService.getStoredToken(function(at) {
if (err) $log.error(err); $scope.coinbaseToken = at;
$scope.coinbaseToken = token;
}); });
} }

View file

@ -121,6 +121,9 @@
</p> </p>
</a> </a>
</div> </div>
<div class="m10t text-center" ng-if="loading">
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
</div>
</div> </div>
</ion-content> </ion-content>