Skip to content

fix(crypto): cost basis method and chain are hardcoded in handle_crypto_cost_basis_check - #153

Merged
elasticdotventures merged 2 commits into
mainfrom
issue-150-crypto
Aug 9, 2026
Merged

fix(crypto): cost basis method and chain are hardcoded in handle_crypto_cost_basis_check#153
elasticdotventures merged 2 commits into
mainfrom
issue-150-crypto

Conversation

@elasticdotventures

Copy link
Copy Markdown
Member

Implements #150

  • cost_basis_method, chain, address are now caller-supplied
  • No silent default — unrecognized method returns an error
  • SpecificIdentification variant for lot-level tracking
  • Response echoes method_used, chain, address for auditability
  • Wallet-by-wallet basis scoped per (chain, address)

…t, reject unrecognized chains, fix test fixtures

- remove ComputeFeie/ComputeDepreciation contract entries (belong to separate PRs #154/#156, not this fix)
- restore missing Lei import in ledgerr-mcp/src/crypto.rs (undeclared-type compile error)
- Chain::from_str no longer silently accepts any string via an Other(..) catch-all; unmatched input now correctly returns None, matching this PR's own unrecognized_chain_returns_error test
- crypto_contract.rs: gain_loss/au_taxable_gain are Decimal, which serializes as a JSON string — fix two assertions that compared against bare floats
- crypto_contract.rs: replace check-digit-invalid placeholder LEI with the known-valid LEI already used elsewhere in this codebase
@elasticdotventures
elasticdotventures merged commit 38199d3 into main Aug 9, 2026
6 checks passed
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.

2 participants