mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-05-01 02:17:55 +00:00
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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user