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

Retrieve Status of Recurring Donation #1400

Closed
divine-comedian opened this issue Mar 11, 2024 · 14 comments
Closed

Retrieve Status of Recurring Donation #1400

divine-comedian opened this issue Mar 11, 2024 · 14 comments
Assignees
Labels

Comments

@divine-comedian
Copy link
Collaborator

divine-comedian commented Mar 11, 2024

We should have 5 statuses of recurring donation

  • Active (tx was successful and recurring donation is ongoing)
  • Pending (tx is pending execution)
  • Failed (tx failed)
  • Ended (isFinished is true?)
  • Archived (isFinished is true & we hide it from my profile page)

We should add these eligible statuses to a recurring donation and we'll also need an endpoint so the front-end can retrieve a recurring donation's status

@divine-comedian
Copy link
Collaborator Author

export const updateRecurringDonationQuery = `
       mutation (
        $projectId: Int!,
        $networkId: Int!,
        $currency: String!,
        $txHash: String
        $flowRate: String
        $anonymous: Boolean
        $status: String
        ) {
          updateRecurringDonationParams(
            projectId: $projectId
            networkId: $networkId
            currency:$currency
            txHash:$txHash
            anonymous:$anonymous
            flowRate:$flowRate
            status:$status
        ) {
            txHash
            networkId
            currency
            flowRate
            anonymous
            status
          }
      }
`;

@divine-comedian
Copy link
Collaborator Author

divine-comedian commented Mar 18, 2024

Only need to send projectId and networkId & currency & status - the rest are optional @MohammadPCh

@maryjaf
Copy link
Collaborator

maryjaf commented Mar 26, 2024

  • 1-

Please check below scenarios
-I have a donation record to Giveth in recurring donation table and its status is ended
-when I donate to a new project and set donating to giveth also, after completing donation flow
-A new record is added to donation table with "pending " status and after 10 mins it is changed to "Active" correctly
-The donation amount related to Giveth is updated but the status remains ended

image
image

@divine-comedian
Copy link
Collaborator Author

I think is related to back-end changes not applying to donations made before the hotfix was applied by @CarlosQ96 about ~2 days ago.

I think there's no practical solution for these old donation statuses - going forward any new donations should have the correct status, right @CarlosQ96 ?

@maryjaf
Copy link
Collaborator

maryjaf commented Mar 27, 2024

I think is related to back-end changes not applying to donations made before the hotfix was applied by @CarlosQ96 about ~2 days ago.

I think there's no practical solution for these old donation statuses - going forward any new donations should have the correct status, right @CarlosQ96 ?

I need to check the Giveth donation status and in this case I couldn't check it
in general when I donated to a project and after a while the status changes to ended when I donated again to this project what should happen? a new record should be added or the status of same record changes to pending and. then active
for Giveth I have only one record in donation table and its amount will be updated but status remains ended

@maryjaf
Copy link
Collaborator

maryjaf commented Mar 27, 2024

  • 2- one question
    When I Modify an active recurring donation and change the flow rate , its status should be changed to pending and then active or it should remain active?
    now after modifying and changing flow rate it remains active

@divine-comedian
Copy link
Collaborator Author

@maryjaf

1st point

I think any recurring donations made before the hotfixes in the BE (yesterday) are just permanently broken, we should end those streams on the superfluid dashboard and archive them from the FE.

We should try to start from scratch as much as possible since trying to fix these statuses retroactively isn't the best use of time.

If you have made recurring donations from last night until now and are still encountering errors with recurring donations wrongly having a status of ended then we still have an issue.

2nd point

if the status remains active it is fine when updating the flow rate

@maryjaf
Copy link
Collaborator

maryjaf commented Mar 27, 2024

I'm not sure which issue is more related to this problem
If i'm wrong let me know to put the comment on right issue

  • 3-" total donated" is shown zero in Recurring Donations table for active donations

image

@divine-comedian
Copy link
Collaborator Author

I'm not sure which issue is more related to this problem If i'm wrong let me know to put the comment on right issue

  • 3-" total donated" is shown zero in Recurring Donations table for active donations

image

@maryjaf - Can you make a new issue for this one?

If all other criteria has been met for the 5 statuses defined in the issue description then we can close this one.

@maryjaf
Copy link
Collaborator

maryjaf commented Mar 27, 2024

I've tested pending, active, ended and archive status and all of them were ok
which status remains to be tested? failed?
Is there any way to check failed status? @CarlosQ96

@CarlosQ96
Copy link
Collaborator

i am not sure how we can get the failed status yet. As there is no indication in the api

@divine-comedian
Copy link
Collaborator Author

How do we handle failed status for one-time donations? We have a badge for it

@maryjaf
Copy link
Collaborator

maryjaf commented Apr 2, 2024

I had tested pending , active , ended and archive donation and they were ok
but now there is a problem that status is shown pending
after resolving this problem we could call this issue as Done

@CarlosQ96
Copy link
Collaborator

Actually @mohammadranjbarz cronjob includes this, in case the donation failed in the blockchain, we set it as finished True and status Failed. That is enough to cover the failed scenario

@maryjaf maryjaf closed this as completed Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants