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

feature/default_network_editable
Dan J Miller 2 years ago committed by seaona
parent 7054dd6694
commit 222c5debf3
  1. 6
      ui/ducks/send/send.js

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

Loading…
Cancel
Save