Giveth / impact-graph

MIT License
47 stars 16 forks source link

Set zero power snapshot balance when balance aggregator doesn't return any balance for an address #1655

Open aminlatifi opened 6 days ago

aminlatifi commented 6 days ago

impact-graph fills power snapshot balances by querying the balance aggregator as below

https://github.com/Giveth/impact-graph/blob/bc3b435688c6c1124551c2f68b3802616963346f/src/services/cronJobs/fillSnapshotBalances.ts#L124-L143

When the balance aggregator doesn't have any balance for an address, it doesn't return anything for that one. In the current implementation, the power balance snapshot for that user will remain empty forever. We must identify when no balance is returned for an address and fill it with zero!

aminlatifi commented 6 days ago

REf https://github.com/Giveth/giveth-dapps-v2/issues/4326