1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01: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 seaona
parent 7054dd6694
commit 222c5debf3

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 }));
};
}