Problem
Frontend regressions are likely when API error codes, transaction states, or decimal fields change without a consumer-level check.
Objective
Deliver a production-quality improvement to API client adapters and core vault screens that creates measurable value for correctness, security, reliability, performance, or maintainability.
Implementation scope
- Generate or maintain fixtures for validation, authorization, provider, pending, and terminal errors.
- Assert parsing of precision-safe numeric fields and pagination/correlation metadata.
- Exercise deposit, withdrawal, and position views against the contract fixtures.
Acceptance criteria
- Incompatible API shapes fail tests with actionable diagnostics.
- The UI renders each supported error state without leaking raw responses.
- Tests run deterministically without live wallet or chain dependencies.
Required validation
- Contract fixtures, component tests, and deterministic integration tests for all listed states.
- Existing tests and CI remain passing.
- Add regression coverage for the original failure mode.
- Do not weaken, delete, or skip unrelated tests to obtain a green build.
PR quality bar
- Keep the PR focused on this issue and explain design tradeoffs.
- Include test evidence, compatibility impact, and migration or rollout notes where relevant.
- Avoid typo-only, documentation-only, cosmetic-only, or unrelated refactor submissions.
Out of scope
- Broad rewrites not required by the acceptance criteria.
- Changes to unrelated services, contracts, or user flows.
Problem
Frontend regressions are likely when API error codes, transaction states, or decimal fields change without a consumer-level check.
Objective
Deliver a production-quality improvement to API client adapters and core vault screens that creates measurable value for correctness, security, reliability, performance, or maintainability.
Implementation scope
Acceptance criteria
Required validation
PR quality bar
Out of scope