Merge pull request #5725 from cmgustavo/feat/new-fee-level

New fee level
This commit is contained in:
Matias Alejo Garcia 2017-03-14 13:50:35 -03:00 committed by GitHub
commit 36b2d28048
2 changed files with 6 additions and 0 deletions

View file

@ -43,6 +43,11 @@ angular.module('copayApp.controllers').controller('preferencesFeeController', fu
var feeLevelValue = lodash.find($scope.feeLevels['livenet'], {
level: $scope.currentFeeLevel
});
if (lodash.isEmpty(feeLevelValue)) {
$scope.feePerKBUnit = null;
$scope.avgConfirmationTime = null;
return;
}
$scope.feePerKBUnit = feeLevelValue.feePerKBUnit;
$scope.avgConfirmationTime = feeLevelValue.nbBlocks * 10;
};

View file

@ -5,6 +5,7 @@ angular.module('copayApp.services').factory('feeService', function($log, $stateP
// Constant fee options to translate
root.feeOpts = {
urgent: gettext('Urgent'),
priority: gettext('Priority'),
normal: gettext('Normal'),
economy: gettext('Economy'),