Skip to content

feat: typed vaultService data layer over mocks with integration-seam …#516

Open
jabir-dev788 wants to merge 1 commit into
Disciplr-Org:mainfrom
jabir-dev788:feature/vault-data-layer
Open

feat: typed vaultService data layer over mocks with integration-seam …#516
jabir-dev788 wants to merge 1 commit into
Disciplr-Org:mainfrom
jabir-dev788:feature/vault-data-layer

Conversation

@jabir-dev788

@jabir-dev788 jabir-dev788 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Closes #216


Summary

Introduces a single vaultService data layer and shared Vault/
Milestone/VaultTransaction types, replacing four independent inline
mock arrays in Dashboard, Vaults, VaultDetail, and VaultTransactions.

Notable finding

The existing mocks didn't just have duplicated types — they disagreed on
actual values for the same vault id across files (e.g. "Gamma Fund" was
$4,200/active in Dashboard.tsx but $8,800/failed in Vaults.tsx and
VaultDetail.tsx). This PR treats VaultDetail.tsx's dataset as canonical
and unifies on it, which incidentally fixes that inconsistency. Documented
in docs/VAULT_DATA_LAYER.md.

Design note

VaultTransactions.tsx's transaction explorer uses a richer per-transaction
shape (fee, block, from/to, memo, status) that has no equivalent in other
pages' data. Rather than force those fields into the shared VaultTransaction
type (which would mean inventing data), it gets its own
VaultActivityRecord type and listAllActivity() method.

Changes

  • src/types/vault.ts — canonical Vault/Milestone/VaultTransaction types
  • src/services/vaultService.ts — async, mock-backed: listVaults,
    getVault, getTransactions, listAllActivity
  • 4 pages refactored to consume the service instead of inline mocks
  • docs/VAULT_DATA_LAYER.md — documents the contract-integration seam

Tests

vaultService.test.ts covers unknown vault id, empty transaction list,
and Promise-based resolution shape for all 4 methods.

No UI regressions

Each page renders the same structure; only the data source changed from
synchronous inline arrays to an async service call with a brief loading state.

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@jabir-dev788 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@GBOYEE

GBOYEE commented Jun 28, 2026

Copy link
Copy Markdown

@GBOYEE has applied to work on this issue as part of the Stellar Wave Program's 6th wave.

Implement following existing patterns and conventions. Add tests, ensure CI passes, and document any new API surface.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @GBOYEE to this issue.

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.

Replace placeholder mock data with a typed vault data layer and document the contract integration seam

2 participants