Skip to content

Commit

Permalink
fix: promo code activation
Browse files Browse the repository at this point in the history
  • Loading branch information
motorina0 committed Oct 30, 2024
1 parent 4dbec85 commit a7a1ebd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ async def _handle_action(action: str, payment: Payment, address: Address):


async def _activate_address(payment: Payment, address: Address):
activated = await activate_address(
activated_address = await activate_address(
address.domain_id, address.id, payment.payment_hash
)
if activated:
await _create_ln_address(payment, address)
await _pay_promo_code(payment, address)
if activated_address:
await _create_ln_address(payment, activated_address)
await _pay_promo_code(payment, activated_address)
else:
address.extra.reimburse_payment_hash = payment.payment_hash
address.reimburse_amount = payment.amount
Expand Down

0 comments on commit a7a1ebd

Please sign in to comment.