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;
// Update Access Token if necessary
$scope.loading = true;
coinbaseService.init(function(err, data) {
$scope.loading = false;
if (err || lodash.isEmpty(data)) {
if (err) {
popupService.showAlert(gettextCatalog.getString('Error'), err);

View file

@ -1,6 +1,6 @@
'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 isCordova = platformInfo.isCordova;
@ -44,9 +44,8 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
if ($scope.coinbaseEnabled) {
coinbaseService.setCredentials();
storageService.getCoinbaseToken(coinbaseService.getNetwork(), function(err, token) {
if (err) $log.error(err);
$scope.coinbaseToken = token;
coinbaseService.getStoredToken(function(at) {
$scope.coinbaseToken = at;
});
}

View file

@ -86,7 +86,7 @@
<div class="list card">
<div class="item item-heading" ng-click="updateTransactions()">
Activity
</div>
</div>
<a class="item"
ng-if="pendingTransactions.data && !error"
ng-repeat="(id, tx) in pendingTransactions.data | orderObjectBy:'updated_at':true track by $index"
@ -121,6 +121,9 @@
</p>
</a>
</div>
<div class="m10t text-center" ng-if="loading">
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
</div>
</div>
</ion-content>