mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-27 16:31:06 +00:00
Add external coin links into a separate file
This commit is contained in:
parent
dddc354aad
commit
ed94a0dd30
@ -1,9 +1,10 @@
|
|||||||
/* @flow */
|
/* @flow */
|
||||||
|
|
||||||
import styled from 'styled-components';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { NavLink } from 'react-router-dom';
|
import { NavLink } from 'react-router-dom';
|
||||||
|
|
||||||
|
import coins from 'constants/coins';
|
||||||
|
|
||||||
import AsideDivider from './AsideDivider';
|
import AsideDivider from './AsideDivider';
|
||||||
import AsideRowCoinWallet from './AsideRowCoinWallet';
|
import AsideRowCoinWallet from './AsideRowCoinWallet';
|
||||||
import AsideRowCoinExternal from './AsideRowCoinExternal';
|
import AsideRowCoinExternal from './AsideRowCoinExternal';
|
||||||
@ -49,56 +50,24 @@ const CoinSelection = (props: Props): React$Element<string> => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const externalCoins = coins.map(coin => (
|
||||||
|
<AsideDivider
|
||||||
|
coin={{
|
||||||
|
img: coin.image,
|
||||||
|
name: coin.coinName,
|
||||||
|
}}
|
||||||
|
url={coin.url}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AsideSection>
|
<AsideSection>
|
||||||
{ walletCoins }
|
{ walletCoins }
|
||||||
<AsideDivider
|
<AsideDivider
|
||||||
textLeft={'Other coins'}
|
textLeft="Other coins"
|
||||||
textRight={'(You will be redirected)'}
|
textRight="(You will be redirected)"
|
||||||
/>
|
|
||||||
|
|
||||||
<AsideRowCoinExternal
|
|
||||||
coin={{
|
|
||||||
img: 'btc',
|
|
||||||
name: 'Bitcoin',
|
|
||||||
}}
|
|
||||||
url={'https://wallet.trezor.io/#/coin/ltc'}
|
|
||||||
/>
|
|
||||||
<AsideRowCoinExternal
|
|
||||||
coin={{
|
|
||||||
img: 'ltc',
|
|
||||||
name: 'Litecoin',
|
|
||||||
}}
|
|
||||||
url={'https://wallet.trezor.io/#/coin/ltc'}
|
|
||||||
/>
|
|
||||||
<AsideRowCoinExternal
|
|
||||||
coin={{
|
|
||||||
img: 'bch',
|
|
||||||
name: 'Bitcoin Cash',
|
|
||||||
}}
|
|
||||||
url={'https://wallet.trezor.io/#/coin/bch'}
|
|
||||||
/>
|
|
||||||
<AsideRowCoinExternal
|
|
||||||
coin={{
|
|
||||||
img: 'btg',
|
|
||||||
name: 'Bitcoin Gold',
|
|
||||||
}}
|
|
||||||
url={'https://wallet.trezor.io/#/coin/btg'}
|
|
||||||
/>
|
|
||||||
<AsideRowCoinExternal
|
|
||||||
coin={{
|
|
||||||
img: 'Dash',
|
|
||||||
name: 'Dash',
|
|
||||||
}}
|
|
||||||
url={'https://wallet.trezor.io/#/coin/dash'}
|
|
||||||
/>
|
|
||||||
<AsideRowCoinExternal
|
|
||||||
coin={{
|
|
||||||
img: 'zec',
|
|
||||||
name: 'Zcash',
|
|
||||||
}}
|
|
||||||
url={'https://wallet.trezor.io/#/coin/zec'}
|
|
||||||
/>
|
/>
|
||||||
|
{ externalCoins }
|
||||||
</AsideSection>
|
</AsideSection>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
32
src/js/constants/coins.js
Normal file
32
src/js/constants/coins.js
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
export default [
|
||||||
|
{
|
||||||
|
coinName: 'Bitcoin',
|
||||||
|
url: 'https://wallet.trezor.io/#/coin/btc',
|
||||||
|
image: '../images/btc-logo.png',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
coinName: 'Litecoin',
|
||||||
|
url: 'https://wallet.trezor.io/#/coin/ltc',
|
||||||
|
image: '../images/ltc-logo.png',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
coinName: 'Bitcoin Cash',
|
||||||
|
url: 'https://wallet.trezor.io/#/coin/bch',
|
||||||
|
image: '../images/bch-logo.png',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
coinName: 'Bitcoin Gold',
|
||||||
|
url: 'https://wallet.trezor.io/#/coin/btg',
|
||||||
|
image: '../images/btg-logo.png',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
coinName: 'Dash',
|
||||||
|
url: 'https://wallet.trezor.io/#/coin/dash',
|
||||||
|
image: '../images/dash-logo.png',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
coinName: 'Zcash',
|
||||||
|
url: 'https://wallet.trezor.io/#/coin/zec',
|
||||||
|
image: '../images/zec-logo.png',
|
||||||
|
},
|
||||||
|
];
|
Loading…
Reference in New Issue
Block a user