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

Retrieve state after async action before updating state in _setSwapsQuoteRefreshTime (#11538)

This commit is contained in:
Dan J Miller 2021-07-15 15:43:53 -02:30 committed by ryanml
parent 96d86a8d86
commit 62729c94a1

View File

@ -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 },
});
}