fix refresh/fee

This commit is contained in:
Matias Alejo Garcia 2017-06-23 10:24:14 -03:00
parent 20812dd508
commit 5bcc0b072d
No known key found for this signature in database
GPG Key ID: 02470DB551277AB3
3 changed files with 6 additions and 6 deletions

View File

@ -567,16 +567,16 @@ angular.module('copayApp.controllers').controller('confirmController', function(
}; };
scope.hideModal = function(customFeeLevel) { scope.hideModal = function(customFeeLevel) {
scope.chooseFeeLevelModal.hide();
$log.debug('Custom fee level choosen:' + customFeeLevel + ' was:' + tx.feeLevel); $log.debug('Custom fee level choosen:' + customFeeLevel + ' was:' + tx.feeLevel);
if (tx.feeLevel == customFeeLevel) if (tx.feeLevel == customFeeLevel)
scope.chooseFeeLevelModal.hide(); return;
tx.feeLevel = customFeeLevel; tx.feeLevel = customFeeLevel;
updateTx(tx, wallet, { updateTx(tx, wallet, {
clearCache: true, clearCache: true,
dryRun: true, dryRun: true,
}, function() { }, function() {
scope.chooseFeeLevelModal.hide();
}); });
}; };
}; };

View File

@ -46,7 +46,9 @@ angular.module('copayApp.controllers').controller('preferencesFeeController', fu
} }
$scope.feeLevels = levels; $scope.feeLevels = levels;
updateCurrentValues(); updateCurrentValues();
$scope.$apply(); $timeout(function() {
$scope.$apply();
});
}); });
}; };

View File

@ -56,9 +56,7 @@ angular.module('copayApp.services').factory('feeService', function($log, $timeou
root.getFeeLevels = function(cb) { root.getFeeLevels = function(cb) {
if (cache.updateTs > Date.now() - CACHE_TIME_TS * 1000) { if (cache.updateTs > Date.now() - CACHE_TIME_TS * 1000) {
$timeout(function() { return cb(null, cache.data, true);
return cb(null, cache.data, true);
}, 1);
} }
var walletClient = bwcService.getClient(); var walletClient = bwcService.getClient();