mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fixing hex address display bug when editing transaction (#15873)
This commit is contained in:
parent
b5049a1736
commit
c8935c6951
@ -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, {
|
||||
|
@ -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,
|
||||
},
|
||||
|
@ -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,
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user