mirror of https://github.com/BTCPrivate/copay.git
avoid negative fee
This commit is contained in:
parent
af4c45f811
commit
7b802b7f9a
|
@ -80,8 +80,9 @@ angular.module('copayApp.controllers').controller('preferencesFeeController', fu
|
||||||
var showCustomFeePrompt = function() {
|
var showCustomFeePrompt = function() {
|
||||||
$scope.invalidCustomFeeEntered = true;
|
$scope.invalidCustomFeeEntered = true;
|
||||||
$scope.showMaxWarning = false;
|
$scope.showMaxWarning = false;
|
||||||
|
$scope.showMinWarning = false;
|
||||||
popupService.showPrompt(gettextCatalog.getString('Custom Fee'), gettextCatalog.getString('Set your own fee in satoshis/byte'), null, function(text) {
|
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.feePerSatByte = parseInt(text);
|
||||||
$scope.customFeePerKB = ($scope.feePerSatByte * 1000).toFixed();
|
$scope.customFeePerKB = ($scope.feePerSatByte * 1000).toFixed();
|
||||||
setMaxWarning();
|
setMaxWarning();
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="comment" ng-if="showMinWarning">
|
<div class="comment" ng-if="showMinWarning">
|
||||||
<i class="icon"><img src="img/icon-warning.png"></i>
|
<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>
|
||||||
<div class="comment" ng-if="showMaxWarning">
|
<div class="comment" ng-if="showMaxWarning">
|
||||||
<i class="icon"><img src="img/icon-warning.png"></i>
|
<i class="icon"><img src="img/icon-warning.png"></i>
|
||||||
|
|
Loading…
Reference in New Issue