Skip to content

Lockdeteails#284

Merged
El-swaggerito merged 9 commits into
Axionvera:mainfrom
Chigybillionz:lockdeteails
Jul 23, 2026
Merged

Lockdeteails#284
El-swaggerito merged 9 commits into
Axionvera:mainfrom
Chigybillionz:lockdeteails

Conversation

@Chigybillionz

Copy link
Copy Markdown
Contributor

**Close #263

Summary of the issue:
Users need the ability to inspect individual vault locks before executing a withdrawal to check the amount, created/unlock dates, status, and eligibility.

Root cause:
The application lacked a dedicated screen to display the metadata for a single vault lock. Without this, users couldn't easily verify if a lock had matured without attempting a withdrawal.

Solution implemented:
Added a VaultLockDetailScreen that displays key lock metadata (amount, created date, unlock date, status) and visually indicates whether the lock is eligible for withdrawal based on the current date. A "Mock Active Locks" list was also added to the main Vault tab, allowing users to navigate to the new detail screen while the full SDK integration is pending.

Key changes made:

  • app/vault-lock/[id].tsx: Created the new detail screen using expo-router dynamic routing to parse the lock ID. Renders mock data with clear typography and icons from lucide-react-native. Calculates withdrawal eligibility by comparing the unlock date to the current date and conditionally renders status badges and button states.
  • app/(tabs)/vault.tsx: Imported useRouter and appended a "Mock Active Locks" section below the existing action buttons to provide an entry point for testing the new screen.

Any trade-offs or considerations:

  • Mock Data Handling: The detail screen currently relies on hard-coded mock data since the full SDK integration for querying specific on-chain locks is pending. However, the UI layout, state logic, and styling are structured to seamlessly swap out the mock object for a real Zustand store hook once available.
  • Missing Data Safety: Fallback states (e.g., disabling the withdrawal button if the lock has not matured) have been included to safely handle varying data conditions.

Testing steps (how to verify the fix):

  1. Run the app and navigate to the Vault tab.
  2. Scroll down past the primary actions to the new Mock Active Locks section.
  3. Tap on the mock lock item ("500.0000000 XLM").
  4. Verify that the app navigates to the Vault Lock Details screen.
  5. Verify the screen renders the amount, created/unlock dates, and a "LOCKED" or "UNLOCKED" status badge.
  6. Check the "Withdrawal Eligibility" section to ensure it displays the correct message and button state (disabled if the mocked unlock date is in the future).

Please kindly review this task. If there are any corrections, improvements, adjustments, or merge conflicts that you notice regarding my implementation, I'd really appreciate your feedback. I'd also love to hear your overall review of my work on this branch.Thank you!

@El-swaggerito

Copy link
Copy Markdown
Contributor

This PR cannot be merged automatically because it has merge conflicts.

Please update the branch with the latest base branch and resolve the conflicts.

After the conflicts are resolved and checks pass, the automation can review it again.

@El-swaggerito
El-swaggerito merged commit a69097d into Axionvera:main Jul 23, 2026
1 check passed
@Chigybillionz

Chigybillionz commented Jul 23, 2026 via email

Copy link
Copy Markdown
Contributor Author

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 vault lock detail screen

2 participants