From 21b6a3442d8cae8c95a3d7e0b9e216d91bc8bd19 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 28 Mar 2018 10:51:16 -0230 Subject: Fix display of unapprovedMessages in txList (old and new ui); includes fix of undefined txParams. --- ui/app/components/tx-list-item.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'ui/app/components/tx-list-item.js') diff --git a/ui/app/components/tx-list-item.js b/ui/app/components/tx-list-item.js index 5e88d38d3..a411edd89 100644 --- a/ui/app/components/tx-list-item.js +++ b/ui/app/components/tx-list-item.js @@ -62,20 +62,23 @@ 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.props.t('contractDeployment') + let addressText + if (txDataName === 'transfer' || address) { + addressText = `${value.slice(0, 10)}...${value.slice(-4)}` + } else if (isMsg) { + addressText = this.props.t('sigRequest') + } else { + addressText = this.props.t('contractDeployment') } + + return addressText } TxListItem.prototype.getSendEtherTotal = function () { @@ -185,6 +188,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') -- cgit From 01e3293b65bb153325479f7366113e037fee659b Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 29 Mar 2018 10:32:30 -0230 Subject: Ensure correct address used when rendering transfer transactions. --- ui/app/components/tx-list-item.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/app/components/tx-list-item.js') diff --git a/ui/app/components/tx-list-item.js b/ui/app/components/tx-list-item.js index a411edd89..116813547 100644 --- a/ui/app/components/tx-list-item.js +++ b/ui/app/components/tx-list-item.js @@ -71,7 +71,8 @@ TxListItem.prototype.getAddressText = function () { let addressText if (txDataName === 'transfer' || address) { - addressText = `${value.slice(0, 10)}...${value.slice(-4)}` + const addressToRender = txDataName === 'transfer' ? value : address + addressText = `${addressToRender.slice(0, 10)}...${addressToRender.slice(-4)}` } else if (isMsg) { addressText = this.props.t('sigRequest') } else { -- cgit