1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01: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 GitHub
parent 9f4820ee98
commit ee925d0186
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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