diff options
author | kumavis <aaron@kumavis.me> | 2018-04-03 05:13:45 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2018-04-03 05:13:45 +0800 |
commit | 98e0fc1ab95c17b9ea19eed04b1e60dc9ea9dccb (patch) | |
tree | 23176562ed22c97daa13f4f8f1081b581f2ba2b1 /ui/app/components/tx-list-item.js | |
parent | 8db097d8d9307bc7a0bbb0cd802ad30ad0fc2740 (diff) | |
parent | fd30fabfbd7707adf2e4bc3606362c1687aeed9a (diff) | |
download | tangerine-wallet-browser-98e0fc1ab95c17b9ea19eed04b1e60dc9ea9dccb.tar.gz tangerine-wallet-browser-98e0fc1ab95c17b9ea19eed04b1e60dc9ea9dccb.tar.zst tangerine-wallet-browser-98e0fc1ab95c17b9ea19eed04b1e60dc9ea9dccb.zip |
Merge branch 'master' of github.com:MetaMask/metamask-extension into ci-screens
Diffstat (limited to 'ui/app/components/tx-list-item.js')
-rw-r--r-- | ui/app/components/tx-list-item.js | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/ui/app/components/tx-list-item.js b/ui/app/components/tx-list-item.js index 622664786..42c008798 100644 --- a/ui/app/components/tx-list-item.js +++ b/ui/app/components/tx-list-item.js @@ -68,20 +68,24 @@ TxListItem.prototype.getAddressText = function () { const { address, txParams = {}, + isMsg, } = this.props const decodedData = txParams.data && abiDecoder.decodeMethod(txParams.data) const { name: txDataName, params = [] } = decodedData || {} const { value } = params[0] || {} - switch (txDataName) { - case 'transfer': - return `${value.slice(0, 10)}...${value.slice(-4)}` - default: - return address - ? `${address.slice(0, 10)}...${address.slice(-4)}` - : this.context.t('contractDeployment') + let addressText + if (txDataName === 'transfer' || address) { + const addressToRender = txDataName === 'transfer' ? value : address + addressText = `${addressToRender.slice(0, 10)}...${addressToRender.slice(-4)}` + } else if (isMsg) { + addressText = this.context.t('sigRequest') + } else { + addressText = this.context.t('contractDeployment') } + + return addressText } TxListItem.prototype.getSendEtherTotal = function () { @@ -191,6 +195,9 @@ TxListItem.prototype.showRetryButton = function () { transactionId, txParams, } = this.props + if (!txParams) { + return false + } const currentNonce = txParams.nonce const currentNonceTxs = selectedAddressTxList.filter(tx => tx.txParams.nonce === currentNonce) const currentNonceSubmittedTxs = currentNonceTxs.filter(tx => tx.status === 'submitted') |