mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 12:11:35 +00:00
Better tags
This commit is contained in:
parent
a6c2130846
commit
c597cc8129
10
api/nostr.py
10
api/nostr.py
@ -53,7 +53,7 @@ class Nostr:
|
||||
["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"],
|
||||
@ -63,4 +63,10 @@ class Nostr:
|
||||
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 ["onchain", "lightning"]
|
||||
else:
|
||||
return ["lightning"]
|
||||
|
Loading…
Reference in New Issue
Block a user