fix: Enable dynamic liquidity pools and improve USDT display consistency

- Make AddLiquidityModal dynamic to support all pool combinations (HEZ-PEZ, HEZ-USDT, PEZ-USDT)
- Pass asset0 and asset1 props from PoolDashboard to AddLiquidityModal
- Rename balance key from wUSDT to USDT in WalletContext for user-facing consistency
- Display USDT instead of wUSDT in PriceChart for better UX
- Backend still uses wUSDT (Asset ID 2), but frontend shows USDT to users

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-06 19:55:57 +03:00
parent 5686386ef6
commit 617b61030a
4 changed files with 139 additions and 82 deletions
+8 -1
View File
@@ -10,6 +10,13 @@ interface PriceChartProps {
currentPrice: number;
}
// Helper: Convert backend token symbols to user-facing display names
const getDisplayName = (token: string): string => {
if (token === 'wUSDT') return 'USDT';
if (token === 'wHEZ') return 'HEZ';
return token; // HEZ, PEZ, etc. remain the same
};
export const PriceChart: React.FC<PriceChartProps> = ({ fromToken, toToken, currentPrice }) => {
const [timeframe, setTimeframe] = useState<'1H' | '24H' | '7D' | '30D'>('24H');
const [chartData, setChartData] = useState<any[]>([]);
@@ -83,7 +90,7 @@ export const PriceChart: React.FC<PriceChartProps> = ({ fromToken, toToken, curr
<div className="flex justify-between items-center mb-4">
<div>
<div className="text-sm text-gray-400 mb-1">
{fromToken}/{toToken} Price
{getDisplayName(fromToken)}/{getDisplayName(toToken)} Price
</div>
<div className="flex items-center gap-3">
<span className="text-2xl font-bold text-white">