From 6a208556b808976ea7fa6e043977bade884c7d48 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 b10f5fa29..33b20cb30 100644 --- a/ui/ducks/send/send.js +++ b/ui/ducks/send/send.js @@ -1037,6 +1037,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(SET_BASIC_GAS_ESTIMATE_DATA, (state, action) => { // When we receive a new gasPrice via the gas duck we need to update // the gasPrice in our slice. We call into the caseReducer