Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Chart #75

Merged
merged 23 commits into from
Oct 10, 2024
Merged

Chart #75

merged 23 commits into from
Oct 10, 2024

Conversation

JasonMHasperhoven
Copy link
Member

@JasonMHasperhoven JasonMHasperhoven commented Sep 26, 2024

Implements the lightweight-charts lib of tradingview.

  • Moved the candles fetching logic with the merging to a new candles api route. The implementation is slightly updated to start at the end height and go backwards.
image

@JasonMHasperhoven JasonMHasperhoven marked this pull request as ready for review October 2, 2024 15:27
@JasonMHasperhoven JasonMHasperhoven requested a review from a team October 2, 2024 15:27
height: number;
}

const asset1: Token = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporarily hardcoded

@JasonMHasperhoven JasonMHasperhoven changed the title [WIP] Chart Chart Oct 2, 2024
heights?: string[];
}

export default async function blockInfoFetchHandler(req: NextApiRequest, res: NextApiResponse) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: move this into the app directory while applying the newer NextJS's API.

I believe we should discontinue supporting the pages directory and move everything related to v2 to the app. It's not just the new API but also, if done correctly, a performance increase.

Copy link
Member

@VanishMax VanishMax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good!

@JasonMHasperhoven JasonMHasperhoven merged commit b9d0b50 into main Oct 10, 2024
2 checks passed
@JasonMHasperhoven JasonMHasperhoven deleted the chart branch October 10, 2024 10:30
@VanishMax VanishMax mentioned this pull request Oct 18, 2024
TalDerei pushed a commit to penumbra-zone/web that referenced this pull request Mar 10, 2025
* Setup responsive trade layout

* Adjust column widths

* Add lightweight chart'

* Refactor ohlc api

* Refactor api/blocks & add block fetcher

* Create useCandles hook

* Add path support for ca env

* Refactor candles fetchers

* Move ohlc api to candles

* Move merge candles logic to api route

* Tmp move block info logic to candles api route

* Move block info logic to api route

* Fix types for candles api routes

* Remove IChartApi type

* Move assets outside of useCandles

* Remove console logs

* Remove hook useCandles

* Address PR comments

* Fix import paths

* Add penumbra chain id to candles api route
TalDerei pushed a commit to penumbra-zone/web that referenced this pull request Mar 25, 2025
* Setup responsive trade layout

* Adjust column widths

* Add lightweight chart'

* Refactor ohlc api

* Refactor api/blocks & add block fetcher

* Create useCandles hook

* Add path support for ca env

* Refactor candles fetchers

* Move ohlc api to candles

* Move merge candles logic to api route

* Tmp move block info logic to candles api route

* Move block info logic to api route

* Fix types for candles api routes

* Remove IChartApi type

* Move assets outside of useCandles

* Remove console logs

* Remove hook useCandles

* Address PR comments

* Fix import paths

* Add penumbra chain id to candles api route
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants