mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Code cleanup
This commit is contained in:
parent
5de48c67a0
commit
fa8313f903
@ -12,7 +12,6 @@ import { hexToDecimal } from '../../helpers/conversions.util'
|
||||
export default class TransactionListItem extends PureComponent {
|
||||
static propTypes = {
|
||||
history: PropTypes.object,
|
||||
methodData: PropTypes.object,
|
||||
transaction: PropTypes.object,
|
||||
ethTransactionAmount: PropTypes.string,
|
||||
fiatDisplayValue: PropTypes.string,
|
||||
@ -32,11 +31,7 @@ export default class TransactionListItem extends PureComponent {
|
||||
}
|
||||
|
||||
render () {
|
||||
const {
|
||||
transaction,
|
||||
ethTransactionAmount,
|
||||
fiatDisplayValue,
|
||||
} = this.props
|
||||
const { transaction, ethTransactionAmount, fiatDisplayValue } = this.props
|
||||
const { txParams = {} } = transaction
|
||||
const nonce = hexToDecimal(txParams.nonce)
|
||||
|
||||
|
@ -30,14 +30,12 @@ export default class TransactionList extends PureComponent {
|
||||
{ `${t('queue')} (${pendingTransactions.length})` }
|
||||
</div>
|
||||
{
|
||||
pendingTransactions.map(transaction => {
|
||||
return (
|
||||
<TransactionListItem
|
||||
transaction={transaction}
|
||||
key={transaction.id}
|
||||
/>
|
||||
)
|
||||
})
|
||||
pendingTransactions.map(transaction => (
|
||||
<TransactionListItem
|
||||
transaction={transaction}
|
||||
key={transaction.id}
|
||||
/>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
)
|
||||
@ -48,16 +46,12 @@ export default class TransactionList extends PureComponent {
|
||||
</div>
|
||||
{
|
||||
completedTransactions.length > 0
|
||||
? (
|
||||
completedTransactions.map(transaction => {
|
||||
return (
|
||||
<TransactionListItem
|
||||
transaction={transaction}
|
||||
key={transaction.id}
|
||||
/>
|
||||
)
|
||||
})
|
||||
)
|
||||
? completedTransactions.map(transaction => (
|
||||
<TransactionListItem
|
||||
transaction={transaction}
|
||||
key={transaction.id}
|
||||
/>
|
||||
))
|
||||
: this.renderEmpty()
|
||||
}
|
||||
</div>
|
||||
@ -78,12 +72,7 @@ export default class TransactionList extends PureComponent {
|
||||
render () {
|
||||
return (
|
||||
<div className="transaction-list">
|
||||
{
|
||||
this.renderTransactions()
|
||||
// pendingTransactions.length + completedTransactions.length > 0
|
||||
// ? this.renderTransactions()
|
||||
// : this.renderEmpty()
|
||||
}
|
||||
{ this.renderTransactions() }
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user