Zap fix
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Nostr.Client.Client;
|
using Nostr.Client.Client;
|
||||||
|
using Nostr.Client.Json;
|
||||||
using Nostr.Client.Messages;
|
using Nostr.Client.Messages;
|
||||||
using Nostr.Client.Requests;
|
using Nostr.Client.Requests;
|
||||||
|
|
||||||
@ -24,7 +25,7 @@ public class ZapService
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(zapRequest)) return;
|
if (string.IsNullOrEmpty(zapRequest)) return;
|
||||||
|
|
||||||
var zapNote = JsonConvert.DeserializeObject<NostrEvent>(zapRequest);
|
var zapNote = JsonConvert.DeserializeObject<NostrEvent>(zapRequest, NostrSerializer.Settings);
|
||||||
if (zapNote == default)
|
if (zapNote == default)
|
||||||
{
|
{
|
||||||
_logger.LogWarning("Could not parse zap note {note}", zapRequest);
|
_logger.LogWarning("Could not parse zap note {note}", zapRequest);
|
||||||
@ -48,7 +49,7 @@ public class ZapService
|
|||||||
|
|
||||||
var zapReceiptSigned = zapReceipt.Sign(key);
|
var zapReceiptSigned = zapReceipt.Sign(key);
|
||||||
|
|
||||||
var jsonZap = JsonConvert.SerializeObject(zapReceiptSigned);
|
var jsonZap = JsonConvert.SerializeObject(zapReceiptSigned, NostrSerializer.Settings);
|
||||||
_logger.LogInformation("Created tip receipt {json}", jsonZap);
|
_logger.LogInformation("Created tip receipt {json}", jsonZap);
|
||||||
_nostrClient.Send(new NostrEventRequest(zapReceiptSigned));
|
_nostrClient.Send(new NostrEventRequest(zapReceiptSigned));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user