-
Notifications
You must be signed in to change notification settings - Fork 1.1k
axlp #10992
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
Conversation
| processor: (vault: string) => fetchVaultPositions(vault, false), | ||
| }); | ||
|
|
||
| async function fetchVaultPositions(vault: string, isCurrent: boolean) { |
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.
should we have two flows, simpler one for vaults with less than 5M tvl or borrowed less than 80% and stricter check for the rest?
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.
Do you have something in mind for how this could be simpler? Would this still be for marking down bad debt vaults?
| symbol, | ||
| timestamp, | ||
| "morpho", | ||
| 1.01 |
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 to ensure that it never gets overwritten?
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.
Yeah
coins/src/adapters/oracles/pyth.ts
Outdated
| attributes: { symbol = undefined, quote_currency = undefined } = {}, | ||
| }: any = {}) => { | ||
| if (!id || !symbol || quote_currency !== "USD") return; | ||
| feeds.push({ id: "0x" + id, symbol: symbol.replace(/\//g, ":") } as any); |
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.
Replace it with this
const formattedSymbol = symbol.replace(/\//g, ":");
feeds.push({ id: "0x" + id, symbol: formattedSymbol, generic_symbol: formattedSymbol });
because you're not assigning generic_symbol there, yet you're trying to access it later
const { symbol, generic_symbol } = feeds[idx]; → undefined issue
| const metadata = await getTokenInfoMap(api.chain, problemVaultList); | ||
|
|
||
| const writes: Write[] = []; | ||
| problemVaultList.map(async (vault: string) => { |
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.
A small optimization detail here: use forEach instead of map because you're not returning anything. You're using side effects (on writes) rather than transforming the array directly, so map is unnecessary since it’s meant to return data from the array transformation, which isn’t the case here
No description provided.