-
Notifications
You must be signed in to change notification settings - Fork 15
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
[QA Dashboard] Total funds bug #3555
Labels
bug
Something isn't working
Comments
I'll schedule a brain storming session with @jakubcolony first to see what's the best approach for retrieving these values |
What came of the call here? How are you proceeding? Since this is a bug that affects Dashboard it needs to be prioritized |
@rdig I put all the comments from our session in the |
Ah. Missed those. All good then! 👍 |
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
Login on QA to the colony with address
0x997B915CaC293D69f14a8a85e660EE87f1523FcD
-Jakub Colony
On dashboard you'll see the balance has a small negative value
![Screenshot 2024-10-30 at 12 37 53](https://private-user-images.githubusercontent.com/32430018/381527878-771417a4-c5d4-4eda-9b7c-80785d5ea9b2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MjQzMTMsIm5iZiI6MTczOTUyNDAxMywicGF0aCI6Ii8zMjQzMDAxOC8zODE1Mjc4NzgtNzcxNDE3YTQtYzVkNC00ZWRhLTliN2MtODA3ODVkNWVhOWIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA5MDY1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRlNDc3NDA0MjMyNGQ1MDRmM2IzMzBlYmVmNGZlOGIyY2M5ZTU3NWQ4YjdiYjNiYWNlZjI2YmM5ZDJkZTNiMDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ueaVoHlpefgjenwInIi2ITHNjmItBH94fMlLyhtZy34)
However, if you switch to the finances pages, on the balance you'll notice the total ETH is positive
![Screenshot 2024-10-30 at 12 38 04](https://private-user-images.githubusercontent.com/32430018/381527889-0b6b7318-2b8a-43e0-8c25-3a58d94642e1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MjQzMTMsIm5iZiI6MTczOTUyNDAxMywicGF0aCI6Ii8zMjQzMDAxOC8zODE1Mjc4ODktMGI2YjczMTgtMmI4YS00M2UwLThjMjUtM2E1OGQ5NDY0MmUxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA5MDY1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk0MzNiZWRhMTIyZTkxZGRkN2Q3NmFiNzNhODc5ODk2Mzg3ZTM5Y2MwODAzODRiZmY2NTQ2NTkzMDJiZWExNjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Qh9Ajy39hKA4biHzok05mi5FR0oYCg050-zTOjhaRhQ)
![Screenshot 2024-10-30 at 12 38 17](https://private-user-images.githubusercontent.com/32430018/381527894-cd0d2f74-4ef6-42fd-bcc1-8ea9e30ef1b7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MjQzMTMsIm5iZiI6MTczOTUyNDAxMywicGF0aCI6Ii8zMjQzMDAxOC8zODE1Mjc4OTQtY2QwZDJmNzQtNGVmNi00MmZkLWJjYzEtOGVhOWUzMGVmMWI3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA5MDY1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVlN2UxZTI2YjAzNjcyNWVjZmVjM2ZmYzFlMjhmYTE4MjU1ZThjMWI5NGNhODdkMTEyMDVhMzRiYTUwMjE2YTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.pLxA3D3N7TQ1AzbvkDxxOkuTo53NebxkZsObEzzrt8Q)
But there is no incoming funds - in the past once an incoming funds was claimed, the entry was deleted
Also, another bug related to the funds, was found while scraping through the
getDomainBalance
query: if for thetimeframePeriod
you enter a number of days > than the number of days in a month (considering you selectedTimeframeType.DAILY
), as well as if you enter a number of months > than the number of months in a year (considering you selectedTimeframeType.MONTHLY
), you will not have an entry for each expected key.So the solution would be to use the entire date
yyyy-mm-dd
as key and then adjust the displayed key in the UI.Screen.Recording.2024-10-30.at.11.46.59.mov
Implementation details
Given the incoming funds entries are not available for prior to May 2024 - previously when an incoming funds action was claimed, the entry got deleted, we need to change a bit our approach to the balances.
So, in order to get our data right, at least for the overall amounts shown in the Total cards we need to make use of the actual network balance at colony level or domain level.
For this please make use of the following code put in place by @Nortsova in the UI
Also, for the caching of the total funds we should make a call to the network and estimate the block for which we want to retrieve the data. So in the
cacheDomainBalance
for theTotal
entry we should make use of this codeTo estimate the block number from a given point in time to retrieve the total balance value, we should consider that each chain has a constant block time (0.25s for Arbitrum), so to find a block n seconds ago the following formula can be used:
currentBlockNumber - n/0.25
Now for the total in/out balance given we want to cache the value for the timeframe 60 days - 30 days, we can leave the logic how it is, at least for the moment.
And if we're touching all the domain balances, we should also fix the issue with the timeframe keys that can get overridden.
Expected behaviour
getDomainBalance
query should retrieve thetimeframe
containing all relevant keys - this however doesn't or shouldn't impact the values for the moment, as we don't query more than30 days
or more than4 months
Actual behaviour
timeframe
keys if we were to change ourtimeframePeriod
query inputThe text was updated successfully, but these errors were encountered: