Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch non-existing convex pools gracefully #9

Open
gosuto-inzasheru opened this issue Dec 28, 2021 · 0 comments
Open

catch non-existing convex pools gracefully #9

gosuto-inzasheru opened this issue Dec 28, 2021 · 0 comments

Comments

@gosuto-inzasheru
Copy link
Member

there should be a check in withdraw_all to make sure the passed asset has a pool.

current behaviour is a bit ugly:

>>> safe.convex.withdraw_all(usdc)
  File "<console>", line 1, in <module>
  File "./great_ape_safe/api_safe/convex.py", line 75, in withdraw_all
    pool_id = self.get_pool_info(underlying)[0]
TypeError: 'NoneType' object is not subscriptable

i am sure other functions have similar issues, maybe a helper function (eg convex._is_valid_underlying(...)) makes sense here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant