Skip to content

feat: add matured lock withdrawal flow - #542

Open
apatafamilycompound123-ops wants to merge 4 commits into
Axionvera:mainfrom
apatafamilycompound123-ops:feat/issue-203-add-mobile-matured-lock-withdrawal-flow
Open

feat: add matured lock withdrawal flow#542
apatafamilycompound123-ops wants to merge 4 commits into
Axionvera:mainfrom
apatafamilycompound123-ops:feat/issue-203-add-mobile-matured-lock-withdrawal-flow

Conversation

@apatafamilycompound123-ops

Copy link
Copy Markdown

Overview

This PR adds a mobile matured vault lock withdrawal flow that guides users through eligibility, confirmation, loading, success, and failure states. The flow uses placeholder actions so it can be connected to SDK vault methods later. No real contract withdrawal is performed until the SDK integration is completed.

Related Issue

Closes #

Changes

🔒 Matured Lock Withdrawal Flow

  • [ADD] src/features/vault/useMaturedLockWithdrawal.ts

    • Manages the withdrawal state machine: eligibility, confirmation, loading, success, and failure.
    • Displays whether the lock is matured and eligible for withdrawal.
    • Exposes placeholder withdrawal actions ready for future SDK vault method integration.
  • [ADD] src/components/MaturedLockWithdrawalModal.tsx

    • Mobile-friendly modal that walks users through the withdrawal process.
    • Includes eligibility messaging, confirmation step, loading progress, success confirmation, and failure handling with retry.
  • [ADD] src/components/VaultActionProgress.tsx

    • Reusable progress and status UI for vault actions.
    • Renders loading, success, and failure states used by the matured lock withdrawal flow.
  • [MODIFY] app/vault-lock/[id].tsx

    • Integrates the matured lock withdrawal modal and hook into the vault lock detail screen.
    • Adds the withdrawal entry point only for matured locks.

Verification Results

Manual verification:
✅ Matured lock shows eligible withdrawal entry point
✅ Confirmation step appears before withdrawal starts
✅ Loading state renders with progress indicator
✅ Success state confirms withdrawal completion
✅ Failure state shows error with retry option
✅ Placeholder actions are isolated for future SDK integration
Acceptance Criteria Status
A matured lock withdrawal flow is added ✅ Added modal + hook + route integration
The flow checks or displays eligibility ✅ Matured/eligible state is displayed
A confirmation step is included ✅ Confirmation required before withdrawal
Loading, success, and failure states are handled ✅ Handled by VaultActionProgress and modal
The flow is ready for SDK integration ✅ Placeholder actions isolated in the hook

Closes #203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add mobile matured lock withdrawal flow

1 participant