fix: amount
This commit is contained in:
@ -57,8 +57,8 @@ public class ReactionQueueWorker : BackgroundService
|
||||
}
|
||||
|
||||
var amount = MapKindToAmount(ev.Kind);
|
||||
if (amount != default)
|
||||
{
|
||||
if (amount == default) continue;
|
||||
|
||||
_logger.LogInformation("Got reaction {json}", NostrJson.Serialize(ev));
|
||||
var eTag = ev.Tags?.FirstOrDefault(a => a.TagIdentifier == "e");
|
||||
var pTag = ev.Tags?.FirstOrDefault(a => a.TagIdentifier == "p" && a.AdditionalData[0] == target);
|
||||
@ -145,14 +145,14 @@ public class ReactionQueueWorker : BackgroundService
|
||||
new NostrEventTag("e", ev.Id!),
|
||||
new NostrEventTag("p", sender),
|
||||
new NostrEventTag("relays", "wss://relay.snort.social", "wss://nos.lol", "wss://relay.damus.io"),
|
||||
new NostrEventTag("amount", (amount * 1000).ToString()!)
|
||||
new NostrEventTag("amount", (amount.Value * 1000).ToString())
|
||||
)
|
||||
};
|
||||
|
||||
var zapSigned = zap.Sign(key);
|
||||
try
|
||||
{
|
||||
var invoice = await _lnurl.GetInvoiceAsync(svc, 5, "Thanks for your interaction!", zapSigned);
|
||||
var invoice = await _lnurl.GetInvoiceAsync(svc, amount.Value, "Thanks for your interaction!", zapSigned);
|
||||
if (string.IsNullOrEmpty(invoice.Pr))
|
||||
{
|
||||
_logger.LogInformation("blocked: failed to get invoice from {target}", parsedTarget);
|
||||
@ -175,7 +175,6 @@ public class ReactionQueueWorker : BackgroundService
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private int? MapKindToAmount(NostrKind k)
|
||||
|
Reference in New Issue
Block a user