Merge pull request #46 from lnbits/fix_no_merchant_profile_update
fix: do not erase merchant profile
This commit is contained in:
commit
9fc578962d
2 changed files with 4 additions and 2 deletions
|
|
@ -109,7 +109,7 @@ class Merchant(PartialMerchant, Nostrable):
|
||||||
delete_event = NostrEvent(
|
delete_event = NostrEvent(
|
||||||
pubkey=pubkey,
|
pubkey=pubkey,
|
||||||
created_at=round(time.time()),
|
created_at=round(time.time()),
|
||||||
kind=0,
|
kind=5,
|
||||||
tags=[],
|
tags=[],
|
||||||
content=json.dumps(content, separators=(",", ":"), ensure_ascii=False),
|
content=json.dumps(content, separators=(",", ":"), ensure_ascii=False),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,9 @@ async def update_merchant_to_nostr(
|
||||||
event = await sign_and_send_to_nostr(merchant, stall, delete_merchant)
|
event = await sign_and_send_to_nostr(merchant, stall, delete_merchant)
|
||||||
stall.config.event_id = event.id
|
stall.config.event_id = event.id
|
||||||
await update_stall(merchant.id, stall)
|
await update_stall(merchant.id, stall)
|
||||||
event = await sign_and_send_to_nostr(merchant, merchant, delete_merchant)
|
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
|
merchant.config.event_id = event.id
|
||||||
return merchant
|
return merchant
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue