Skip to content

Commit

Permalink
feat: Add support for NGN, EUR and AUD assets for Spacewalk (#302)
Browse files Browse the repository at this point in the history
* Add asset icons for bridged and unbridged tokens for spacewalk

* add prices to show bridged tokens in the portfolio
  • Loading branch information
gonzamontiel authored Dec 5, 2023
1 parent 70c2a94 commit c377019
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 6 deletions.
Binary file added src/assets/coins/AUDD.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/EURC.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/NGNC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions src/hooks/usePriceFetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,27 @@ const assets: PriceFetcherAsset[] = [
provider: 'diaForeign',
exclude: [TenantName.Pendulum],
},
{
assetName: 'NGNC.s',
blockchain: 'YahooFinance',
assetId: 'NGN-USD',
provider: 'diaForeign',
exclude: [TenantName.Pendulum],
},
{
assetName: 'EURC.s',
blockchain: 'YahooFinance',
assetId: 'EUR-USD',
provider: 'diaForeign',
exclude: [TenantName.Pendulum],
},
{
assetName: 'AUDD.s',
blockchain: 'YahooFinance',
assetId: 'AUD-USD',
provider: 'diaForeign',
exclude: [TenantName.Pendulum],
},
{
assetName: 'KSM',
blockchain: 'Kusama',
Expand Down
22 changes: 16 additions & 6 deletions src/shared/AssetIcons.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
import AMPE from '../assets/coins/AMPE.png';
import AUDD from '../assets/coins/AUDD.png';
import BRL from '../assets/coins/BRL.png';
import DOT from '../assets/coins/DOT.png';
import EURC from '../assets/coins/EURC.png';
import KSM from '../assets/coins/KSM.png';
import NGNC from '../assets/coins/NGNC.png';
import PEN from '../assets/coins/PEN.png';
import TZS from '../assets/coins/TZS.png';
import USDC from '../assets/coins/USDC.png';
import USDT from '../assets/coins/USDT.png';
import XLM from '../assets/coins/XLM.png';

import DefaultIcon from '../assets/coins/placeholder.png';

type IconMap = {
[key: string]: string;
};

const icons: IconMap = {
'AUDD.s': AUDD,
'BRL.s': BRL,
'EURC.s': EURC,
'NGNC.s': NGNC,
'TZS.s': TZS,
'XLM.s': XLM,
'USDC.s': USDC,
'XLM.s': XLM,
AMPE,
AUDD,
BRL,
TZS,
XLM,
USDC,
DOT,
EURC,
KSM,
USDT,
NGNC,
PEN,
AMPE,
TZS,
USDC,
USDT,
XLM,
};

export function getIcon(token: string | undefined) {
Expand Down

0 comments on commit c377019

Please sign in to comment.