diff --git a/ui/pages/send/send-content/add-recipient/ens-input.component.js b/ui/pages/send/send-content/add-recipient/ens-input.component.js index 4cf63a7fab48..a8ae4943982b 100644 --- a/ui/pages/send/send-content/add-recipient/ens-input.component.js +++ b/ui/pages/send/send-content/add-recipient/ens-input.component.js @@ -2,6 +2,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; +import { addHexPrefix } from '../../../../../app/scripts/lib/util'; import { isValidDomainName } from '../../../../helpers/utils/util'; import { isBurnAddress, @@ -36,6 +37,7 @@ export default class EnsInput extends Component { onPaste = (event) => { if (event.clipboardData.items?.length) { + event.preventDefault(); const clipboardItem = event.clipboardData.items[0]; clipboardItem?.getAsString((text) => { const input = text.trim(); @@ -43,7 +45,7 @@ export default class EnsInput extends Component { !isBurnAddress(input) && isValidHexAddress(input, { mixedCaseUseChecksum: true }) ) { - this.props.onPaste(input); + this.props.onPaste(addHexPrefix(input)); } }); } @@ -74,7 +76,7 @@ export default class EnsInput extends Component { !isBurnAddress(input) && isValidHexAddress(input, { mixedCaseUseChecksum: true }) ) { - onValidAddressTyped(input); + onValidAddressTyped(addHexPrefix(input)); } }