From ed94a0dd307b1382c09cf77e26ba757fc28c755c Mon Sep 17 00:00:00 2001 From: Vasek Mlejnsky Date: Wed, 15 Aug 2018 15:24:57 +0200 Subject: [PATCH] Add external coin links into a separate file --- .../components/wallet/aside/CoinSelection.js | 61 +++++-------------- src/js/constants/coins.js | 32 ++++++++++ 2 files changed, 47 insertions(+), 46 deletions(-) create mode 100644 src/js/constants/coins.js diff --git a/src/js/components/wallet/aside/CoinSelection.js b/src/js/components/wallet/aside/CoinSelection.js index 561c8233..dff99a4b 100644 --- a/src/js/components/wallet/aside/CoinSelection.js +++ b/src/js/components/wallet/aside/CoinSelection.js @@ -1,9 +1,10 @@ /* @flow */ -import styled from 'styled-components'; import React from 'react'; import { NavLink } from 'react-router-dom'; +import coins from 'constants/coins'; + import AsideDivider from './AsideDivider'; import AsideRowCoinWallet from './AsideRowCoinWallet'; import AsideRowCoinExternal from './AsideRowCoinExternal'; @@ -49,56 +50,24 @@ const CoinSelection = (props: Props): React$Element => { ); }); + const externalCoins = coins.map(coin => ( + + )); + return ( { walletCoins } - - - - - - - + { externalCoins } ); }; diff --git a/src/js/constants/coins.js b/src/js/constants/coins.js new file mode 100644 index 00000000..cfdd9d26 --- /dev/null +++ b/src/js/constants/coins.js @@ -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', + }, +];