Skip to content

Refund Logic #20

@Kaylahray

Description

@Kaylahray

User Story

As a Donor,
I want to a refund if a request is cancelled.

Description

Allow donors to reclaim funds if status becomes Cancelled.


Files to Create/Edit

contracts/geev-core/src/
└── mutual_aid.rs

Functional Requirements


Suggested Implementation

// IN FUNCTION: claim_refund(env, request_id)

// 1. Load Request. Check status is 'Cancelled'.
// 2. Look up 'Donation(request_id, caller)' in storage.
// 3. If amount > 0, transfer amount back to caller.
// 4. Set Donation amount to 0.

Acceptance Criteria

  • Only works if Cancelled.
  • Refund exact amount.

Submission Guidelines

  • Branch: feat/refund-logic

Metadata

Metadata

Assignees

No one assigned

    Labels

    @geevapp/app/wave2Moving to the app repo, as the contracts repo was not accepted for Drips Wave 2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions