Skip to content

Commit

Permalink
Fix unreachable else clause
Browse files Browse the repository at this point in the history
Signed-off-by: alfred richardsn <rchrdsn@protonmail.ch>
  • Loading branch information
r4rdsn committed Aug 25, 2020
1 parent 6bf3ed4 commit 63a062e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/handlers/cashback.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async def transfer_cashback(user_id: int, currency: str, address: str):
)
amount_document = await cursor.to_list(length=1)
try:
return await get_escrow_instance(currency).transfer(
result = await get_escrow_instance(currency).transfer(
address,
amount_document[0]["amount"].to_decimal(),
currency,
Expand All @@ -115,6 +115,7 @@ async def transfer_cashback(user_id: int, currency: str, address: str):
raise error
else:
await database.cashback.delete_many({"id": user_id, "currency": currency})
return result


@private_handler(state=states.cashback_address)
Expand Down

0 comments on commit 63a062e

Please sign in to comment.