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:
parent
f0bf6eb277
commit
445a1a07bb
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user