You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.
get_account_transactions never breaks from the infinite loop because the revolut api always returns a transaction.
To be more precise, the first call to the api (so first loop) returns N transactions, to param is updated with the datetime of the last retrieved transaction, then the second loop (and those after) always return 1 transaction => stuck in loop.
I don't understand the need for the loop here, are there any specific cases ?
Right now, i just removed the loop to solve the issue because the first api call returns the requested transactions.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Thank you, @ishfx, for a good spot. Feel free to open a PR with changes, but make sure it accounts for transaction pagination. I agree with you that the loop is not well/safely implemented and can be refactored.
Maybe @cosmincc(2e816d2) can take a look at that?
Hey,
I have a script using your wonderful library which has been working great so far.
When i ran it earlier this day, i got an unexpected result; it hang.
I had to dig to find out why it got into this state.
The issue comes from the method get_account_transactions.
https://github.com/tducret/revolut-python/blob/master/revolut/__init__.py#L186
get_account_transactions never breaks from the infinite loop because the revolut api always returns a transaction.
To be more precise, the first call to the api (so first loop) returns N transactions, to param is updated with the datetime of the last retrieved transaction, then the second loop (and those after) always return 1 transaction => stuck in loop.
I don't understand the need for the loop here, are there any specific cases ?
Right now, i just removed the loop to solve the issue because the first api call returns the requested transactions.
Thanks in advance.
The text was updated successfully, but these errors were encountered: