aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-07-06 00:29:25 +0800
committerGitHub <noreply@github.com>2018-07-06 00:29:25 +0800
commite59e92e028d3c133a15522304b172e326af1ee6b (patch)
treeb6b30ccfece6194ce23871961f738b95ddb6946b /ui
parent3c75be04a05e74e456c00e3adb9c538741f41dbc (diff)
parent2298daa53e56c197d4a16273e432da785c89f673 (diff)
downloadtangerine-wallet-browser-e59e92e028d3c133a15522304b172e326af1ee6b.tar
tangerine-wallet-browser-e59e92e028d3c133a15522304b172e326af1ee6b.tar.gz
tangerine-wallet-browser-e59e92e028d3c133a15522304b172e326af1ee6b.tar.bz2
tangerine-wallet-browser-e59e92e028d3c133a15522304b172e326af1ee6b.tar.lz
tangerine-wallet-browser-e59e92e028d3c133a15522304b172e326af1ee6b.tar.xz
tangerine-wallet-browser-e59e92e028d3c133a15522304b172e326af1ee6b.tar.zst
tangerine-wallet-browser-e59e92e028d3c133a15522304b172e326af1ee6b.zip
Merge pull request #4734 from whymarrh/txlistitem-setstate-warning
Prevent calling setState in TxListItem after unmount
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/tx-list-item.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/app/components/tx-list-item.js b/ui/app/components/tx-list-item.js
index 9a2fb5311..e539514ec 100644
--- a/ui/app/components/tx-list-item.js
+++ b/ui/app/components/tx-list-item.js
@@ -54,6 +54,8 @@ function TxListItem () {
fiatTotal: null,
isTokenTx: null,
}
+
+ this.unmounted = false
}
TxListItem.prototype.componentDidMount = async function () {
@@ -67,9 +69,16 @@ TxListItem.prototype.componentDidMount = async function () {
? await this.getSendTokenTotal()
: this.getSendEtherTotal()
+ if (this.unmounted) {
+ return
+ }
this.setState({ total, fiatTotal, isTokenTx })
}
+TxListItem.prototype.componentWillUnmount = function () {
+ this.unmounted = true
+}
+
TxListItem.prototype.getAddressText = function () {
const {
address,