Feature: details and chain filter on balance endpoint #633
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.
With new chain on aleph, as a user i can't get details of my balance.
The goal of the PR is to allow user filter balance base on chain and get the details.
Related Clickup or Jira tickets : ALEPH-232
Self proofreading checklist
Changes
The /balances do same things as before but
This PR add 2 things
details
exemple :"details": {"AVAX": 447.1290583984875, "ETH": 4002.070110401869}
chain
takings a Chain like (ETH / AVAX / BASE)Fix: /balances when the address didn't has token it's would return ERROR (not found it db cause no balance)
If address not found in db balance is now returning
0
How to test
Notes
The locked_amount is is for the whole address, we would need some refactor on the view for it or new endpoints.