add low amount in txhistory/details and balance

This commit is contained in:
Matias Alejo Garcia 2017-06-22 13:44:49 -03:00
commit b83c0590dc
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
6 changed files with 104 additions and 52 deletions

View file

@ -47,6 +47,19 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
$scope.txps = lodash.sortBy(txps, 'createdOn').reverse();
};
var analyzeUtxosDone;
var analyzeUtxos = function() {
if (analyzeUtxosDone) return;
feeService.getFeeLevels(function(err, levels){
walletService.getLowUtxos($scope.wallet, levels, function(err, resp){
analyzeUtxosDone = true;
$scope.lowUtxosWarning = resp.warning;
});
});
};
var updateStatus = function(force) {
$scope.updatingStatus = true;
$scope.updateStatusError = null;
@ -72,6 +85,8 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
$scope.$apply();
});
analyzeUtxos();
});
};
@ -154,10 +169,10 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
});
};
feeService.getLowAmount($scope.wallet, function(err, lowAmount){
feeService.getFeeLevels(function(err, levels){
walletService.getTxHistory($scope.wallet, {
progressFn: progressFn,
lowAmount: lowAmount,
feeLevels: levels,
}, function(err, txHistory) {
$scope.updatingTxHistory = false;
if (err) {