From 77338c605457c57a1dc5dde922c367e291750c8c Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Thu, 2 May 2019 14:49:33 +0530 Subject: [PATCH 1/2] [BUG FIX]: Coinswitch exchange with altcoins popup not showing bug fix --- BTCPayServer/wwwroot/checkout/coinswitch.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/wwwroot/checkout/coinswitch.html b/BTCPayServer/wwwroot/checkout/coinswitch.html index 899405a48..448e4007c 100644 --- a/BTCPayServer/wwwroot/checkout/coinswitch.html +++ b/BTCPayServer/wwwroot/checkout/coinswitch.html @@ -39,7 +39,10 @@ to_amount: parseFloat(toCurrencyDue), state: orderId }; - waitForCoinSwitch(); + + payment.on('Exchange:Ready', function(){ + waitForCoinSwitch(); + }) function waitForCoinSwitch() { if (typeof payment.open !== "function") { From 4fa6c9dc3d3d5a4785685dc35ff29e864848065f Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Thu, 13 Jun 2019 12:14:28 +0530 Subject: [PATCH 2/2] coinswitchAmountDue always returning 1.025 possible fix --- BTCPayServer/Views/Invoice/Checkout.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer/Views/Invoice/Checkout.cshtml b/BTCPayServer/Views/Invoice/Checkout.cshtml index f35d6837a..17964e9a2 100644 --- a/BTCPayServer/Views/Invoice/Checkout.cshtml +++ b/BTCPayServer/Views/Invoice/Checkout.cshtml @@ -182,7 +182,7 @@ computed: { coinswitchAmountDue: function() { return this.srvModel.coinSwitchAmountMarkupPercentage - ? (1 + (this.srvModel.coinSwitchAmountMarkupPercentage / 100)) + ? this.srvModel.btcDue * (1 + (this.srvModel.coinSwitchAmountMarkupPercentage / 100)) : this.srvModel.btcDue; } }