Fix a bunch of minor bugs (#4983)

This commit is contained in:
Nicolas Dorier
2023-05-19 08:41:21 +09:00
committed by GitHub
parent acf003b1b4
commit 3d57b944ca
9 changed files with 12 additions and 23 deletions

View File

@@ -133,7 +133,7 @@ namespace BTCPayServer.Controllers.Greenfield
"A valid node info was not provided to open a channel with");
}
if (request.ChannelAmount == null)
if (request?.ChannelAmount is null)
{
ModelState.AddModelError(nameof(request.ChannelAmount), "ChannelAmount is missing");
}
@@ -142,7 +142,7 @@ namespace BTCPayServer.Controllers.Greenfield
ModelState.AddModelError(nameof(request.ChannelAmount), "ChannelAmount must be more than 0");
}
if (request.FeeRate == null)
if (request?.FeeRate is null)
{
ModelState.AddModelError(nameof(request.FeeRate), "FeeRate is missing");
}