This commit is contained in:
Gustavo Maximiliano Cortez 2017-07-18 11:45:30 -03:00
commit f413857a97
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
4 changed files with 48 additions and 20 deletions

View file

@ -570,7 +570,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
if (usingCustomFee) {
scope.customFeePerKB = tx.feeRate;
scope.feePerSatByte = (tx.feeRate / 1000).toFixed();
scope.feePerSatByte = tx.feeRate / 1000;
}
$ionicModal.fromTemplateUrl('views/modals/chooseFeeLevel.html', {

View file

@ -35,10 +35,13 @@ angular.module('copayApp.controllers').controller('feeLevelsController', functio
};
$scope.checkFees = function(feePerSatByte) {
if (parseInt(feePerSatByte) < $scope.minFeeRecommended) $scope.showMinWarning = true;
if (Number(feePerSatByte) == 0) $scope.showError = true;
else $scope.showError = false;
if (Number(feePerSatByte) < $scope.minFeeRecommended) $scope.showMinWarning = true;
else $scope.showMinWarning = false;
if (parseInt(feePerSatByte) > $scope.maxFeeRecommended) $scope.showMaxWarning = true;
if (Number(feePerSatByte) > $scope.maxFeeRecommended) $scope.showMaxWarning = true;
else $scope.showMaxWarning = false;
};
@ -54,7 +57,7 @@ angular.module('copayApp.controllers').controller('feeLevelsController', functio
$scope.avgConfirmationTime = value.nbBlocks * 10;
} else {
$scope.avgConfirmationTime = null;
$scope.customSatPerByte = { value: parseInt($scope.feePerSatByte) };
$scope.customSatPerByte = { value: Number($scope.feePerSatByte) };
$scope.customFeePerKB = ($scope.feePerSatByte * 1000).toFixed();
}