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