8000 Refactor in initialization NewCoinGeckoDownloader by romanornr · Pull Request #1011 · trezor/blockbook · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Refactor in initialization NewCoinGeckoDownloader #1011

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

Merged
merged 1 commit into from
Dec 19, 2023
Merged

Refactor in initialization NewCoinGeckoDownloader #1011

merged 1 commit into from
Dec 19, 2023

Conversation

romanornr
Copy link
Contributor
  1. Moved the creation of allowedVsCurrenciesMap to a dedicated function getAllowedVsCurrenciesMap. This function takes a currenciesString input and returns a map of allowed vs currencies.

  2. Updated the httpTimeout and httpClient.Timeout initialization to use constants (DefaultHTTPTimeout) for consistency and to make it easier to adjust the default timeout in the future.

I actually have an idea for the makeReq method, but let's see if this is fine first

@martinboehm martinboehm merged commit e7ee4a9 into trezor:master Dec 19, 2023
@martinboehm
Copy link
Contributor

Hi @romanornr. Thank you for your contribution. Normally we do not accept PRs that modify common code but this PR seems simple enough and is making the code more readable.

@romanornr romanornr deleted the CoinGeckoDownloader branch December 20, 2023 03:16
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
0