-
Notifications
You must be signed in to change notification settings - Fork 1.1k
l2 - v2 code review #10809
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
base: master
Are you sure you want to change the base?
l2 - v2 code review #10809
Conversation
| const filteredAddresses: { [chain: Chain]: Address[] } = {}; | ||
|
|
||
| const tokenAddresses = async (): Promise<{ [chain: Chain]: Address[] }> => { | ||
| //QUESTION: how are the errors here handled? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right now theyre handled down stream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unless you are checking for error objects in promisePool, they get ignored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is something I hate about promisePool, if you use our sdk one, it throws error: https://github.com/DefiLlama/defillama-sdk/blob/more-chainApi-methods/src/util/promisePool.ts#L5
| // isnt this a lot of writes? | ||
| prices = await getR2JSONString(`prices/${chain}.json`); | ||
| } catch (e) { | ||
| // QUESTION: hmm, what does happen if the price is already cached? are you deleting old prices somewhere else in the code? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just for debug while the works in dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same with the other R2s below, theyre cached for ages but it speeds up the process significantly for debug
No description provided.