-
Notifications
You must be signed in to change notification settings - Fork 0
SOV-5215: add Amount renderer component #13
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
Conversation
✅ Deploy Preview for sovryn-layer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Pull Request Overview
This PR adds a new AmountRenderer component to standardize the display of numeric values with formatting, tooltips, and copy functionality across the Money Market interface. The component provides consistent decimal formatting, prefix/suffix support, and an optional tooltip with copy-to-clipboard functionality.
- Introduces
AmountRenderercomponent with configurable formatting options - Replaces hardcoded value formatting with the new component across multiple tables and statistics
- Updates type definitions to use numeric types instead of pre-formatted strings
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/web-app/src/components/ui/amount-renderer.tsx | New component for standardized amount display with formatting and copy functionality |
| apps/web-app/src/components/MoneyMarket/components/TopPanel/TopPanel.tsx | Updated to use AmountRenderer for net worth, APY, and health factor display |
| apps/web-app/src/components/MoneyMarket/components/PoolPositionStat/PoolPositionStat.tsx | Changed value prop type from string/number to ReactNode to support AmountRenderer |
| apps/web-app/src/components/MoneyMarket/components/LendPositionsList/components/AssetsTable/AssetsTable.constants.tsx | Updated balanceUsd from string to number format |
| apps/web-app/src/components/MoneyMarket/components/LendPositionsList/LendPositionsList.types.tsx | Changed balanceUsd type from string to number |
| apps/web-app/src/components/MoneyMarket/components/LendPositionsList/LendPositionsList.tsx | Replaced formatted strings with AmountRenderer components |
| apps/web-app/src/components/MoneyMarket/components/LendAssetsList/components/AssetsTable/AssetsTable.tsx | Updated balance and APY display to use AmountRenderer |
| apps/web-app/src/components/MoneyMarket/components/LendAssetsList/components/AssetsTable/AssetsTable.constants.tsx | Added balanceUsd numeric values to asset data |
| apps/web-app/src/components/MoneyMarket/components/LendAssetsList/LendAssetsList.types.tsx | Added optional balanceUsd number field |
| apps/web-app/src/components/MoneyMarket/components/BorrowPositionsList/components/AssetsTable/AssetsTable.tsx | Updated to use AmountRenderer for balance and APY display |
| apps/web-app/src/components/MoneyMarket/components/BorrowPositionsList/components/AssetsTable/AssetsTable.constants.tsx | Changed balanceUsd from string to number format |
| apps/web-app/src/components/MoneyMarket/components/BorrowPositionsList/BorrowPositionsList.types.tsx | Updated balanceUsd type from string to number |
| apps/web-app/src/components/MoneyMarket/components/BorrowPositionsList/BorrowPositionsList.tsx | Replaced formatted strings with AmountRenderer components |
| apps/web-app/src/components/MoneyMarket/components/BorrowAssetsList/components/AssetsTable/AssetsTable.constants.tsx | Updated balanceUsd from string to number format |
| apps/web-app/src/components/MoneyMarket/components/BorrowAssetsList/BorrowAssetsList.types.tsx | Changed balanceUsd type from string to number |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request Overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...c/components/MoneyMarket/components/LendPositionsList/components/AssetsTable/AssetsTable.tsx
Outdated
Show resolved
Hide resolved
...rc/components/MoneyMarket/components/BorrowAssetsList/components/AssetsTable/AssetsTable.tsx
Outdated
Show resolved
Hide resolved
…sList/components/AssetsTable/AssetsTable.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull Request Overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.