From d017c2844165939f41613e1ae6141c8531422c44 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 27 Apr 2016 18:04:33 -0700 Subject: Filter transaction list for current blockchain network When starting up, we now create a `web3` inside the `background.js` process, which we pass to the `idStore` and ask for the current `network`. We include the `network` on `app.metamask.network` in the state object. We re-request the network when changing provider. We filter the transaction list for transactions that match the current network. --- ui/app/account-detail.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/app/account-detail.js') diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js index 57f932a2b..250e7318c 100644 --- a/ui/app/account-detail.js +++ b/ui/app/account-detail.js @@ -16,7 +16,7 @@ function mapStateToProps(state) { address: state.appState.currentView.context, accountDetail: state.appState.accountDetail, transactions: state.metamask.transactions, - networkVersion: state.networkVersion, + networkVersion: state.metamask.network, } } @@ -79,6 +79,7 @@ AccountDetailScreen.prototype.render = function() { transactionList(transactions .filter(tx => tx.txParams.from === state.address) + .filter(tx => tx.txParams.metamaskNetworkId === state.networkVersion) .sort((a, b) => b.time - a.time), state.networkVersion), this.exportedAccount(accountDetail), -- cgit v1.2.3