Disable withdraw
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-02-13 15:06:09 +00:00
parent 269e3353f3
commit 1799a90341

View File

@ -86,6 +86,8 @@ public class UserService
var user = await GetUser(pubkey);
if (user == default) throw new Exception("No user found");
if (!user.IsAdmin) throw new Exception("Withdrawal disabled");
var maxOut = await MaxWithdrawalAmount(pubkey);
var pr = BOLT11PaymentRequest.Parse(invoice, invoice.StartsWith("lnbc") ? Network.Main : Network.RegTest);
if (pr.MinimumAmount == 0)
@ -263,4 +265,4 @@ public class UserService
.SetProperty(v => v.ContentWarning, req.ContentWarning)
.SetProperty(v => v.Goal, req.Goal));
}
}
}