Skip to content
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

GIVpower boosting showing as NaN #1702

Closed
divine-comedian opened this issue Jul 18, 2024 · 7 comments
Closed

GIVpower boosting showing as NaN #1702

divine-comedian opened this issue Jul 18, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@divine-comedian
Copy link
Collaborator

A user reported an issue where they have a GIVpower boosting showing as NaN which causes their total GIVpower to respond as NaN

Image

IIRC we had a similar issue present itself a few weeks ago that @aminlatifi resolved, how is it that this can happen?

@divine-comedian divine-comedian added the bug Something isn't working label Jul 18, 2024
@divine-comedian
Copy link
Collaborator Author

@WhyldWanderer says

Carlos recently helped me to transfer this project from one owner address to another... I wonder if this transfer could have caused an issue somewhere in the backend

@aminlatifi
Copy link
Member

@WhyldWanderer says

Carlos recently helped me to transfer this project from one owner address to another... I wonder if this transfer could have caused an issue somewhere in the backend

@WhyldWanderer @CarlosQ96 Did that change include changing the user address?! I see the positive givpower for that user in the past, but now it doesn't have any balance (the new address haven't made any tx neither on gnosis nor optimism mainnet)

@aminlatifi
Copy link
Member

BTW, it can be fixed by #1655

@WhyldWanderer
Copy link

It was actually a pretty confusing situation with this one project..

Quite a while ago they asked to change the wallet address on their profile.. we did it and it seemed successful.

Then they came back at a later time and were unable to edit their project.. they could log in a nd see their project but couldnt make changes so they opened a support ticket.
It turned out that they actually had 2 profiles with the same wallet address.
One that had a mixture of capital and lowercase letters and the other just had lowercase letters in the same format that we use in the database.

I asked them which profile they wanted to use going forward and changed the address for that profile to be the one with lowercase letters and on the other profile I entered a random wallet address because I was told that we don't want to delete anything in the db.

Ugh.. Im sorry this is such a mess and so confusing..
These were the two profiles:
image

They decided to keep the 10381 profile..
So i edited the address to have all lowercase letters and I changed the other wallet address to this random one.
My guess is that the NaN is showing for the profile that they chose not to keep.

I realize that this wasnt the best practice and I even talked with Carlos a bit about me not transferring ownership of projects in the future because it seems to cause weird issues that we arent prepared for when its done through AdminBro. It seems to change the admin ID on some tables but not others in the db. We agreed after this incident that I would always ask a dev to do it manually when going forward.

I just hate to bug devs with something simple and make project owners wait for the transfer to be complete.
Maybe its time to re-evaluate how this works and make sure it is something that can be done smoothly in the adminbro?

@divine-comedian
Copy link
Collaborator Author

Yep, transferring profile ownership is on my to do list!

Just so you know - the difference in capitalization between addresses is often attributed to checksumming - https://cointelegraph.com/explained/ethereum-address-checksum-explained - which is not as straightforward as capitalizing or lower casing all the letters.. it is a complex algo involved in checksumming adresses..

At anyrate hopfully @aminlatifi can find the fix

@aminlatifi
Copy link
Member

@WhyldWanderer @divine-comedian in impact-graph we have decided to save everything in lowercase. So, everytime you want to insert addresses or transaction hash, transform it to lower case.
The above issue originally was happened since this rule was not observed.
CC @jainkrati One way to prevent this is adding some constraint in db to prevent such data be saved
https://stackoverflow.com/questions/9046825/postgresql-auto-lowercase-text-while-or-before-inserting-to-a-column

@aminlatifi
Copy link
Member

@WhyldWanderer Okay, I removed every boosting associated to user 12130
Now the project ranking is fixed
https://giveth.io/project/soildao-steward-platform?tab=givpower

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

4 participants