From 817522ff979d777bc86ebf6b9f9755d0585585ae Mon Sep 17 00:00:00 2001 From: jackstar12 <62219658+jackstar12@users.noreply.github.com> Date: Fri, 18 Oct 2024 07:05:00 +0200 Subject: [PATCH] refactor(checkout): displayed payment methods vue component (#6316) The displayed payment methods can change with updates aswell, so it should be rendered as a vue component instead --- BTCPayServer/Views/UIInvoice/Checkout.cshtml | 32 +++++++++----------- BTCPayServer/wwwroot/checkout/checkout.js | 3 ++ 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/BTCPayServer/Views/UIInvoice/Checkout.cshtml b/BTCPayServer/Views/UIInvoice/Checkout.cshtml index 81eb6adf9..c1482c1ec 100644 --- a/BTCPayServer/Views/UIInvoice/Checkout.cshtml +++ b/BTCPayServer/Views/UIInvoice/Checkout.cshtml @@ -12,7 +12,7 @@ ViewData["StoreBranding"] = Model.StoreBranding; Csp.UnsafeEval(); var hasPaymentPlugins = UiExtensions.Any(extension => extension.Location == "checkout-payment-method"); - var displayedPaymentMethods = Model.AvailablePaymentMethods.Where(c => c.Displayed).ToList(); + var checkoutLink = Url.Action("Checkout", new { invoiceId = Model.InvoiceId }); } @functions { private string ToJsValue(object value) @@ -90,24 +90,20 @@ :show-recommended-fee="showRecommendedFee" class="pb-4" /> - @if (displayedPaymentMethods.Count > 1 || hasPaymentPlugins) - { -