safe-client-gateway
safe-client-gateway copied to clipboard
Get prices provider configuration from Safe Config Service
Summary
This PR changes the source for the Prices Provider (currently CoinGecko) configuration from the CGW hardcoded (configuration.ts
) one, by the Chain
entity coming from the Safe Config Service.
In this first iteration, the hardcoded configuration (configuration.ts
) is kept as a fallback. If the Prices Provider configuration data is not present in the Config Service response, then the fallback data is used.
For more context see the Config Service PR: https://github.com/safe-global/safe-config-service/pull/1124
Changes
- Changes the primary source for both
nativeCoinId
andchainName
properties inCoingeckoApi
to theChain
entity passed. - Changes several interfaces accordingly to pass the whole
Chain
entity (holding the needed configuration) instead of passing thechainId
property only. - Adds the prices provider configuration fields to the
Chain
entity/schema. - Modifies the affected test classes.
Pull Request Test Coverage Report for Build 9064785142
Details
- 14 of 14 (100.0%) changed or added relevant lines in 8 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+0.06%) to 93.003%
Totals | |
---|---|
Change from base Build 9002495810: | 0.06% |
Covered Lines: | 7001 |
Relevant Lines: | 7252 |
💛 - Coveralls
I've added some changes to adapt the PR to the modified pricesProvider
field structure (see https://github.com/safe-global/safe-config-service/pull/1124)