fix cryptoimage

This commit is contained in:
Kukks
2019-05-31 08:00:32 +02:00
parent dcaf0463a7
commit 0f58f6da36
3 changed files with 4 additions and 4 deletions

View File

@@ -269,6 +269,7 @@ namespace BTCPayServer.Controllers
(1m + (changelly.AmountMarkupPercentage / 100m)))
: (decimal?)null;
var paymentMethodHandler = invoice.PaymentMethodHandlerDictionary[paymentMethodId];
var model = new PaymentModel()
{
CryptoCode = network.CryptoCode,
@@ -279,6 +280,7 @@ namespace BTCPayServer.Controllers
HtmlTitle = storeBlob.HtmlTitle ?? "BTCPay Invoice",
CustomCSSLink = storeBlob.CustomCSS?.AbsoluteUri,
CustomLogoLink = storeBlob.CustomLogo?.AbsoluteUri,
CryptoImage = Request.GetRelativePathOrAbsolute(paymentMethodHandler.GetCryptoImage(paymentMethodId)),
LightningAmountInSatoshi = storeBlob.LightningAmountInSatoshi,
BtcAddress = paymentMethodDetails.GetPaymentDestination(),
BtcDue = accounting.Due.ToString(),
@@ -324,7 +326,7 @@ namespace BTCPayServer.Controllers
PaymentMethodName = availableCryptoHandler.GetPaymentMethodName(availableCryptoPaymentMethodId),
IsLightning =
kv.GetId().PaymentType == PaymentTypes.LightningLike,
CryptoImage = "/" + availableCryptoHandler.GetCryptoImage(availableCryptoPaymentMethodId),
CryptoImage = Request.GetRelativePathOrAbsolute(availableCryptoHandler.GetCryptoImage(availableCryptoPaymentMethodId)),
Link = Url.Action(nameof(Checkout),
new
{
@@ -337,7 +339,7 @@ namespace BTCPayServer.Controllers
.ToList()
};
invoice.PaymentMethodHandlerDictionary[paymentMethod.GetId()].PreparePaymentModel(model, dto);
paymentMethodHandler.PreparePaymentModel(model, dto);
model.PaymentMethodId = paymentMethodId.ToString();
var expiration = TimeSpan.FromSeconds(model.ExpirationSeconds);
model.TimeLeft = expiration.PrettyPrint();