Skip to content

Conversation

@david30907d
Copy link
Member

No description provided.

…om the API:

Changes made:

allocationAdapter.ts - Now uses percentage_of_portfolio directly from API instead of calculating relative percentages
AllocationBars.tsx - Each bar now has width: asset.value% (absolute) instead of flex: asset.value (relative)
Tests added:

2 new tests in AllocationBars.test.tsx - verify absolute width percentages
6 new tests in allocationAdapter.test.ts - verify API percentages are used correctly
All 26 tests passing (20 + 6)
Now the bars will show exactly what the API returns:

BTC: 37.25%
ETH: 17.07%
ALT: 10.06%
Stables: 35.62%
Updated TargetAllocationBar and PortfolioComposition to use it.
Deleted PortfolioLegend.
Verified changes with tests.
@david30907d david30907d merged commit 36045cb into main Jan 4, 2026
8 checks passed
@david30907d david30907d deleted the refactor/1229 branch January 4, 2026 04:17
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