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 {
|
export default class TransactionListItem extends PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
history: PropTypes.object,
|
history: PropTypes.object,
|
||||||
methodData: PropTypes.object,
|
|
||||||
transaction: PropTypes.object,
|
transaction: PropTypes.object,
|
||||||
ethTransactionAmount: PropTypes.string,
|
ethTransactionAmount: PropTypes.string,
|
||||||
fiatDisplayValue: PropTypes.string,
|
fiatDisplayValue: PropTypes.string,
|
||||||
@ -32,11 +31,7 @@ export default class TransactionListItem extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const {
|
const { transaction, ethTransactionAmount, fiatDisplayValue } = this.props
|
||||||
transaction,
|
|
||||||
ethTransactionAmount,
|
|
||||||
fiatDisplayValue,
|
|
||||||
} = this.props
|
|
||||||
const { txParams = {} } = transaction
|
const { txParams = {} } = transaction
|
||||||
const nonce = hexToDecimal(txParams.nonce)
|
const nonce = hexToDecimal(txParams.nonce)
|
||||||
|
|
||||||
|
@ -30,14 +30,12 @@ export default class TransactionList extends PureComponent {
|
|||||||
{ `${t('queue')} (${pendingTransactions.length})` }
|
{ `${t('queue')} (${pendingTransactions.length})` }
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
pendingTransactions.map(transaction => {
|
pendingTransactions.map(transaction => (
|
||||||
return (
|
<TransactionListItem
|
||||||
<TransactionListItem
|
transaction={transaction}
|
||||||
transaction={transaction}
|
key={transaction.id}
|
||||||
key={transaction.id}
|
/>
|
||||||
/>
|
))
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
@ -48,16 +46,12 @@ export default class TransactionList extends PureComponent {
|
|||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
completedTransactions.length > 0
|
completedTransactions.length > 0
|
||||||
? (
|
? completedTransactions.map(transaction => (
|
||||||
completedTransactions.map(transaction => {
|
<TransactionListItem
|
||||||
return (
|
transaction={transaction}
|
||||||
<TransactionListItem
|
key={transaction.id}
|
||||||
transaction={transaction}
|
/>
|
||||||
key={transaction.id}
|
))
|
||||||
/>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
)
|
|
||||||
: this.renderEmpty()
|
: this.renderEmpty()
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@ -78,12 +72,7 @@ export default class TransactionList extends PureComponent {
|
|||||||
render () {
|
render () {
|
||||||
return (
|
return (
|
||||||
<div className="transaction-list">
|
<div className="transaction-list">
|
||||||
{
|
{ this.renderTransactions() }
|
||||||
this.renderTransactions()
|
|
||||||
// pendingTransactions.length + completedTransactions.length > 0
|
|
||||||
// ? this.renderTransactions()
|
|
||||||
// : this.renderEmpty()
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user