From 3fdfd0adfd1588924f6367b5220b16fce4475ce3 Mon Sep 17 00:00:00 2001 From: rockstardev Date: Sun, 3 Mar 2019 16:51:19 -0600 Subject: [PATCH] Removed exponentiation on invoice request amount Fixes #620 --- .../PaymentRequestViewModels/ListPaymentRequestsViewModel.cs | 1 + BTCPayServer/PaymentRequest/PaymentRequestService.cs | 1 + BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/Models/PaymentRequestViewModels/ListPaymentRequestsViewModel.cs b/BTCPayServer/Models/PaymentRequestViewModels/ListPaymentRequestsViewModel.cs index e825d9bbc..919bd5b2c 100644 --- a/BTCPayServer/Models/PaymentRequestViewModels/ListPaymentRequestsViewModel.cs +++ b/BTCPayServer/Models/PaymentRequestViewModels/ListPaymentRequestsViewModel.cs @@ -140,6 +140,7 @@ namespace BTCPayServer.Models.PaymentRequestViewModels public string Id { get; set; } public DateTime ExpiryDate { get; set; } public decimal Amount { get; set; } + public string AmountFormatted { get; set; } public string Status { get; set; } public List Payments { get; set; } diff --git a/BTCPayServer/PaymentRequest/PaymentRequestService.cs b/BTCPayServer/PaymentRequest/PaymentRequestService.cs index e769298dc..0dc956a73 100644 --- a/BTCPayServer/PaymentRequest/PaymentRequestService.cs +++ b/BTCPayServer/PaymentRequest/PaymentRequestService.cs @@ -100,6 +100,7 @@ namespace BTCPayServer.PaymentRequest { Id = entity.Id, Amount = entity.ProductInformation.Price, + AmountFormatted = _currencies.FormatCurrency(entity.ProductInformation.Price, blob.Currency), Currency = entity.ProductInformation.Currency, ExpiryDate = entity.ExpirationTime.DateTime, Status = entity.GetInvoiceState().ToString(), diff --git a/BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml b/BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml index 42c667e70..48355d305 100644 --- a/BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml +++ b/BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml @@ -107,7 +107,7 @@ else