1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

Ensure chainId is defined in validateRecipientUserInput in send-duck (#15822)

This commit is contained in:
Dan J Miller 2022-09-14 13:05:33 -02:30 committed by GitHub
parent b359844dc5
commit 17855b5df8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2190,12 +2190,14 @@ export function useMyAccountsForRecipientSearch() {
* @returns {ThunkAction<void>}
*/
export function resetRecipientInput() {
return async (dispatch) => {
return async (dispatch, getState) => {
const state = getState();
const chainId = getCurrentChainId(state);
await dispatch(addHistoryEntry(`sendFlow - user cleared recipient input`));
await dispatch(updateRecipientUserInput(''));
await dispatch(updateRecipient({ address: '', nickname: '' }));
await dispatch(resetEnsResolution());
await dispatch(validateRecipientUserInput());
await dispatch(validateRecipientUserInput({ chainId }));
};
}