From b02cfa9d41fff404290aea180d026c31584b51b2 Mon Sep 17 00:00:00 2001 From: Kukks Date: Fri, 17 Apr 2020 15:24:27 +0200 Subject: [PATCH] fix subtract fees auto tick when clicking on balance --- BTCPayServer/wwwroot/js/wallet/WalletSend.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/wwwroot/js/wallet/WalletSend.js b/BTCPayServer/wwwroot/js/wallet/WalletSend.js index c939e63e7..e5feea2f0 100644 --- a/BTCPayServer/wwwroot/js/wallet/WalletSend.js +++ b/BTCPayServer/wwwroot/js/wallet/WalletSend.js @@ -38,7 +38,10 @@ $(function () { var parentContainer = $(this).parents(".form-group"); var outputAmountElement = parentContainer.find(".output-amount"); outputAmountElement.val(val); - parentContainer.find(".subtract-fees").prop('checked', true); + var subtractFeesEl = parentContainer.find(".subtract-fees"); + if(subtractFeesEl.length === 0) + subtractFeesEl = $(".subtract-fees"); + subtractFeesEl.prop('checked', true); updateFiatValue(outputAmountElement); return false; });