Fix loading wallet-history

This commit is contained in:
Gustavo Maximiliano Cortez 2015-12-03 17:44:02 -03:00
commit 821db133c8
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
3 changed files with 12 additions and 6 deletions

View file

@ -12,5 +12,5 @@
<!-- <img style="height:1em" ng&#45;show="index.preferences.email" src="img/icon&#45;email.svg"> -->
<img style="height:1em" ng-show="index.usingCustomBWS" src="img/icon-bws.svg">
<img style="height:1em" class="animated flash infinite" ng-show="index.updatingTxHistory[index.walletId]" src="img/icon-sync.svg">
<img style="height:1em" class="animated flash infinite" ng-show="index.loadingWallet" src="img/icon-sync.svg">

View file

@ -173,21 +173,22 @@
<!-- Activity -->
<h4 class="title m0" translate>Activity</h4>
<div class="row m20t" ng-show="!index.updatingTxHistory[index.walletId] && !index.txHistory[0]">
<div class="row"
ng-show="!index.loadingWallet && !index.txHistory[0]">
<div class="large-12 columns">
<div class="oh text-center">
<div class="oh text-gray size-12 text-center">
<span ng-if="!index.txHistoryError" translate>
No transactions yet
</span>
<span ng-show="index.txHistoryError && !index.notAuthorized" ng-click='index.updateTxHistory()'>
<p class="size-12 m10b db text-gray" translate>Could not fetch transaction history</p>
<p translate>Could not fetch transaction history</p>
<button class="outline round light-gray tiny" translate>Tap to retry</button>
</span>
</div>
</div>
</div>
<div ng-show="index.updatingTxHistory[index.walletId]">
<div class="row p20 text-center" ng-show="index.txProgress > 6">
<div ng-show="index.updatingTxHistory[index.walletId] && index.txProgress > 6">
<div class="row p20 text-center">
<div class="columns large-12 medium-12 small-12 m10b">
<div class="spinner">
<div class="rect1"></div>

View file

@ -64,6 +64,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
var fc = profileService.focusedClient;
if (!fc) return;
// loading full wallet
self.loadingWallet = true;
// Clean status
self.totalBalanceSat = null;
self.lockedBalanceSat = null;
@ -923,6 +926,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r
$timeout(function() {
self.updateLocalTxHistory(fc, function(err) {
self.updatingTxHistory[walletId] = false;
self.loadingWallet = false;
self.txProgress = 0;
if (err)
self.txHistoryError = true;