diff --git a/ui/ducks/send/send.js b/ui/ducks/send/send.js index 810261749..37f7e0bf6 100644 --- a/ui/ducks/send/send.js +++ b/ui/ducks/send/send.js @@ -1714,8 +1714,10 @@ export function editExistingTransaction(assetType, transactionId) { ...draftTransactionInitialState.recipient, address: transaction.txParams.to, nickname: - getAddressBookEntryOrAccountName(state, transaction.txParams.to) - ?.name ?? '', + getAddressBookEntryOrAccountName( + state, + transaction.txParams.to, + ) ?? '', }, amount: { ...draftTransactionInitialState.amount, @@ -1739,8 +1741,7 @@ export function editExistingTransaction(assetType, transactionId) { const tokenAmountInDec = assetType === ASSET_TYPES.TOKEN ? getTokenValueParam(tokenData) : '1'; const address = getTokenAddressParam(tokenData); - const nickname = - getAddressBookEntryOrAccountName(state, address)?.name ?? ''; + const nickname = getAddressBookEntryOrAccountName(state, address) ?? ''; const tokenAmountInHex = addHexPrefix( conversionUtil(tokenAmountInDec, { diff --git a/ui/ducks/send/send.test.js b/ui/ducks/send/send.test.js index ce24e0f25..20e11f509 100644 --- a/ui/ducks/send/send.test.js +++ b/ui/ducks/send/send.test.js @@ -2460,7 +2460,7 @@ describe('Send Slice', () => { recipient: { address: '0xRecipientAddress', error: null, - nickname: '', + nickname: '0xRecipientAddress', warning: null, recipientWarningAcknowledged: false, type: '', @@ -2605,7 +2605,7 @@ describe('Send Slice', () => { recipient: { address: BURN_ADDRESS, error: null, - nickname: '', + nickname: BURN_ADDRESS, warning: null, type: '', recipientWarningAcknowledged: false, @@ -2797,7 +2797,7 @@ describe('Send Slice', () => { address: BURN_ADDRESS, error: null, warning: null, - nickname: '', + nickname: BURN_ADDRESS, type: '', recipientWarningAcknowledged: false, }, diff --git a/ui/pages/send/send-content/add-recipient/add-recipient.component.js b/ui/pages/send/send-content/add-recipient/add-recipient.component.js index efe1070eb..71f922db5 100644 --- a/ui/pages/send/send-content/add-recipient/add-recipient.component.js +++ b/ui/pages/send/send-content/add-recipient/add-recipient.component.js @@ -28,7 +28,7 @@ export default class AddRecipient extends Component { isUsingMyAccountsForRecipientSearch: PropTypes.bool, recipient: PropTypes.shape({ address: PropTypes.string, - nickname: PropTypes.nickname, + nickname: PropTypes.string, error: PropTypes.string, warning: PropTypes.string, }),