1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-23 23:48:07 +00:00

Update "RowCoin" declaration to its actual props

This commit is contained in:
Vasek Mlejnsky 2018-08-27 10:47:28 +02:00
parent f0bf6eb277
commit 445a1a07bb
2 changed files with 3 additions and 20 deletions

View File

@ -291,19 +291,12 @@ const AccountMenu = (props: Props): ?React$Element<string> => {
let backButton = null;
if (selectedCoin) {
let imgName = selectedCoin.network;
if (selectedCoin.network === 'ethereum') {
imgName = 'eth';
} else if (selectedCoin.network === 'ethereum-classic') {
imgName = 'etc';
}
const imgUrl = `../images/${imgName}-logo.png`;
backButton = (
<NavLink to={baseUrl}>
<RowCoin
coin={{
img: imgUrl,
name: selectedCoin.name,
network: selectedCoin.network,
}}
iconLeft={{
type: ICONS.ARROW_LEFT,

View File

@ -24,16 +24,6 @@ class CoinMenu extends Component {
return baseUrl;
}
getImgUrl(network) {
let imgName = network;
if (network === 'ethereum') {
imgName = 'eth';
} else if (network === 'ethereum-classic') {
imgName = 'etc';
}
return `../images/${imgName}-logo.png`;
}
render() {
const { config } = this.props.localStorage;
return (
@ -45,8 +35,8 @@ class CoinMenu extends Component {
>
<RowCoin
coin={{
img: this.getImgUrl(item.network),
name: item.name,
network: item.network,
}}
/>
</NavLink>
@ -61,8 +51,8 @@ class CoinMenu extends Component {
<a key={coin.url} href={coin.url}>
<RowCoin
coin={{
img: coin.image,
name: coin.coinName,
img: coin.image,
}}
iconRight={{
type: ICONS.SKIP,