Skip to content

Conversation

@DannyDelott
Copy link
Contributor

@DannyDelott DannyDelott commented Oct 19, 2023

@vercel
Copy link

vercel bot commented Oct 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hyperdrive-fixed-borrow ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 19, 2023 8:09pm
hyperdrive-monorepo-hyperdrive-trading ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 19, 2023 8:09pm
hyperdrive-sdk-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 19, 2023 8:09pm
trading-competition ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 19, 2023 8:09pm

header: `Current value (${hyperdrive.baseToken.symbol})`,
cell: ({ row }) => {
return <CurrentValueCell hyperdrive={hyperdrive} row={row} />;
},
Copy link
Contributor

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.

Copy link
Contributor Author

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({
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@DannyDelott DannyDelott merged commit 76b3131 into main Oct 19, 2023
@DannyDelott DannyDelott deleted the danny-446-accrued-yield branch October 19, 2023 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants