fix: network match

This commit is contained in:
2024-07-19 17:53:43 +01:00
parent 3d11a462ae
commit 3e99c53fb3

View File

@ -87,7 +87,7 @@ public class UserService
if (user == default) throw new Exception("No user found"); if (user == default) throw new Exception("No user found");
var maxOut = await MaxWithdrawalAmount(pubkey); var maxOut = await MaxWithdrawalAmount(pubkey);
var pr = BOLT11PaymentRequest.Parse(invoice, invoice.StartsWith("lnbc1") ? Network.Main : Network.RegTest); var pr = BOLT11PaymentRequest.Parse(invoice, invoice.StartsWith("lnbc") ? Network.Main : Network.RegTest);
if (pr.MinimumAmount == 0) if (pr.MinimumAmount == 0)
{ {
throw new Exception("0 amount invoice not supported"); throw new Exception("0 amount invoice not supported");