1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Ensure send slice gas loading state is set to false upon gas estimation error (#11581)

This commit is contained in:
Dan J Miller 2021-07-21 16:00:00 -02:30 committed by GitHub
parent 859a82d428
commit ac15b3b465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1082,6 +1082,11 @@ const slice = createSlice({
}); });
} }
}) })
.addCase(computeEstimatedGasLimit.rejected, (state) => {
// If gas estimation fails, we should set the loading state to false,
// because it is no longer loading
state.gas.isGasEstimateLoading = false;
})
.addCase(GAS_FEE_ESTIMATES_UPDATED, (state, action) => { .addCase(GAS_FEE_ESTIMATES_UPDATED, (state, action) => {
// When the gasFeeController updates its gas fee estimates we need to // When the gasFeeController updates its gas fee estimates we need to
// update and validate state based on those new values // update and validate state based on those new values