Merge pull request #46 from lnbits/fix_no_merchant_profile_update

fix: do not erase merchant profile
This commit is contained in:
Vlad Stan 2023-04-19 10:28:52 +03:00 committed by GitHub
commit 9fc578962d
2 changed files with 4 additions and 2 deletions

View file

@ -109,7 +109,7 @@ class Merchant(PartialMerchant, Nostrable):
delete_event = NostrEvent(
pubkey=pubkey,
created_at=round(time.time()),
kind=0,
kind=5,
tags=[],
content=json.dumps(content, separators=(",", ":"), ensure_ascii=False),
)

View file

@ -131,6 +131,8 @@ async def update_merchant_to_nostr(
event = await sign_and_send_to_nostr(merchant, stall, delete_merchant)
stall.config.event_id = event.id
await update_stall(merchant.id, stall)
if delete_merchant:
# merchant profile updates not supported yet
event = await sign_and_send_to_nostr(merchant, merchant, delete_merchant)
merchant.config.event_id = event.id
return merchant