Fix loading
This commit is contained in:
parent
5666a66e1d
commit
b5f3648aee
3 changed files with 9 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue