Add latest position blocks to portfolio queries#1846
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
| } catch (e) { | ||
| console.error( | ||
| `Error fetching longs for ${hyperdrive.address}:`, | ||
| e, | ||
| ); | ||
| return { | ||
| hyperdrive, | ||
| openLongs: [], | ||
| }; | ||
| } |
There was a problem hiding this comment.
This prevents the entire query from failing when one of the chains fails.
jrhea
left a comment
There was a problem hiding this comment.
out of curiosity, why do long, short and lp have different latest position blocks? did you actually find the latest ones for each chain?


Partial patch to the portfolio queries which limits the "toBlock" of event queries for the longs and shorts. Some of the queries are still failing and will need to be broken up into smaller queries, but this gets us half way there so at least some positions will show up.