trezor / blockbook

:blue_book: Trezor address/account balance backend
https://trezor.io
GNU Affero General Public License v3.0
647 stars 644 forks source link

Refactor in initialization NewCoinGeckoDownloader #1011

Closed romanornr closed 8 months ago

romanornr commented 8 months ago
  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 commented 8 months ago

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.