Skip to content

Commit

Permalink
Fix integer tag
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaSat committed Aug 7, 2024
1 parent 1c7b2a8 commit cad1a86
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/nostr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import uuid

from asgiref.sync import sync_to_async
from nostr_sdk import Keys, Client, EventBuilder, NostrSigner, Kind, Tag
from nostr_sdk import Keys, Client, EventBuilder, NostrSigner, Kind, Tag, Timestamp
from api.models import Order
from decouple import config

Expand All @@ -30,12 +30,13 @@ async def send_order_event(self, order):

robot_name = await self.get_robot_name(order)
currency = await self.get_robot_currency(order)
created_at = Timestamp.from_secs(int(order.created_at.timestamp()))

event = (
EventBuilder(
Kind(38383), "", self.generate_tags(order, robot_name, currency)
)
.custom_created_at(int(order.created_at.timestamp()))
.custom_created_at(created_at)
.to_event(keys)
)
output = await client.send_event(event)
Expand Down

0 comments on commit cad1a86

Please sign in to comment.