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();
}

View file

@ -2,7 +2,7 @@
@extend .deflash-blue;
.selected-fee-level {
text-align: center;
background: #f2f2f2;
background: #f9f9f9;
font-size: 11px;
height: 120px;
padding-top: 25px;
@ -20,19 +20,39 @@
.rate .list {
margin-bottom: 0;
}
.unit {
color: #9c9c9c;
background: #f2f2f2;
position: absolute;
right: 0;
top: 0;
padding: 15px 10px 12px 10px;
.item-input {
input[type="number"] {
text-align: right;
padding-right: 90px;
}
.unit {
color: #9c9c9c;
background: #f2f2f2;
position: absolute;
right: 0;
top: 0;
padding: 15px 10px 12px 10px;
}
}
}
.warning-fee {
padding: 5px 10px;
color: $v-warning-color;
font-size: 12px;
text-align: left;
text-align: center;
i {
margin-right: 8px;
}
}
.error-fee {
padding: 5px 10px;
color: $v-error-color;
font-size: 12px;
text-align: center;
i {
margin-right: 8px;
}
}
.box-notification {
margin: 0;