From 222c5debf375a4768f61752e0de6c8bd735e6dee Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Wed, 14 Sep 2022 13:05:33 -0230 Subject: [PATCH] Ensure chainId is defined in validateRecipientUserInput in send-duck (#15822) --- ui/ducks/send/send.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/ducks/send/send.js b/ui/ducks/send/send.js index e224b1801..fa6b0a21c 100644 --- a/ui/ducks/send/send.js +++ b/ui/ducks/send/send.js @@ -2190,12 +2190,14 @@ export function useMyAccountsForRecipientSearch() { * @returns {ThunkAction} */ 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 })); }; }