avoid negative fee

This commit is contained in:
Gabriel Bazán 2017-07-10 14:07:01 -03:00
parent af4c45f811
commit 7b802b7f9a
2 changed files with 3 additions and 2 deletions

View File

@ -80,8 +80,9 @@ angular.module('copayApp.controllers').controller('preferencesFeeController', fu
var showCustomFeePrompt = function() {
$scope.invalidCustomFeeEntered = true;
$scope.showMaxWarning = false;
$scope.showMinWarning = false;
popupService.showPrompt(gettextCatalog.getString('Custom Fee'), gettextCatalog.getString('Set your own fee in satoshis/byte'), null, function(text) {
if (!text || !parseInt(text)) return;
if (!text || !parseInt(text) || parseInt(text) <= 0) return;
$scope.feePerSatByte = parseInt(text);
$scope.customFeePerKB = ($scope.feePerSatByte * 1000).toFixed();
setMaxWarning();

View File

@ -31,7 +31,7 @@
</div>
<div class="comment" ng-if="showMinWarning">
<i class="icon"><img src="img/icon-warning.png"></i>
<span class="text" translate>Your fee is lower than the minimum recommended ({{getMinimumRecommeded()}} satoshis/byte). Your transaction may never get confirmed.</span>
<span class="text" translate>Your fee is lower than the recommended super economy fee ({{getMinimumRecommeded()}} satoshis/byte). Your transaction may never get confirmed.</span>
</div>
<div class="comment" ng-if="showMaxWarning">
<i class="icon"><img src="img/icon-warning.png"></i>