mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
POS: Fix exception when asking for data with a top up item (#5816)
Fixes #5811.
This commit is contained in:
@@ -292,13 +292,13 @@ namespace BTCPayServer.Plugins.PointOfSale.Controllers
|
||||
}
|
||||
|
||||
var amtField = form.GetFieldByFullName($"{FormDataService.InvoiceParameterPrefix}amount");
|
||||
if (amtField is null && price.HasValue)
|
||||
if (amtField is null)
|
||||
{
|
||||
form.Fields.Add(new Field
|
||||
{
|
||||
Name = $"{FormDataService.InvoiceParameterPrefix}amount",
|
||||
Type = "hidden",
|
||||
Value = price.ToString(),
|
||||
Value = price?.ToString(),
|
||||
Constant = true
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user