layerqa / aiocryptopay

https://t.me/CryptoBot api asynchronous python wrapper
https://pypi.org/project/aiocryptopay/
MIT License
84 stars 19 forks source link

Fix number of arguments for pay handler #6

Closed Kylmakalle closed 1 year ago

Kylmakalle commented 1 year ago

Here we're passing an app as an argument, but it's not handled in the example.

https://github.com/layerqa/aiocryptopay/blob/main/aiocryptopay/api.py#L298

Kylmakalle commented 1 year ago

@layerqa Excuse me, is something wrong with this one?

layerqa commented 1 year ago

@layerqa Excuse me, is something wrong with this one?

Who needs to see for himself what the handler returns the app

Kylmakalle commented 1 year ago

@layerqa It's not about "who needs" to have an aiohttp app variable in a handler. You'll get a TypeError: invoice_paid() takes 1 positional argument but 2 were given.

Please, either accept this PR, or make it a async def invoice_paid(update: Update, *args) -> None: