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 CoinGecko spam (finally) #129

Merged
merged 2 commits into from May 11, 2023
Merged

Fix CoinGecko spam (finally) #129

merged 2 commits into from May 11, 2023

Conversation

JSKitty
Copy link
Member

@JSKitty JSKitty commented May 10, 2023

Abstract

There were some redundant calls towards the CoinGecko API at startup (Both global.js start() and settings.js start() were fetching prices at startup, that was fixed).

Additionally, a race condition was possible where if CoinGecko did NOT sync prices prior to your UTXOs, then each UTXO would individually call CoinGecko due to cache not being fulfilled.

Now, the startup is guaranteed to only call once, and then the UTXOs syncs afterwards - if CoinGecko fails, UTXOs will continue to sync as normal.

This just ensures that, even if CoinGecko fails to respond, it won't prevent the user's balance from loading.
@JSKitty JSKitty added the Bug This is either a bugfix (PR) or a bug (issue). label May 10, 2023
@JSKitty JSKitty self-assigned this May 10, 2023
Copy link
Member

@Duddino Duddino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

Copy link

@Liquid369 Liquid369 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fb1d03f

@JSKitty JSKitty merged commit d96da38 into master May 11, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is either a bugfix (PR) or a bug (issue).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants