From 9a25180d7c4223252ef40554e0dd2d236ff5a2cf Mon Sep 17 00:00:00 2001 From: Adibas03 Date: Fri, 2 Mar 2018 18:24:55 +0100 Subject: [PATCH 1/3] Update values upon row change. --- app/components/TransactionScanner/TransactionRow.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/components/TransactionScanner/TransactionRow.js b/app/components/TransactionScanner/TransactionRow.js index 82883d6c..b1b8193b 100644 --- a/app/components/TransactionScanner/TransactionRow.js +++ b/app/components/TransactionScanner/TransactionRow.js @@ -53,9 +53,7 @@ class TransactionsRow extends Component { }; } - async componentDidMount() { - this._isMounted = true; - + async getUpdatedState() { const preparedState = await this.getPreparedState(); if (!this._isMounted) { @@ -65,11 +63,18 @@ class TransactionsRow extends Component { this.setState(preparedState); } + async componentDidMount() { + this._isMounted = true; + + this.getUpdatedState(); + } + async componentWillUnmount() { this._isMounted = false; } render() { + this.getUpdatedState(); const { showStatus, transaction } = this.props; const { bounty, deposit, status, time, timeWindow, value } = this.state; From 830172908cffc452eb4c95f1873e8a2ad5bcda25 Mon Sep 17 00:00:00 2001 From: Adibas03 Date: Fri, 2 Mar 2018 18:39:13 +0100 Subject: [PATCH 2/3] do the obvious --- app/components/TransactionScanner/TransactionRow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/TransactionScanner/TransactionRow.js b/app/components/TransactionScanner/TransactionRow.js index b1b8193b..2b6745c6 100644 --- a/app/components/TransactionScanner/TransactionRow.js +++ b/app/components/TransactionScanner/TransactionRow.js @@ -66,7 +66,7 @@ class TransactionsRow extends Component { async componentDidMount() { this._isMounted = true; - this.getUpdatedState(); + await this.getUpdatedState(); } async componentWillUnmount() { From 613f0541f69cbef21f83dc2fecfbaedbee52fbce Mon Sep 17 00:00:00 2001 From: Adibas03 Date: Sat, 3 Mar 2018 12:26:56 +0100 Subject: [PATCH 3/3] Isolate web3Service from windows --- app/services/web3.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/services/web3.js b/app/services/web3.js index 45af2915..93349533 100644 --- a/app/services/web3.js +++ b/app/services/web3.js @@ -124,7 +124,6 @@ export default class Web3Service { this.connectedToMetaMask = false; } - window.web3 = web3; this.web3 = web3; }