Skip to content

Commit

Permalink
feat: small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
motorina0 committed Sep 20, 2024
1 parent c47f077 commit d1bfe8d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 7 additions & 2 deletions services.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ async def create_address(
async def activate_address(
domain_id: str, address_id: str, payment_hash: Optional[str] = None
) -> Address:
logger.info(f"Activating NOSTR NIP-05 '{address_id}' for {domain_id}")
logger.info(f"Activating NIP-05 '{address_id}' for {domain_id}")

address = await get_address(domain_id, address_id)
assert address, f"Cannot find address '{address_id}' for {domain_id}."
Expand All @@ -238,7 +238,12 @@ async def activate_address(

address.config.activated_by_owner = payment_hash is None
address.config.payment_hash = payment_hash
return await activate_domain_address(domain_id, address_id, address.config)
activated_address = await activate_domain_address(
domain_id, address_id, address.config
)
logger.info(f"Activated NIP-05 '{activated_address.local_part}' ({address_id}).")

return activated_address


async def get_valid_addresses_for_owner(
Expand Down
5 changes: 5 additions & 0 deletions views_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,11 @@ async def api_lnurl_create_or_update(
address.config.ln_address = data
await update_ln_address(address)

return SimpleStatus(
success=True,
message=f"Lightning address '{address.local_part}@{domain.domain}' updated.",
)


##################################### RANKING #####################################

Expand Down

0 comments on commit d1bfe8d

Please sign in to comment.