Removed exponentiation on invoice request amount

Fixes #620
This commit is contained in:
rockstardev 2019-03-03 16:51:19 -06:00 committed by Rockstar Developer
parent 358f1ffc43
commit 3fdfd0adfd
3 changed files with 3 additions and 1 deletions

View file

@ -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<PaymentRequestInvoicePayment> Payments { get; set; }

View file

@ -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(),

View file

@ -107,7 +107,7 @@ else
<template v-else v-for="invoice of srvModel.invoices" :key="invoice.id">
<tr class="bg-light">
<td scope="row">{{invoice.id}}</td>
<td>{{invoice.amount}} {{invoice.currency}}</td>
<td>{{invoice.amountFormatted}}</td>
<td>{{moment(invoice.expiryDate).format('L HH:mm')}}</td>
<td>{{invoice.status}}</td>
</tr>