aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-02-14 22:13:12 +0800
committerGitHub <noreply@github.com>2019-02-14 22:13:12 +0800
commit1d8d129305da747b9d8232dd4a1a8d417e36fe15 (patch)
tree9aace544e5747214bd259c9a53918ac1389db23a
parent8dddf48904323d47685516ccc76f9e267dbd188a (diff)
downloadtangerine-wallet-browser-1d8d129305da747b9d8232dd4a1a8d417e36fe15.tar
tangerine-wallet-browser-1d8d129305da747b9d8232dd4a1a8d417e36fe15.tar.gz
tangerine-wallet-browser-1d8d129305da747b9d8232dd4a1a8d417e36fe15.tar.bz2
tangerine-wallet-browser-1d8d129305da747b9d8232dd4a1a8d417e36fe15.tar.lz
tangerine-wallet-browser-1d8d129305da747b9d8232dd4a1a8d417e36fe15.tar.xz
tangerine-wallet-browser-1d8d129305da747b9d8232dd4a1a8d417e36fe15.tar.zst
tangerine-wallet-browser-1d8d129305da747b9d8232dd4a1a8d417e36fe15.zip
Checksum address before slicing it for the confirm screen (#6133)
-rw-r--r--ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js
index 669462ba5..e11b35459 100644
--- a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js
+++ b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js
@@ -17,7 +17,7 @@ import { getHexGasTotal } from '../../../helpers/confirm-transaction/util'
import { isBalanceSufficient, calcGasTotal } from '../../send/send.utils'
import { conversionGreaterThan } from '../../../conversion-util'
import { MIN_GAS_LIMIT_DEC } from '../../send/send.constants'
-import { addressSlicer, valuesFor } from '../../../util'
+import { checksumAddress, addressSlicer, valuesFor } from '../../../util'
import { getMetaMaskAccounts, getAdvancedInlineGasShown } from '../../../selectors'
const casedContractMap = Object.keys(contractMap).reduce((acc, base) => {
@@ -77,7 +77,11 @@ const mapStateToProps = (state, props) => {
const toAddress = propsToAddress || txParamsToAddress
const toName = identities[toAddress]
? identities[toAddress].name
- : casedContractMap[toAddress] ? casedContractMap[toAddress].name : addressSlicer(toAddress)
+ : (
+ casedContractMap[toAddress]
+ ? casedContractMap[toAddress].name
+ : addressSlicer(checksumAddress(toAddress))
+ )
const isTxReprice = Boolean(lastGasPrice)