Skip to content

Commit

Permalink
Checksum address before slicing it for the confirm screen
Browse files Browse the repository at this point in the history
  • Loading branch information
whymarrh committed Feb 13, 2019
1 parent f7ab457 commit eb47036
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit eb47036

Please sign in to comment.