-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add Zerion Balances provider #1096
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hectorgomezv
force-pushed
the
add-zerion-balances-provider
branch
from
February 1, 2024 11:51
6f9000a
to
2d7a557
Compare
iamacook
reviewed
Feb 2, 2024
fmrsabino
requested changes
Feb 2, 2024
src/routes/balances/__tests__/controllers/get-externalized-balances.balances.controller.spec.ts
Outdated
Show resolved
Hide resolved
iamacook
approved these changes
Feb 5, 2024
src/datasources/balances-api/entities/__tests__/zerion-balance.entity.builder.ts
Outdated
Show resolved
Hide resolved
fmrsabino
approved these changes
Feb 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
….entity.builder.ts Co-authored-by: Aaron Cook <aaron@safe.global>
iamacook
approved these changes
Feb 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new Ethereum address balance provider (Zerion). This provider is disabled by default. To use this provider on a specific chain, the chain ID should be included in the feature flag environment variable
FF_ZERION_BALANCES_CHAIN_IDS
.This PR also reuses the concept of
BalancesApiManager
. This class acts as a common router/façade for the available balance providers.Changes
ZERION_BASE_URI
: contains the base URI for the Zerion API. Has a default value in the configuration.ZERION_API_KEY
: contains the API key for the Zerion API. Defaults toundefined
. This is done on purpose as it shouldn't be needed to provide an API key for each potential provider the CGW uses (moreover considering the provider could be not managing any chain at a given point in time).FF_ZERION_BALANCES_CHAIN_IDS
: as stated above, this manages the chains that are associated with the Zerion API for balance retrieval. The expected values are comma-separated numbers (e.g.:1,100,137
)configuration.ts
under the keybalances.providers.zerion
.ZerionBalancesApi
(with tests) have been added.BalancesController
tests have been extended to test the new integration.Out of scope
GET /v1/balances/supported-fiat-codes
endpoint adjustments will be done in a separate PR.