Merge pull request #3627 from cmgustavo/bug/updates-history-send
Notify when history is updating the latest tx sent. After sent, back …
This commit is contained in:
commit
f9af630d73
3 changed files with 18 additions and 12 deletions
|
|
@ -75,7 +75,7 @@
|
|||
<div class="oh pr">
|
||||
<div class="amount" ng-style="{'background-color':index.backgroundColor}">
|
||||
<div ng-if="!index.anyOnGoingProcess && !index.notAuthorized">
|
||||
<div ng-show="index.updateError" ng-click='index.openWallet(); index.updateTxHistory()'>
|
||||
<div ng-show="index.updateError" ng-click='index.openWallet()'>
|
||||
<span class="size-12 db m10b">{{index.updateError|translate}}</span>
|
||||
<button class="outline white tiny round" translate>Tap to retry</button>
|
||||
</div>
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
<br><span translate>Tap to retry</span>
|
||||
</div>
|
||||
|
||||
<div ng-click='index.updateAll(); index.updateTxHistory()' ng-show="!index.updateError && index.walletScanStatus != 'error'">
|
||||
<div ng-click='index.updateAll({triggerTxUpdate: true})' ng-show="!index.updateError && index.walletScanStatus != 'error'">
|
||||
<strong class="size-36">{{index.totalBalanceStr}}</strong>
|
||||
<div class="size-14"
|
||||
ng-if="index.totalBalanceAlternative">
|
||||
|
|
@ -180,7 +180,7 @@
|
|||
<span ng-if="!index.txHistoryError" translate>
|
||||
No transactions yet
|
||||
</span>
|
||||
<span ng-show="index.txHistoryError && !index.notAuthorized" ng-click='index.updateTxHistory()'>
|
||||
<span ng-show="index.txHistoryError && !index.notAuthorized" ng-click='index.debounceUpdateHistory()'>
|
||||
<p translate>Could not fetch transaction history</p>
|
||||
<button class="outline round light-gray tiny" translate>Tap to retry</button>
|
||||
</span>
|
||||
|
|
@ -206,7 +206,13 @@
|
|||
</div>
|
||||
|
||||
<div ng-show="index.txHistory[0]">
|
||||
<h4 class="title m0" translate>Activity</h4>
|
||||
<h4 class="title m0">
|
||||
<span translate>Activity</span>
|
||||
<small ng-show="index.updatingTxHistory[index.walletId] && !index.loadingWallet" translate>
|
||||
Updating...
|
||||
</small>
|
||||
</h4>
|
||||
|
||||
<div ng-repeat="btx in index.txHistory"
|
||||
ng-click="home.openTxModal(btx)"
|
||||
class="row collapse last-transactions-content">
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
|
||||
if (opts.triggerTxUpdate) {
|
||||
$timeout(function() {
|
||||
self.updateTxHistory();
|
||||
self.debounceUpdateHistory();
|
||||
}, 1);
|
||||
}
|
||||
});
|
||||
|
|
@ -953,13 +953,13 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
});
|
||||
};
|
||||
|
||||
self.updateTxHistory = lodash.debounce(function() {
|
||||
self.debounceUpdateHistory = lodash.debounce(function() {
|
||||
self.updateHistory();
|
||||
}, 1000);
|
||||
|
||||
self.throttledUpdateHistory = lodash.throttle(function() {
|
||||
self.updateHistory();
|
||||
}, 5000);
|
||||
}, 10000);
|
||||
|
||||
self.showErrorPopup = function(msg, cb) {
|
||||
$log.warn('Showing err popup:' + msg);
|
||||
|
|
@ -1140,7 +1140,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
$rootScope.$on('Local/ClearHistory', function(event) {
|
||||
$log.debug('The wallet transaction history has been deleted');
|
||||
self.txHistory = self.completeHistory = [];
|
||||
self.updateHistory();
|
||||
self.debounceUpdateHistory();
|
||||
});
|
||||
|
||||
$rootScope.$on('Local/AddressbookUpdated', function(event, ab) {
|
||||
|
|
@ -1232,7 +1232,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
self.updateAll({
|
||||
quiet: true
|
||||
});
|
||||
self.updateTxHistory();
|
||||
self.debounceUpdateHistory();
|
||||
}, 4000, {
|
||||
leading: false,
|
||||
trailing: true
|
||||
|
|
@ -1301,7 +1301,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
if (self.network == 'testnet') {
|
||||
self.throttledUpdateHistory();
|
||||
} else {
|
||||
self.updateTxHistory();
|
||||
self.debounceUpdateHistory();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -1362,7 +1362,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
$rootScope.$on('Local/NewFocusedWallet', function() {
|
||||
self.setUxLanguage();
|
||||
self.setFocusedWallet();
|
||||
self.updateTxHistory();
|
||||
self.debounceUpdateHistory();
|
||||
self.isDisclaimerAccepted();
|
||||
storageService.getCleanAndScanAddresses(function(err, walletId) {
|
||||
if (walletId && profileService.walletClients[walletId]) {
|
||||
|
|
|
|||
|
|
@ -911,7 +911,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
}, 1);
|
||||
}
|
||||
} else go.walletHome();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue