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

Only use current network txs when calculating "Reject All"

This commit is contained in:
Whymarrh Whitby 2018-10-01 14:04:50 -02:30
parent e351a7dd74
commit 65ba018aad

View File

@ -53,6 +53,7 @@ const mapStateToProps = (state, props) => {
selectedAddress, selectedAddress,
selectedAddressTxList, selectedAddressTxList,
assetImages, assetImages,
network,
unapprovedTxs, unapprovedTxs,
} = metamask } = metamask
const assetImage = assetImages[txParamsToAddress] const assetImage = assetImages[txParamsToAddress]
@ -68,7 +69,11 @@ const mapStateToProps = (state, props) => {
const transaction = R.find(({ id }) => id === transactionId)(selectedAddressTxList) const transaction = R.find(({ id }) => id === transactionId)(selectedAddressTxList)
const transactionStatus = transaction ? transaction.status : '' const transactionStatus = transaction ? transaction.status : ''
const unapprovedTxCount = valuesFor(unapprovedTxs).length const currentNetworkUnapprovedTxs = R.filter(
({ metamaskNetworkId }) => metamaskNetworkId === network,
valuesFor(unapprovedTxs),
)
const unapprovedTxCount = currentNetworkUnapprovedTxs.length
return { return {
balance, balance,