change unit/kB for sat/Byte in fee rate

This commit is contained in:
Gabriel Bazán 2017-05-17 16:37:49 -03:00
commit f681122fd6
3 changed files with 5 additions and 10 deletions

View file

@ -53,11 +53,11 @@ angular.module('copayApp.controllers').controller('preferencesFeeController', fu
level: $scope.currentFeeLevel
});
if (lodash.isEmpty(feeLevelValue)) {
$scope.feePerKBUnit = null;
$scope.feePerSatByte = null;
$scope.avgConfirmationTime = null;
return;
}
$scope.feePerKBUnit = feeLevelValue.feePerKBUnit;
$scope.feePerSatByte = (feeLevelValue.feePerKB / 1000).toFixed();
$scope.avgConfirmationTime = feeLevelValue.nbBlocks * 10;
};
});

View file

@ -50,12 +50,7 @@ angular.module('copayApp.services').factory('feeService', function($log, $stateP
walletClient.getFeeLevels('testnet', function(errTestnet, levelsTestnet) {
if (errLivenet || errTestnet) {
return cb(gettextCatalog.getString('Could not get dynamic fee'));
} else {
lodash.each(lodash.union(levelsLivenet, levelsTestnet), function(level) {
level.feePerKBUnit = txFormatService.formatAmount(level.feePerKB) + ' ' + unitName;
});
}
return cb(null, {
'livenet': levelsLivenet,
'testnet': levelsTestnet