impact-graph icon indicating copy to clipboard operation
impact-graph copied to clipboard

Endpoint for Archiving Recurring Donation

Open divine-comedian opened this issue 11 months ago • 2 comments

When a user wants to archive or end their recurring donation we should update the status on the back-end of this recurring donation to archived. We need an endpoint that can be used on the front-end to change the status of a recurring donation to 'archived' - will need https://github.com/Giveth/impact-graph/issues/1400 to have statuses in place/

When this recurring donation has status of archived we no longer show it on my profile page for user.

image

divine-comedian avatar Mar 11 '24 15:03 divine-comedian

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
          }
      }
`;

Needs projectId, networkId currency & status. Send status as ended to end recurring donation in DB @MohammadPCh

divine-comedian avatar Mar 18 '24 14:03 divine-comedian

I had tested the "end recurring donation"scenarios and the status is changed correctly from ended to archive

maryjaf avatar Apr 03 '24 11:04 maryjaf

can we close this as done @maryjaf ?

jainkrati avatar May 29 '24 12:05 jainkrati