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:
parent
ae1ed7079f
commit
f1750d2807
@ -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>
|
||||
|
@ -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 = ''
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user