From c0e28ce66eef2b7badb103836c701f544dc35ebd Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sun, 10 Mar 2019 00:28:47 +0900 Subject: [PATCH] Revert "Remove error in console logs on checkout page" This reverts commit 08dd94e267c4810837b2fccd33b9001a3e406b30. --- BTCPayServer/Views/Invoice/Checkout.cshtml | 2 +- BTCPayServer/wwwroot/checkout/js/core.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/BTCPayServer/Views/Invoice/Checkout.cshtml b/BTCPayServer/Views/Invoice/Checkout.cshtml index 96d4d3937..a53573f36 100644 --- a/BTCPayServer/Views/Invoice/Checkout.cshtml +++ b/BTCPayServer/Views/Invoice/Checkout.cshtml @@ -173,7 +173,7 @@ data: { srvModel: srvModel, lndModel: null, - scanDisplayQr: srvModel.invoiceBitcoinUrlQR, + scanDisplayQr: "", expiringSoon: false, isModal: srvModel.isModal, selectedThirdPartyProcessor: "" diff --git a/BTCPayServer/wwwroot/checkout/js/core.js b/BTCPayServer/wwwroot/checkout/js/core.js index 91af7febe..4c8b9e30d 100644 --- a/BTCPayServer/wwwroot/checkout/js/core.js +++ b/BTCPayServer/wwwroot/checkout/js/core.js @@ -24,7 +24,7 @@ function changeCurrency(currency) { if (currency !== null && srvModel.paymentMethodId !== currency) { $(".payment__currencies").hide(); $(".payment__spinner").show(); - checkoutCtrl.scanDisplayQr = "."; + checkoutCtrl.scanDisplayQr = ""; srvModel.paymentMethodId = currency; fetchStatus(); } @@ -68,7 +68,8 @@ function onDataCallback(jsonData) { } // restoring qr code view only when currency is switched - if (jsonData.paymentMethodId === srvModel.paymentMethodId) { + if (jsonData.paymentMethodId === srvModel.paymentMethodId && + checkoutCtrl.scanDisplayQr === "") { checkoutCtrl.scanDisplayQr = jsonData.invoiceBitcoinUrlQR; }