Skip to content

Commit

Permalink
Better tags
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaSat committed Jul 16, 2024
1 parent 0df3690 commit db49deb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions api/nostr.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def generate_tags(self, order):
["expiration", order.expires_at.timestamp()],
["y", "robosats", config("COORDINATOR_ALIAS", cast=str)],
["n", order.network],
["layer", "lightning"],
["layer", self.get_layer_tag(order)],
["g", pygeohash.encode(order.latitude, order.longitude)],
["bond", order.bond],
["z", "order"],
Expand All @@ -63,4 +63,10 @@ def get_status_tag(self, order):
if order.status == Order.Status.PUB:
return "pending"
else:
return "canceled"
return "success"

def get_layer_tag(self, order):
if order.type == Order.Types.SELL:
return ["lightning"]
else:
return ["onchain", "lightning"]

0 comments on commit db49deb

Please sign in to comment.