Delrifai/#479 use aggregated balance api
- Use aggregated balance history on the chart on the profile page - removed all previous logic of grouping data by day and reversing it
- Used aggregated balance history on the chart in the balance history page
- Now the chart appears even if there are no transactions in the table
- Removed all previous logic of limiting results to 5000, reversing and grouping by day
- Added to logic to getGranularityPeriod :
- If our filter period expands more than 30 days, we start showing monthly aggregations
- In case we are filtering by last month if the month is more than 4 months, we start aggregation by year, which currently is outdating
- Notes:
- We need to make sure the API is pushed to other nodes before merging since most of us use other nodes
- We need to make a sanity check once yearly issue is fixed