esse-dev / akita

A browser extension that gives you insight into your engagement with Web Monetization.
Other
24 stars 3 forks source link

Fix originData favicon path not being stored #150

Closed vezwork closed 3 years ago

vezwork commented 3 years ago

Fixes #148

Changes

Bug explanation

This bug is a regression introduced in #141. This PR made it so that favicon fetching did not block storing originData. This resulted in a regression where the originData object was being updated after it had already been stored, meaning the updated originData object was never stored.

Fix explanation

Fixing this issue requires introducing a new function storeOriginFavicon which fetches the favicon, and once/if the fetch resolves, updates and stores the originData safely using a lock.

Fix demo image

image