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 032a48a commit 1c7b2a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/nostr.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def send_order_event(self, order):
EventBuilder(
Kind(38383), "", self.generate_tags(order, robot_name, currency)
)
.custom_created_at(order.created_at.timestamp())
.custom_created_at(int(order.created_at.timestamp()))
.to_event(keys)
)
output = await client.send_event(event)
Expand Down Expand Up @@ -70,14 +70,14 @@ def generate_tags(self, order, robot_name, currency):
f"http://{config("HOST_NAME")}/{config("COORDINATOR_ALIAS")}/order/{order.id}",
]
),
Tag.parse(["expiration", int(order.expires_at.timestamp())]),
Tag.parse(["expiration", str(int(order.expires_at.timestamp()))]),
Tag.parse(["y", "robosats", config("COORDINATOR_ALIAS", cast=str)]),
Tag.parse(["n", str(config("NETWORK"))]),
Tag.parse(["layer"] + self.get_layer_tag(order)),
Tag.parse(["bond", str(order.bond_size)]),
Tag.parse(["z", "order"]),
]
print(tags)

if order.latitude and order.longitude:
tags.extend(
[Tag.parse(["g", pygeohash.encode(order.latitude, order.longitude)])]
Expand Down

0 comments on commit 1c7b2a8

Please sign in to comment.