Giveth / giveth-dapps-v2

This project is the aggregation of GIVeconomy and Giveth.io DApps in a single repo
https://staging.giveth.io
GNU General Public License v3.0
64 stars 33 forks source link

QF bug - telling me I already donated but I did not. #4728

Open laurenluz opened 2 months ago

laurenluz commented 2 months ago

UI is teling me I already donated to public nouns operatios in the round, but I didn't!!

See? image

My donations: image

I donated well before this round started.

Are we using the round "start time" to consider if the user donated? or the round "Active time? @CarlosQ96

divine-comedian commented 1 month ago

@CarlosQ96 coulnd't reproduce this issue @laurenluz

divine-comedian commented 1 month ago

@HrithikSampson do you mind investigating this one with guidance from @CarlosQ96

HrithikSampson commented 1 month ago

Sure @divine-comedian . I will investigate this.

HrithikSampson commented 1 month ago

@laurenluz , it seems that the round for the project needs to be active and it needs to be within the beginDate and endDate of the round and needs to be on an eligible network for the round.

HrithikSampson commented 1 month ago

@laurenluz , I think that there were no rounds on September 3, when the donation was made

Image

laurenluz commented 1 month ago

yes @HrithikSampson - there was no QF round on Sept 3 (when I did donate)... yet (when the QF round was active & live) the dapp was telling me that I already donated to that project during this QF round, so my estimated matching will be wrong

I should not have seen this prompt at all, so there is a bug, which is why I created this issue.

CarlosQ96 commented 1 month ago

@HrithikSampson did you manage to replicate the issue? Can DM the details and ill continue.

HrithikSampson commented 1 month ago

@CarlosQ96 I couldn't replicate the issue

CarlosQ96 commented 2 weeks ago

@laurenluz @divine-comedian It's really weird this issue occured as looking at the query there is no way that message should happen by mistake. The message is triggered if you have already donated to a project during the round, so you have 1 marked donation already on that project.

This function takes into account userId, projectId, qfroundId and that the donation is verified.

However it does not take into account startTime. I can add that.

Reasons it could have happened it's too hard to debug atm and no way to tell from the backend. I checked the 3rd of september donation and its not marked in the round, so the function shouldn't have triggered that. Not sure if it could have been some cache of sorts in the frontend.

But to be sure it doesnt happen ill add the starttime condition

Also, been unable to reproduce it like Hithrik.

CarlosQ96 commented 2 weeks ago

@divine-comedian Fix is ready to be merged on staging, approved by Ramin. But I am not sure how to replicate/test the issue. Not sure even QA can replicate it.

For now it's a band aid fix that forces checking the DATES too on top of the other conditions, to prevent the alert to show when it shouldn't.

Should we merge and release a hotfix? Then call it done but monitor it on the next round? What do you think?

laurenluz commented 2 weeks ago

this sounds good to me! I can keep an eye on it next round, since I experienced the original bug.