diff --git a/.eslintrc b/.eslintrc index 6bc0340c..853370ab 100644 --- a/.eslintrc +++ b/.eslintrc @@ -9,6 +9,7 @@ "jest": true }, "rules": { + "class-methods-use-this": 0, "react/require-default-props": 0, "react/forbid-prop-types": 0, "react/destructuring-assignment": 0, diff --git a/src/js/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js b/src/js/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js index 27b71639..f3a48ce1 100644 --- a/src/js/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js +++ b/src/js/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js @@ -22,33 +22,33 @@ 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 ( - {config.coins.map((item) => { - let imgName = item.network; - if (item.network === 'ethereum') { - imgName = 'eth'; - } else if (item.network === 'ethereum-classic') { - imgName = 'etc'; - } - const imgUrl = `../images/${imgName}-logo.png`; - - return ( - - - - ); - })} + {config.coins.map(item => ( + + + + ))}