Skip to content

Milestone Withdrawal #19

@Kaylahray

Description

@Kaylahray

User Story

As a Recipient,
I want to withdraw part of my aid funds early.

Description

Allow withdrawing current_raised without closing the request.


Files to Create/Edit

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

Functional Requirements

  • Track: amount_withdrawn in struct.
  • Limit: available = raised - withdrawn.

Suggested Implementation

// IN FUNCTION: withdraw_aid(env, request_id, amount)

// 1. Recipient auth.
// 2. Load Request.
// 3. Ensure 'amount <= (raised - withdrawn)'.
// 4. Transfer 'amount' to recipient.
// 5. Update 'withdrawn' in struct.
// 6. Save struct.

Acceptance Criteria

  • Cannot withdraw more than raised.
  • State persists correctly.

Submission Guidelines

  • Branch: feat/milestone-withdraw

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