From 1d18965a264f1fdec1bac3b711aeac54646e0b64 Mon Sep 17 00:00:00 2001 From: Kukks Date: Sat, 6 Apr 2019 08:10:27 +0200 Subject: [PATCH] fix coinswitch --- BTCPayServer/Views/Invoice/Checkout-Body.cshtml | 2 +- BTCPayServer/Views/Invoice/Checkout.cshtml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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; + } } });