From ac15b3b465ba6938f89fbd193c210e3de1831315 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Wed, 21 Jul 2021 16:00:00 -0230 Subject: [PATCH] Ensure send slice gas loading state is set to false upon gas estimation error (#11581) --- ui/ducks/send/send.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/ducks/send/send.js b/ui/ducks/send/send.js index 675117d45..56a4686c4 100644 --- a/ui/ducks/send/send.js +++ b/ui/ducks/send/send.js @@ -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) => { // When the gasFeeController updates its gas fee estimates we need to // update and validate state based on those new values