wallet transactions now refresh every 10 seconds and don't cache
This commit is contained in:
parent
5fc682fea1
commit
ca7c25d01e
3 changed files with 10 additions and 5 deletions
|
|
@ -71,6 +71,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
force: !!force,
|
||||
}, function(err, status) {
|
||||
$scope.updatingStatus = false;
|
||||
var statusChanged = false;
|
||||
if (err) {
|
||||
if (err === 'WALLET_NOT_REGISTERED') {
|
||||
$scope.walletNotRegistered = true;
|
||||
|
|
@ -80,8 +81,12 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
$scope.status = null;
|
||||
} else {
|
||||
setPendingTxps(status.pendingTxps);
|
||||
$scope.status = status;
|
||||
if (!$scope.status || status.balance.totalConfirmedAmount != $scope.status.balance.totalConfirmedAmount) {
|
||||
$scope.status = status;
|
||||
statusChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
refreshAmountSection();
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
|
|
@ -190,7 +195,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
t.alternativeAmountStr = r.toFixed(2) + ' ' + fiatCode;
|
||||
});
|
||||
|
||||
$scope.completeTxHistory = txHistory;
|
||||
$scope.completeTxHistory = txHistory;
|
||||
|
||||
$scope.showHistory();
|
||||
$timeout(function() {
|
||||
|
|
@ -404,7 +409,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
$scope.$on("$ionicView.afterEnter", function(event, data) {
|
||||
$scope.updateAll();
|
||||
refreshAmountSection();
|
||||
refreshInterval = $interval($scope.onRefresh, 6 * 60 * 1000);
|
||||
refreshInterval = $interval($scope.onRefresh, 10 * 1000);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.afterLeave", function(event, data) {
|
||||
|
|
|
|||
|
|
@ -668,7 +668,8 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
|||
return wallet.completeHistory && wallet.completeHistory.isValid;
|
||||
};
|
||||
|
||||
if (isHistoryCached() && !opts.force) return cb(null, wallet.completeHistory);
|
||||
// disable caching
|
||||
//if (isHistoryCached() && !opts.force) return cb(null, wallet.completeHistory);
|
||||
|
||||
$log.debug('Updating Transaction History');
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
ng-click='updateAll(true)'
|
||||
ng-show="!updateStatusError && !wallet.balanceHidden && !wallet.scanning"
|
||||
on-hold="hideToggle()"
|
||||
ng-style="{'transform': amountScale}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue