mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #230 from cmgustavo/ref/design-64
Fix walletDetails getHistory
This commit is contained in:
commit
7fb2113c86
|
@ -111,7 +111,7 @@
|
|||
No transactions yet
|
||||
</div>
|
||||
|
||||
<div ng-show="updatingTxHistory" class="updatingHistory">
|
||||
<div ng-show="updatingTxHistory && updatingTxHistoryProgress>5" class="updatingHistory">
|
||||
<div class="row" >
|
||||
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
|
||||
</div>
|
||||
|
|
|
@ -118,10 +118,13 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
$scope.updateTxHistoryError = false;
|
||||
$scope.updatingTxHistoryProgress = 0;
|
||||
|
||||
var progressFn = function(txs) {
|
||||
$scope.updatingTxHistoryProgress = txs ? txs.length : 0;
|
||||
var progressFn = function(txs, newTxs) {
|
||||
$scope.updatingTxHistoryProgress = newTxs;
|
||||
$scope.completeTxHistory = txs;
|
||||
$scope.showHistory();
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
});
|
||||
};
|
||||
|
||||
$timeout(function() {
|
||||
|
|
|
@ -422,7 +422,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
|||
var endingTs = confirmedTxs[0] ? confirmedTxs[0].time : null;
|
||||
|
||||
// First update
|
||||
progressFn(txsFromLocal);
|
||||
progressFn(txsFromLocal, 0);
|
||||
wallet.completeHistory = txsFromLocal;
|
||||
|
||||
function getNewTxs(newTxs, skip, cb) {
|
||||
|
@ -431,7 +431,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
|||
|
||||
newTxs = newTxs.concat(processNewTxs(wallet, lodash.compact(res)));
|
||||
|
||||
progressFn(newTxs.concat(txsFromLocal));
|
||||
progressFn(newTxs.concat(txsFromLocal), newTxs.length);
|
||||
|
||||
skip = skip + requestLimit;
|
||||
|
||||
|
|
Loading…
Reference in New Issue