Skip to content
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

feat(bonsai-ui): market header and launchable market details #1400

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

jaredvu
Copy link
Contributor

@jaredvu jaredvu commented Jan 6, 2025

Migrate market headers and details


Views

  • <LaunchableMarketStatsDetails> & <LaunchableMarketDetails>

    • use BonsaiHelper createSelect
  • <MarketStatsDetails>

    • use BonsaiHelper and BonsaiCore

Functions/Clients

  • lib/ontology
    • add to BonsaiHelper

@jaredvu jaredvu requested a review from a team as a code owner January 6, 2025 22:29
Copy link

vercel bot commented Jan 6, 2025

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

Name Status Preview Comments Updated (UTC)
v4-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 7, 2025 6:36pm
v4-testnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 7, 2025 6:36pm

@jaredvu jaredvu changed the title chore(bonsai-ui): market header and launchable market details feat(bonsai-ui): market header and launchable market details Jan 6, 2025
Copy link
Contributor

@tyleroooo tyleroooo left a comment

Choose a reason for hiding this comment

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

thank you thank you thank you, just a few thoughts

src/abacus-ts/ontology.ts Outdated Show resolved Hide resolved
initialMarginFraction={initialMarginFraction}
effectiveInitialMarginFraction={effectiveInitialMarginFraction}
priceChange24HPercent={percentChange24h}
initialMarginFraction={MustBigNumber(initialMarginFraction).toNumber()}
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm this is slightly awkward, maybe we should do these conversions in the calculators. Any preference?

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 don't think we convert any other market param rn within the calculators. I think I can move the MustBigNumber to the actual render function so that the props can be consistent.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I don't have a super preference. If we end up doing this kind of parsing in multiple places though it might be worth just adding it to some calculators

initialMarginFraction: number | null | undefined;
effectiveInitialMarginFraction: number | null | undefined;
initialMarginFraction: string | null | undefined;
effectiveInitialMarginFraction: BigNumber | null | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I suppose this is okay for now but this object is a mess. We need to make it consistent soonish, all numbers should either be number or bignumber.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants