diff --git a/BTCPayServer/Views/Invoice/Checkout-Body.cshtml b/BTCPayServer/Views/Invoice/Checkout-Body.cshtml index 235e64823..7b035e8e9 100644 --- a/BTCPayServer/Views/Invoice/Checkout-Body.cshtml +++ b/BTCPayServer/Views/Invoice/Checkout-Body.cshtml @@ -303,7 +303,7 @@ :mode="srvModel.coinSwitchMode" :merchant-id="srvModel.coinSwitchMerchantId" :to-currency="srvModel.paymentMethodId" - :to-currency-due="srvModel.coinSwitchAmountMarkupPercentage? (1 + (srvModel.coinSwitchAmountMarkupPercentage / 100) :srvModel.btcDue" + :to-currency-due="coinswitchAmountDue" :autoload="selectedThirdPartyProcessor === 'coinswitch'" :to-currency-address="srvModel.btcAddress">
diff --git a/BTCPayServer/Views/Invoice/Checkout.cshtml b/BTCPayServer/Views/Invoice/Checkout.cshtml index 1ef1edca6..f35d6837a 100644 --- a/BTCPayServer/Views/Invoice/Checkout.cshtml +++ b/BTCPayServer/Views/Invoice/Checkout.cshtml @@ -178,6 +178,13 @@ isModal: srvModel.isModal, lightningAmountInSatoshi: srvModel.lightningAmountInSatoshi, selectedThirdPartyProcessor: "" + }, + computed: { + coinswitchAmountDue: function() { + return this.srvModel.coinSwitchAmountMarkupPercentage + ? (1 + (this.srvModel.coinSwitchAmountMarkupPercentage / 100)) + : this.srvModel.btcDue; + } } });