diff options
author | Thomas <thomas.b.huang@gmail.com> | 2018-07-26 13:38:44 +0800 |
---|---|---|
committer | Thomas <thomas.b.huang@gmail.com> | 2018-07-26 13:38:44 +0800 |
commit | 138858647ed28a8aaba4b7e18e387ea0b6af0889 (patch) | |
tree | 0bc936ee7316112d01e617a246a645e3914da949 /ui/app/components/tx-list-item.js | |
parent | fa02a6c7c65f6866998171881fd657570fe3fe7b (diff) | |
parent | a5d344a58223e029dc86bf33a8ca9357492765f3 (diff) | |
download | tangerine-wallet-browser-138858647ed28a8aaba4b7e18e387ea0b6af0889.tar.gz tangerine-wallet-browser-138858647ed28a8aaba4b7e18e387ea0b6af0889.tar.zst tangerine-wallet-browser-138858647ed28a8aaba4b7e18e387ea0b6af0889.zip |
Merge branch 'develop' into network-remove-provider-engine
Diffstat (limited to 'ui/app/components/tx-list-item.js')
-rw-r--r-- | ui/app/components/tx-list-item.js | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/ui/app/components/tx-list-item.js b/ui/app/components/tx-list-item.js index 9a2fb5311..0d693b805 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, @@ -298,20 +307,16 @@ TxListItem.prototype.render = function () { ]), ]), - this.showRetryButton() && h('div.tx-list-item-retry-container', [ - - h('span.tx-list-item-retry-copy', 'Taking too long?'), - - h('span.tx-list-item-retry-link', { - onClick: (event) => { - event.stopPropagation() - if (isTokenTx) { - this.setSelectedToken(txParams.to) - } - this.resubmit() - }, - }, 'Increase the gas price on your transaction'), - + this.showRetryButton() && h('.tx-list-item-retry-container', { + onClick: (event) => { + event.stopPropagation() + if (isTokenTx) { + this.setSelectedToken(txParams.to) + } + this.resubmit() + }, + }, [ + h('span', 'Taking too long? Increase the gas price on your transaction'), ]), ]), // holding on icon from design |