-
Notifications
You must be signed in to change notification settings - Fork 73
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
base: main
Are you sure you want to change the base?
Conversation
This reverts commit 2b5cd8e.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
thank you thank you thank you, just a few thoughts
src/views/MarketStatsDetails.tsx
Outdated
initialMarginFraction={initialMarginFraction} | ||
effectiveInitialMarginFraction={effectiveInitialMarginFraction} | ||
priceChange24HPercent={percentChange24h} | ||
initialMarginFraction={MustBigNumber(initialMarginFraction).toNumber()} |
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.
hmm this is slightly awkward, maybe we should do these conversions in the calculators. Any preference?
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 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.
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.
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; |
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.
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.
Migrate market headers and details
Views
<LaunchableMarketStatsDetails>
&<LaunchableMarketDetails>
<MarketStatsDetails>
Functions/Clients
lib/ontology