Skip to content

fix(core): resolve new market equity metadata on save/import (#697)#732

Open
AtomicTrxn wants to merge 3 commits intoafadil:mainfrom
AtomicTrxn:codex/fix-697-market-equity-symbol-enrichment
Open

fix(core): resolve new market equity metadata on save/import (#697)#732
AtomicTrxn wants to merge 3 commits intoafadil:mainfrom
AtomicTrxn:codex/fix-697-market-equity-symbol-enrichment

Conversation

@AtomicTrxn
Copy link
Contributor

Description

Summary

  • fix new market-equity save/import preparation so MIC and quote currency are enriched before persistence validation
  • reuse the same live symbol enrichment path for manual save, bulk save, and import apply
  • keep validation strict for genuinely unresolved symbols and preserve manual quote-mode behavior

Root cause

activities_service validated new market equities before live symbol enrichment in manual save and import-apply flows. That meant ticker-only equities like DPZ or HD could pass import check but still fail on save/apply because exchange_mic and quote_ccy were not yet populated.

Fix

  • enrich missing MIC via live symbol resolution before validation for eligible market equities
  • resolve quote currency using explicit input -> existing asset -> provider quote -> MIC fallback -> terminal currency before validation
  • return the existing market-data lookup error when a new market equity still cannot be resolved

Tests

  • cargo test -p wealthfolio-core activities_service
  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace

Fixes #697

Checklist

By submitting this PR, I agree to the
CLA.

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.

[Bug] Failed to import new symbols due to missing MIC

1 participant