Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions src/ui-config/reservePatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const SYMBOL_MAP: { [key: string]: string } = {
'AAVE.e': 'AAVE',
'USDT.e': 'USDT',
'USDC.e': 'USDC',
'BTC.b': 'BTC',
// polygon
miMATIC: 'MAI',
};
Expand All @@ -44,16 +45,7 @@ export const SYMBOL_MAP: { [key: string]: string } = {
* With the next version of uipooldataprovider https://github.com/aave/aave-v3-periphery/pull/89 this list can be greatly reduced/removed.
*/
export const SYMBOL_NAME_MAP: { [key: string]: string } = {
AMPL: 'Ampleforth',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These name mapping have been created because there was a bug not returning names on the smart contract.
This bug has been fixed and deployed a while ago, so these mappings are mostly unnecessary now.

I checked the mapping i removed, but there might be more that can be removed.
I wasn't sure with things like teher or stETH as the name we have is wrong′/different and that might be on purpose idk.

¹wrong as in: Tether vs Tether USD, Lido staked ether vs Liquid staked ether,...

AVAX: 'Avalanche',
BAL: 'Balancer',
BAT: 'Basic Attention Token',
BUSD: 'Binance USD',
CRV: 'Curve DAO Token',
CVX: 'Convex Token',
DPI: 'DeFi Pulse Index',
ENJ: 'EnjinCoin',
ENS: 'Ethereum Name Service',
ETH: 'Ethereum',
EUROS: 'STASIS EURO',
FAI: 'Fei USD',
Expand All @@ -74,8 +66,6 @@ export const SYMBOL_NAME_MAP: { [key: string]: string } = {
UNI: 'Uniswap',
UNIDAIWETH: 'UNI DAI/WETH',
UNIWBTCUSDC: 'UNI WBTC/USDC',
USDC: 'USD Coin',
USDP: 'Pax Dollar',
USDT: 'Tether',
WAVAX: 'Wrapped Avalanche',
WBTC: 'Wrapped BTC',
Expand All @@ -92,9 +82,11 @@ export const SYMBOL_NAME_MAP: { [key: string]: string } = {
export function fetchIconSymbolAndName({
underlyingAsset,
symbol,
name,
}: {
underlyingAsset: string;
symbol: string;
name?: string;
}) {
// guni symbols are just broken (G-UNI for all tokens)
if (
Expand All @@ -116,7 +108,7 @@ export function fetchIconSymbolAndName({
const unifiedSymbol = SYMBOL_MAP[symbol] || symbol;
return {
iconSymbol: unifiedSymbol,
name: SYMBOL_NAME_MAP[unifiedSymbol.toUpperCase()] || unifiedSymbol,
name: SYMBOL_NAME_MAP[unifiedSymbol.toUpperCase()] || name || unifiedSymbol,
symbol,
};
}
Expand Down