1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Checksum address before slicing it for the confirm screen (#6133)

This commit is contained in:
Whymarrh Whitby 2019-02-14 10:43:12 -03:30 committed by GitHub
parent 8dddf48904
commit 1d8d129305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)