Fixing sats exchange rate display

Fixed #1147
This commit is contained in:
Matt Pazar
2019-12-04 14:21:33 -06:00
parent 84d943d6cc
commit eb85b1a7b4
4 changed files with 6 additions and 3 deletions

View File

@@ -294,6 +294,10 @@ namespace BTCPayServer.Controllers
};
paymentMethodHandler.PreparePaymentModel(model, dto, storeBlob);
if (model.IsLightning && storeBlob.LightningAmountInSatoshi && model.CryptoCode == "Sats")
{
model.Rate = _CurrencyNameTable.DisplayFormatCurrency(paymentMethod.Rate / 100_000_000, paymentMethod.ParentEntity.ProductInformation.Currency);
}
model.UISettings = paymentMethodHandler.GetCheckoutUISettings();
model.PaymentMethodId = paymentMethodId.ToString();
var expiration = TimeSpan.FromSeconds(model.ExpirationSeconds);