Fix 9632 - Prevent old fetches from polluting the swap state#9671
Fix 9632 - Prevent old fetches from polluting the swap state#9671darkwing merged 1 commit intoMetaMask:developfrom
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Gudahtt
left a comment
There was a problem hiding this comment.
Note that we do have a polyfill already for AbortController, so we can cancel any in-flight requests using that.
We use this in app/scripts/lib/fetch-with-timeout.js for example.
|
@Gudahtt Yeah, David did implement a solution that used We looked at it together, and the challenge is aborting all the async calls that happen after that first fetch. For instance, aborting Given that not all the async calls here can be aborted, the least we can do is the minimum necessary change of preventing a state update after the calls are complete. |
|
@darkwing Regarding that error, some additional changes are needed so that One option would be to throw an error with a custom message, and then check for that message in the catch in |
d473772 to
5f145d5
Compare
2422d96 to
908e787
Compare
80e7b05 to
5c1c9c8
Compare
|
All the code here is looking good and the initial QA is almost perfect. There was some weird behaviour that I saw when radpidly going back and forth between the build quote and loading screen. I think that might be a pre-existing issue though. I am going to QA one more time a little later, and then we should be able to merge this. |
danjm
left a comment
There was a problem hiding this comment.
Final QA looks good. Approved.

No description provided.