-
Notifications
You must be signed in to change notification settings - Fork 1
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
Show accrued yield in Open Shorts #454
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
}, | ||
}), | ||
columnHelper.display({ | ||
header: `Current value (${hyperdrive.baseToken.symbol})`, | ||
cell: ({ row }) => { | ||
return <CurrentValueCell hyperdrive={hyperdrive} row={row} />; | ||
}, |
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.
I think the better pattern here is to use the accessor, and then pass the value to the component from getValue()
instead of grabbing it from the row.
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.
💯 I'll tackle this in a followup when we add sorting
const decoded = decodeAssetFromTransferSingleEventData( | ||
event.data as `0x${string}`, | ||
); | ||
const { timestamp } = await this.network.getBlock({ |
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.
If we are pulling this out to a destructured pattern here we should do it in the other functions too. I'm noticing we are still using the decode function in some places. Does that need to be updated too?
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.
The timestamp
from decodeAssetFromTransferSingleEventData
is the maturity time, we should probably rename that so it's more clear. This one is the timestamp of the CloseShort event.
#446