Skip to content

Commit

Permalink
feat: updating logo for assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Korokoe committed May 28, 2022
1 parent 7ec6345 commit 86d67de
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion components/ffAssetOverview/ffAssetOverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function ffAssetOverview({ asset }) {
<Grid container spacing={3} className={ classes.assetTitleContainer }>
<Grid item lg={4} md={4} sm={12} xs={12}>
<div className={ classes.assetTitle }>
<img className={ classes.assetIcon } src={ asset ? `https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${asset.address}/logo-128.png` : '/unknown-logo.png'} alt='' height='60px' width='60px' />
<img className={ classes.assetIcon } src={ asset ? `https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${asset.logoAddress || asset.address}/logo-128.png` : '/unknown-logo.png'} alt='' height='60px' width='60px' />
<div>
<Typography className={ classes.assetName }>{ asset ? asset.name : '' }</Typography>
<Typography className={ classes.assetPrice }>${ formatCurrency(asset ? asset.price : 0) }</Typography>
Expand Down
2 changes: 1 addition & 1 deletion components/ffAssets/ffAssetsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export default function EnhancedTable({ assets }) {
<div className={classes.inline}>
<img
className={classes.imgLogo}
src={`https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${row.address}/logo-128.png`}
src={`https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${row.logoAddress || row.address}/logo-128.png`}
width='35'
height='35'
alt=''
Expand Down
2 changes: 1 addition & 1 deletion components/ffClaimAll/ffClaimAllTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export default function EnhancedTable({ claimable, crv, ibEUR, rKP3R }) {
{
row?.type === 'Fixed Forex' && <img className={ classes.imgLogo } src={`/images/ff-icon.svg`} width='35' height='35' alt='' />}
{
row?.type !== 'Fixed Forex' && <img className={ classes.imgLogo } src={`https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${row.address}/logo-128.png`} width='35' height='35' alt='' />
row?.type !== 'Fixed Forex' && <img className={ classes.imgLogo } src={`https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${row.logoAddress || row.address}/logo-128.png`} width='35' height='35' alt='' />
}
<div>
<Typography variant="h2" className={classes.textSpaced}>
Expand Down
2 changes: 1 addition & 1 deletion components/ffDashboardClaimAll/ffDashboardClaimAllTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export default function EnhancedTable({ claimable, crv, ibEUR, rKP3R }) {
{
row?.type === 'Fixed Forex' && <img className={ classes.imgLogo } src={`/images/ff-icon.svg`} width='35' height='35' alt='' />}
{
row?.type !== 'Fixed Forex' && <img className={ classes.imgLogo } src={`https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${row.address}/logo-128.png`} width='35' height='35' alt='' />
row?.type !== 'Fixed Forex' && <img className={ classes.imgLogo } src={`https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${row.logoAddress || row.address}/logo-128.png`} width='35' height='35' alt='' />
}
</Grid>

Expand Down
2 changes: 1 addition & 1 deletion components/ffGauges/ffGaugesTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export default function EnhancedTable({ gauges, setParentSliderValues, defaultVo
<TableRow key={row.gauge.address}>
<TableCell className={classes.cell}>
<div className={ classes.inline }>
<img className={ classes.imgLogo } src={`https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${row.address}/logo-128.png`} width='35' height='35' alt='' />
<img className={ classes.imgLogo } src={`https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${row.logoAddress || row.address}/logo-128.png`} width='35' height='35' alt='' />
<div>
<Typography variant="h2" className={classes.textSpaced}>
{ row?.gauge?.coin0?.symbol } - { row?.gauge?.coin1?.symbol }
Expand Down
4 changes: 2 additions & 2 deletions components/ffSwap/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ function AssetSelect({ type, value, assetOptions, onSelect }) {
<img
className={ classes.displayAssetIconSmall }
alt=""
src={ (asset && asset.icon) ? asset.icon : `https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${asset?.address}/logo-128.png` }
src={ (asset && asset.icon) ? asset.icon : `https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${asset?.logoAddress || asset?.address}/logo-128.png` }
height='60px'
onError={(e)=>{e.target.onerror = null; e.target.src="/tokens/unknown-logo.png"}}
/>
Expand All @@ -458,7 +458,7 @@ function AssetSelect({ type, value, assetOptions, onSelect }) {
<img
className={ classes.displayAssetIcon }
alt=""
src={ (value && value.icon) ? value.icon : `https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${value?.address}/logo-128.png` }
src={ (value && value.icon) ? value.icon : `https://raw.githubusercontent.com/yearn/yearn-assets/master/icons/multichain-tokens/1/${value?.logoAddress || value?.address}/logo-128.png` }
height='100px'
onError={(e)=>{e.target.onerror = null; e.target.src="/tokens/unknown-logo.png"}}
/>
Expand Down
14 changes: 14 additions & 0 deletions stores/fixedForexStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ class Store {
const assets = [
{
address: KP3RETH_ADDRESS,
logoAddress: KP3RETH_ADDRESS,
symbol: "ETH+KP3R",
shouldUseNewABI: true,
decimals: 18,
Expand Down Expand Up @@ -582,6 +583,7 @@ class Store {
},
{
address: IBAUDUSDC_ADDRESS,
logoAddress: IBAUDUSDC_ADDRESS,
symbol: "ibAUD+USDC",
shouldUseNewABI: true,
decimals: 18,
Expand Down Expand Up @@ -609,6 +611,7 @@ class Store {
},
{
address: IBCHFUSDC_ADDRESS,
logoAddress: IBCHFUSDC_ADDRESS,
symbol: "ibCHF+USDC",
shouldUseNewABI: true,
decimals: 18,
Expand Down Expand Up @@ -636,6 +639,7 @@ class Store {
},
{
address: IBEURUSDC_ADDRESS,
logoAddress: IBEURUSDC_ADDRESS,
symbol: "ibEUR+USDC",
shouldUseNewABI: true,
decimals: 18,
Expand Down Expand Up @@ -663,6 +667,7 @@ class Store {
},
{
address: IBGBPUSDC_ADDRESS,
logoAddress: IBGBPUSDC_ADDRESS,
symbol: "ibGBP+USDC",
shouldUseNewABI: true,
decimals: 18,
Expand Down Expand Up @@ -690,6 +695,7 @@ class Store {
},
{
address: IBJPYUSDC_ADDRESS,
logoAddress: IBJPYUSDC_ADDRESS,
symbol: "ibJPY+USDC",
shouldUseNewABI: true,
decimals: 18,
Expand Down Expand Up @@ -717,6 +723,7 @@ class Store {
},
{
address: IBKRWUSDC_ADDRESS,
logoAddress: IBKRWUSDC_ADDRESS,
symbol: "ibKRW+USDC",
shouldUseNewABI: true,
decimals: 18,
Expand Down Expand Up @@ -744,6 +751,7 @@ class Store {
},
{
address: IBEUR_ADDRESS,
logoAddress: IBEUR_GAUGE_ADDRESS,
symbol: "ibEUR",
decimals: 18,
name: "Iron Bank EUR",
Expand Down Expand Up @@ -771,6 +779,7 @@ class Store {
},
{
address: IBKRW_ADDRESS,
logoAddress: IBKRW_GAUGE_ADDRESS,
symbol: "ibKRW",
decimals: 18,
name: "Iron Bank KRW",
Expand Down Expand Up @@ -798,6 +807,7 @@ class Store {
},
{
address: IBGBP_ADDRESS,
logoAddress: IBGBP_GAUGE_ADDRESS,
symbol: "ibGBP",
decimals: 18,
name: "Iron Bank GBP",
Expand Down Expand Up @@ -825,6 +835,7 @@ class Store {
},
{
address: IBCHF_ADDRESS,
logoAddress: IBCHF_GAUGE_ADDRESS,
symbol: "ibCHF",
decimals: 18,
name: "Iron Bank CHF",
Expand Down Expand Up @@ -852,6 +863,7 @@ class Store {
},
{
address: IBAUD_ADDRESS,
logoAddress: IBAUD_GAUGE_ADDRESS,
symbol: "ibAUD",
decimals: 18,
name: "Iron Bank AUD",
Expand Down Expand Up @@ -879,6 +891,7 @@ class Store {
},
{
address: IBJPY_ADDRESS,
logoAddress: IBJPY_GAUGE_ADDRESS,
symbol: "ibJPY",
decimals: 18,
name: "Iron Bank JPY",
Expand Down Expand Up @@ -906,6 +919,7 @@ class Store {
},
{
address: IBEUR_AG_ADDRESS,
logoAddress: IBEUR_AG_GAUGE_ADDRESS,
symbol: "ibEUR",
decimals: 18,
name: "Iron Bank EUR",
Expand Down

0 comments on commit 86d67de

Please sign in to comment.