Insert credit payments

This commit is contained in:
2023-08-31 14:20:01 +01:00
parent 201344b622
commit 31144cffa3
8 changed files with 389 additions and 6 deletions

View File

@ -57,7 +57,7 @@ public class LndInvoicesStream : BackgroundService
payment.IsPaid = true;
payment.User.Balance += (long)(payment.Amount * 1000L);
await db.SaveChangesAsync(stoppingToken);
if (!string.IsNullOrEmpty(payment.Nostr))
if (!string.IsNullOrEmpty(payment.Nostr) && !string.IsNullOrEmpty(payment.Invoice))
{
zapService.HandlePaid(payment.Invoice, payment.Nostr);
}