Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Clear timeouts on SecuredFieldsProvider when unmounting the component #2334

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

kaakock
Copy link
Contributor

@kaakock kaakock commented Sep 20, 2023

Summary

SecuredFieldsProvider uses timeouts to check whether SecureFields are loaded properly. Those timeouts are not cleared when the component unmounts which causes issues if the fields have already been unmounted. This triggers the onError handler in cases where it should not.

Tested scenarios

Mounting and almost immediately unmounting adyen drop-in triggers the onError handler.

SecuredFieldsProvider uses timeouts to check whether securedfields are
loaded properly. Those timeouts are not cleared when the component unmounts
which causes issues if said those fields have already been unmounted as
this triggers the onError handlers.
@changeset-bot
Copy link

changeset-bot bot commented Sep 20, 2023

🦋 Changeset detected

Latest commit: 497f018

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@adyen/adyen-web Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@sponglord
Copy link
Contributor

Hi @kaakock . Thanks for the PR! Can you tell me is it related to this issue (#2335) - or is this just a coincidence? :-)

@kaakock
Copy link
Contributor Author

kaakock commented Sep 25, 2023

Hi!
The reported issue seems to be coincidental, but the problem described in #2335 is the same.

@sponglord
Copy link
Contributor

In which case this is a very timely PR! Thank you :-)

We need a `.changeset file` to initiate the required actions in our workflow
@sponglord sponglord merged commit 5e51574 into Adyen:main Oct 4, 2023
6 of 8 checks passed
@github-actions github-actions bot mentioned this pull request Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants