Adyen / adyen-magento2-express-checkout

Adyen Magento 2 Express Checkout Module
MIT License
8 stars 2 forks source link

[PW-8388] Multiple calls to getCountries being made #26

Closed mhodge13 closed 1 year ago

mhodge13 commented 1 year ago

On PDP load we are seeing 4 calls to the rest/V1/directory/countries webapi.

The issue is that the check has an or (||) condition and I believe it should have an and (&&) condition instead.

https://github.com/Adyen/adyen-magento2-express-checkout/blob/fbdff1f2d77a79fbc5ceb27770f8ce9fbfcc6235/view/frontend/web/js/model/countries.js#L17

Example Change: if (!Object.keys(this.countries).length && !this.fetchingCountries) {

This should help with the load times on the PDP.

candemiralp commented 1 year ago

Hello @mhodge13,

Thank you for raising this issue and the proposed solution as well. We created an internal ticket to verify this issue and the proposed solution. You will be updated when it is done.

Best Regards, Can

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.