Skip to content

Commit

Permalink
Add icons for ARS and PEN and configure them in AssetIcons.tsx (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebma authored Oct 14, 2024
1 parent ce7f8ca commit 788aaf5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Binary file added src/assets/coins/ARS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/coins/PENs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/shared/AssetIcons.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import AMPE from '../assets/coins/AMPE.png';
import ARS from '../assets/coins/ARS.png';
import AUDD from '../assets/coins/AUDD.png';
import BRL from '../assets/coins/BRL.png';
import DOT from '../assets/coins/DOT.png';
Expand All @@ -7,6 +8,7 @@ import cEURC from '../assets/coins/cEURC.png';
import KSM from '../assets/coins/KSM.png';
import NGNC from '../assets/coins/NGNC.png';
import PEN from '../assets/coins/PEN.png';
import PENs from '../assets/coins/PENs.png';
import TZS from '../assets/coins/TZS.png';
import USDC from '../assets/coins/USDC.png';
import USDT from '../assets/coins/USDT.png';
Expand All @@ -24,12 +26,15 @@ import DefaultIcon from '../assets/coins/placeholder.png';

// The public key of Mykobo's EURC issuer account
const MYKOBO_ISSUER = 'GAQRF3UGHBT6JYQZ7YSUYCIYWAF4T2SAA5237Q5LIQYJOHHFAWDXZ7NM';
const ANCLAP_ISSUER = 'GA4TDPNUCZPTOHB3TKUYMDCRVATXKEADH7ZEYEBWJKQKE2UBFCYNBPEN';

// Maps all supported Stellar assets to icons. The EURC tokens are handled separately in `getAssetIcon()`
const stellarAssets = [
{ code: 'AUDD', icon: AUDD },
{ code: 'ARS', icon: ARS },
{ code: 'BRL', icon: BRL },
{ code: 'NGNC', icon: NGNC },
{ code: 'PENs', icon: PENs },
{ code: 'TZS', icon: TZS },
{ code: 'USDC', icon: USDC },
{ code: 'XLM', icon: XLM },
Expand Down Expand Up @@ -64,6 +69,12 @@ const handleSpecialAsset = (assetCode: string, assetIssuer?: string) => {
if (assetCode === 'USDC.axl') {
return USDC_axl;
}

if (assetCode === 'PEN' && assetIssuer === ANCLAP_ISSUER) {
// We have two different PEN tokens, one issued on Stellar (Peruvian Sol) and one on Polkadot (Polkadot PEN)
// Here we return the Stellar PEN icon
return PENs;
}
};

const getAssetIcon = (assetCode: string, assetIssuer?: string) => {
Expand Down

0 comments on commit 788aaf5

Please sign in to comment.