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
61 stars 34 forks source link

Bugs in "Streamable Token Balances" and "Recurring Donations" table #3915

Closed maryjaf closed 5 months ago

maryjaf commented 6 months ago

cc: @divine-comedian

maryjaf commented 6 months ago

I'm not sure the item 3 is about the problem of previous ended transaction from backend side or not, I'll check more to be sure about this

maryjaf commented 6 months ago
  • [ ] 3-when I have an ended donation to Giveth in my recurring donation, by adding a new donation to a project and giveth a new record would be added for new project but for Giveth the amount of previous ended record would be updated

-I've created new donation to "Test Hamid" and Giveth project after completing donation flow 160 GIV to test hamid 40 GIV to giveth -I see a new record for "Test Hamid" in recurring donation flow -but for Giveth the previous archive donation is updated and the amount of this record is increased (46 GIV--->86GIV)

After donation:

image

before donation:

image
divine-comedian commented 6 months ago

@maryjaf - was the donation to Giveth actually ended or was it mistakenly ended by the Back-end bugs we had that wasn't showing projects to be active even though they were streaming funds?

My thought here is that technically the stream might have never been ended, so this could cause anomalies.

At any rate - If you end the active recurring donation to Giveth then create a new recurring donation to a project and donate a % to Giveth - this should count as two new recurring donations (one to the project and a new one to Giveth).

maryjaf commented 6 months ago

@maryjaf - was the donation to Giveth actually ended or was it mistakenly ended by the Back-end bugs we had that wasn't showing projects to be active even though they were streaming funds?

The donation was on Mar 27, 2024 , I think the backend problem had been resolved at this time

maryjaf commented 6 months ago

At any rate - If you end the active recurring donation to Giveth then create a new recurring donation to a project and donate a % to Giveth - this should count as two new recurring donations (one to the project and a new one to Giveth).

when a donation be ended or archived the count of project in supporting field shouldn't be changed?

divine-comedian commented 6 months ago

At any rate - If you end the active recurring donation to Giveth then create a new recurring donation to a project and donate a % to Giveth - this should count as two new recurring donations (one to the project and a new one to Giveth).

when a donation be ended or archived the count of project in supporting field shouldn't be changed?

If you end a recurring donation the count of projects that the stream balance is supporting should decrease.

maryjaf commented 6 months ago

At any rate - If you end the active recurring donation to Giveth then create a new recurring donation to a project and donate a % to Giveth - this should count as two new recurring donations (one to the project and a new one to Giveth).

when a donation be ended or archived the count of project in supporting field shouldn't be changed?

If you end a recurring donation the count of projects that the stream balance is supporting should decrease.

@MohammadPCh by by ending recurring donation the count of project in supporting field isn't changed

maryjaf commented 6 months ago

This problem hasn't been assigned to developers @divine-comedian

divine-comedian commented 6 months ago

@MohammadPCh - Can you pick this one up or assign it to @alireza-sharifpour if it is more appropriate?

divine-comedian commented 6 months ago

2 - we should check what query we are using to do this @alireza-sharifpour

MohammadPCh commented 6 months ago

Hey @divine-comedian, @maryjaf, I've addressed the project's count, but encountered two issues:

  1. Our stream info is sourced from the superfluid subgraph, potentially causing disparities with our backend(To ensure accuracy and prevent errors, I've been using their subgraph for the latest data instead of our API)
  2. It appears the superfluid subgraph is currently out of sync.

Regarding updating Giveth, I suggest rectifying it on the backend. @mohammadranjbarz, what do you think? According to our system, only ended donations can be archived. Thus, if we modify a donation, it should be unarchived in our database.

divine-comedian commented 6 months ago

@MohammadPCh I don't understand how it could be possible to modify an ended or archived donation. The flow should also be stopped on a contract level as well meaning it should be impossible to modify or update the recurring donation.

When a user makes a new recurring donation to the same project (after the old one was ended) it should create a new recurring donation, not modify the ended one.

Did I misunderstand something?

MohammadPCh commented 6 months ago

@divine-comedian Oop, I expressed my perspective poorly. I remember that we talked with @mohammadranjbarz about this problem on another issue. we should create a new donation with the pending status.