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:
parent
7054dd6694
commit
222c5debf3
@ -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…
Reference in New Issue
Block a user