1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-25 00:18: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; let backButton = null;
if (selectedCoin) { 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 = ( backButton = (
<NavLink to={baseUrl}> <NavLink to={baseUrl}>
<RowCoin <RowCoin
coin={{ coin={{
img: imgUrl,
name: selectedCoin.name, name: selectedCoin.name,
network: selectedCoin.network,
}} }}
iconLeft={{ iconLeft={{
type: ICONS.ARROW_LEFT, type: ICONS.ARROW_LEFT,

View File

@ -24,16 +24,6 @@ class CoinMenu extends Component {
return baseUrl; 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() { render() {
const { config } = this.props.localStorage; const { config } = this.props.localStorage;
return ( return (
@ -45,8 +35,8 @@ class CoinMenu extends Component {
> >
<RowCoin <RowCoin
coin={{ coin={{
img: this.getImgUrl(item.network),
name: item.name, name: item.name,
network: item.network,
}} }}
/> />
</NavLink> </NavLink>
@ -61,8 +51,8 @@ class CoinMenu extends Component {
<a key={coin.url} href={coin.url}> <a key={coin.url} href={coin.url}>
<RowCoin <RowCoin
coin={{ coin={{
img: coin.image,
name: coin.coinName, name: coin.coinName,
img: coin.image,
}} }}
iconRight={{ iconRight={{
type: ICONS.SKIP, type: ICONS.SKIP,