mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Ensure that if max is selected in send flow, the correct value is set after network switch (#15444)
This commit is contained in:
parent
b6d587223b
commit
d5b95d6e44
@ -1565,6 +1565,9 @@ const slice = createSlice({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (state.amountMode === AMOUNT_MODES.MAX) {
|
||||||
|
slice.caseReducers.updateAmountToMax(state);
|
||||||
|
}
|
||||||
slice.caseReducers.validateAmountField(state);
|
slice.caseReducers.validateAmountField(state);
|
||||||
slice.caseReducers.validateGasField(state);
|
slice.caseReducers.validateGasField(state);
|
||||||
slice.caseReducers.validateSendState(state);
|
slice.caseReducers.validateSendState(state);
|
||||||
|
@ -1442,6 +1442,10 @@ export function updateMetamaskState(newState) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
dispatch({
|
||||||
|
type: actionConstants.UPDATE_METAMASK_STATE,
|
||||||
|
value: newState,
|
||||||
|
});
|
||||||
if (provider.chainId !== newProvider.chainId) {
|
if (provider.chainId !== newProvider.chainId) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: actionConstants.CHAIN_CHANGED,
|
type: actionConstants.CHAIN_CHANGED,
|
||||||
@ -1453,10 +1457,6 @@ export function updateMetamaskState(newState) {
|
|||||||
// progress.
|
// progress.
|
||||||
dispatch(initializeSendState({ chainHasChanged: true }));
|
dispatch(initializeSendState({ chainHasChanged: true }));
|
||||||
}
|
}
|
||||||
dispatch({
|
|
||||||
type: actionConstants.UPDATE_METAMASK_STATE,
|
|
||||||
value: newState,
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user