From ee925d0186a4a52b9f34c67a92aaa342730149f0 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 15 Jul 2021 15:43:53 -0230 Subject: [PATCH] Retrieve state after async action before updating state in _setSwapsQuoteRefreshTime (#11538) --- app/scripts/controllers/swaps.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/scripts/controllers/swaps.js b/app/scripts/controllers/swaps.js index 424039408..17425b678 100644 --- a/app/scripts/controllers/swaps.js +++ b/app/scripts/controllers/swaps.js @@ -130,8 +130,10 @@ export default class SwapsController { console.error('Request for swaps quote refresh time failed: ', e); } + const { swapsState: latestSwapsState } = this.store.getState(); + this.store.updateState({ - swapsState: { ...swapsState, swapsQuoteRefreshTime }, + swapsState: { ...latestSwapsState, swapsQuoteRefreshTime }, }); }