-
Notifications
You must be signed in to change notification settings - Fork 72
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-core): bonsai ontology #1388
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -42,6 +42,17 @@ | |||
"no-multi-assign": "off", | |||
"no-nested-ternary": "off", | |||
"no-param-reassign": ["error", { "props": false }], | |||
"no-restricted-imports": [ |
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.
no importing from abacus-ts except from lib and ontology and summaryTypes
src/abacus-ts/ontology.ts
Outdated
|
||
// all data should be accessed via selectrs in this file | ||
// no files outside abacus-ts should access anything within abacus-ts except this file | ||
export const MegalodonCore = { |
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.
this is meant to be THE place you look up the basic data for displaying the app, the authoritative source, the root of all other selectors
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.
one downside is that this will break tree shaking for everyone who uses this object :/
src/abacus-ts/ontology.ts
Outdated
}, | ||
} as const satisfies NestedSelectors; | ||
|
||
export const MegalodonHelpers = { |
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.
this is for common derived data, it's allowed to be messier
src/abacus-ts/selectors/assets.ts
Outdated
import { selectCurrentMarketInfo } from './markets'; | ||
|
||
export const selectAllAssetsInfo = createSelector([selectRawAssetsData], (assets) => | ||
transformAssetsInfo(assets) | ||
); | ||
|
||
export const selectAllAssetsInfoLoading = createSelector( |
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.
createAppSelector?
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.
AHHH good catch
No description provided.