Skip to content

Luke/UI market refactoring #190

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

Draft
wants to merge 7 commits into
base: chester/buff-ui-markets
Choose a base branch
from

Conversation

lukecaan
Copy link
Member

@lukecaan lukecaan commented May 26, 2025

Moves new UI config stuff into the UI markets class

  • added logic to keep a cache of UI markets so that new instances aren't being created all the time (heavy on garbage collector)

NOTE:: This stuff requires patching the UI too otherwise it will crash .. you can see that PR here :: https://github.com/drift-labs/protocol-v2-mono/pull/3611

private static perpMarketCache: Map<number, PerpUIMarket> = new Map();
private static spotMarketCache: Map<number, SpotUIMarket> = new Map();

readonly market: SpotMarketConfig | PerpMarketConfig; // TODO :: I reckon we should have named this `config`
Copy link
Contributor

Choose a reason for hiding this comment

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

I did fucked up

@lukecaan lukecaan marked this pull request as draft May 30, 2025 03:57
@lukecaan
Copy link
Member Author

Note: want to merge this but it's a big refactor on the UI side which don't have time for rn

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