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) {
|
renderCommonRpc (rpcListDetail, provider) {
|
||||||
const props = this.props
|
|
||||||
const reversedRpcListDetail = rpcListDetail.slice().reverse()
|
const reversedRpcListDetail = rpcListDetail.slice().reverse()
|
||||||
|
|
||||||
return reversedRpcListDetail.map((entry) => {
|
return reversedRpcListDetail.map((entry) => {
|
||||||
@ -143,7 +142,7 @@ class NetworkDropdown extends Component {
|
|||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
key={`common${rpc}`}
|
key={`common${rpc}`}
|
||||||
closeMenu={() => this.props.hideNetworkDropdown()}
|
closeMenu={() => this.props.hideNetworkDropdown()}
|
||||||
onClick={() => props.setRpcTarget(rpc, chainId, ticker, nickname)}
|
onClick={() => this.props.setRpcTarget(rpc, chainId, ticker, nickname)}
|
||||||
style={{
|
style={{
|
||||||
fontSize: '16px',
|
fontSize: '16px',
|
||||||
lineHeight: '20px',
|
lineHeight: '20px',
|
||||||
@ -170,7 +169,7 @@ class NetworkDropdown extends Component {
|
|||||||
className="fa fa-times delete"
|
className="fa fa-times delete"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
props.delRpcTarget(rpc)
|
this.props.delRpcTarget(rpc)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
@ -48,7 +48,6 @@ export default class TokenCell extends Component {
|
|||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { tokenMenuOpen } = this.state
|
const { tokenMenuOpen } = this.state
|
||||||
const props = this.props
|
|
||||||
const {
|
const {
|
||||||
address,
|
address,
|
||||||
symbol,
|
symbol,
|
||||||
@ -62,7 +61,7 @@ export default class TokenCell extends Component {
|
|||||||
sidebarOpen,
|
sidebarOpen,
|
||||||
currentCurrency,
|
currentCurrency,
|
||||||
image,
|
image,
|
||||||
} = props
|
} = this.props
|
||||||
let currentTokenToFiatRate
|
let currentTokenToFiatRate
|
||||||
let currentTokenInFiat
|
let currentTokenInFiat
|
||||||
let formattedFiat = ''
|
let formattedFiat = ''
|
||||||
|
@ -132,8 +132,7 @@ class TokenList extends Component {
|
|||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { userAddress, assetImages } = this.props
|
const { userAddress, assetImages } = this.props
|
||||||
const state = this.state
|
const { tokens, isLoading, error } = this.state
|
||||||
const { tokens, isLoading, error } = state
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
Loading…
Reference in New Issue
Block a user