1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Remove unnecessary variables for state and props (#8144)

The use of these variables confuses the ESLint plugin I use for VSCode.
It's also not useful.
This commit is contained in:
Mark Stacey 2020-03-01 06:14:07 -04:00 committed by GitHub
parent ae1ed7079f
commit f1750d2807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 7 deletions

View File

@ -126,7 +126,6 @@ class NetworkDropdown extends Component {
}
renderCommonRpc (rpcListDetail, provider) {
const props = this.props
const reversedRpcListDetail = rpcListDetail.slice().reverse()
return reversedRpcListDetail.map((entry) => {
@ -143,7 +142,7 @@ class NetworkDropdown extends Component {
<DropdownMenuItem
key={`common${rpc}`}
closeMenu={() => this.props.hideNetworkDropdown()}
onClick={() => props.setRpcTarget(rpc, chainId, ticker, nickname)}
onClick={() => this.props.setRpcTarget(rpc, chainId, ticker, nickname)}
style={{
fontSize: '16px',
lineHeight: '20px',
@ -170,7 +169,7 @@ class NetworkDropdown extends Component {
className="fa fa-times delete"
onClick={(e) => {
e.stopPropagation()
props.delRpcTarget(rpc)
this.props.delRpcTarget(rpc)
}}
/>
</DropdownMenuItem>

View File

@ -48,7 +48,6 @@ export default class TokenCell extends Component {
render () {
const { tokenMenuOpen } = this.state
const props = this.props
const {
address,
symbol,
@ -62,7 +61,7 @@ export default class TokenCell extends Component {
sidebarOpen,
currentCurrency,
image,
} = props
} = this.props
let currentTokenToFiatRate
let currentTokenInFiat
let formattedFiat = ''

View File

@ -132,8 +132,7 @@ class TokenList extends Component {
render () {
const { userAddress, assetImages } = this.props
const state = this.state
const { tokens, isLoading, error } = state
const { tokens, isLoading, error } = this.state
if (isLoading) {
return (
<div