-
Notifications
You must be signed in to change notification settings - Fork 8
Integrate the cow-sdk into the Home Page widgets #77
Integrate the cow-sdk into the Home Page widgets #77
Conversation
|
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.
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.
It's looking awesome!
Added a few comments
return format(fromUnixTime(crossHairData.time as UTCTimestamp), 'MMM d HH:mm, yyyy') | ||
} | ||
|
||
return format(fromUnixTime(crossHairData.time as UTCTimestamp), 'MMM d, yyyy') |
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.
Are these date formats locale aware?
src/apps/explorer/components/SummaryCardsWidget/VolumeChart/useGetVolumeData.ts
Show resolved
Hide resolved
src/apps/explorer/components/SummaryCardsWidget/VolumeChart/volumeData.json
Show resolved
Hide resolved
Hey @ramirotw , great job!!
Thanks |
This is because there are no price references for tokens on Rinkeby, so it will always be 0.
I'll point something below about this so we all are on the same page.
As we discussed on the call, lets wait for the backend to have an answer about this and in the case we need to merge the responses on the client we can create a ticket for it.
This is something that is bringing some confusion and I want be sure we all understand how it's supposed to work. As it is implemented right now we have 3 different values:
Now based on those values we have colors applied to labels and the chart itself:
So here we could have something that is confusing at first glance: we can have a green % value from the previous period (2) and a red chart because the trend was downside. Does that makes sense? @elena-zh @alfetopito @henrypalacios @alongoni |
Thanks for the explanation Ramiro. I'm not that well versed into this kind of graph, but if I'm not mistaken I've seen a graph where the color is applied to the sections of the graph above/below the So anything above Again, not a strong opinion, just throwing out ideas. Not even sure this graph lib is capable of doing that. |
@ramirotw , thank you for the explanation!
However, I do not have a strong opinion about it. Btw, if we read the graph values so differently, maybe we could add some kind of tooltips to each value that will explain what this or that value means? 🧐 |
Thanks Elena! So I see two different ways of looking at the chart:
3 and 4: Whether the chart should display accumulated volume or not. Here I'm inclined towards not accumulating the volume. In the Cow Protocol Dune's dashboard https://dune.com/gnosis.protocol/Gnosis-Protocol-V2 we have two different charts to show daily volume:
@anxolin what are your thoughts? |
From today's call: Volume chart:
Last Batch card:
|
Since this is the sdk integration PR I'll only update the main value to show the accumulated volume. The remaining bullets will be worked on different PRs so they are more focused. |
@ramirotw , will you create separate tasks for all the rest points? |
Summary
Closes #40
This integrates the Volume chart and the Summary cards to consume data provided by the cow-subgraph through the cow-sdk