Skip to content

refactor(types): extract tx-Tron + portfolio-coverage type slices - #843

Draft
graciangabriel8 wants to merge 4 commits into
refactor/717-3-positionsfrom
refactor/717-4-tx-tron-pfcoverage
Draft

refactor(types): extract tx-Tron + portfolio-coverage type slices#843
graciangabriel8 wants to merge 4 commits into
refactor/717-3-positionsfrom
refactor/717-4-tx-tron-pfcoverage

Conversation

@graciangabriel8

@graciangabriel8 graciangabriel8 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Appends UnsignedTronTx (the tx-Tron slice of the plan's 8-export tx cluster) to the existing src/types/tx.ts. Creates src/types/portfolio.ts with the portfolio-coverage slice (CoverageStatus, PortfolioCoverage, UnpricedAsset — 3 of the plan's 23-export portfolio cluster), importing SupportedChain from ./chains.js.

Placement judgment: UnsignedTronTx precedes DecodedArg/HumanDecode/TxVerification in the original file's line order, but lands in tx.ts after them here because tx-core was extracted first in PR #840 (its TxVerification is a dependency of UnsignedTronTx.verification) — append order in a multi-PR shared file follows dependency order, not the source file's original absolute position. Coverage cluster placement (CoverageStatus/PortfolioCoverage/UnpricedAsset) is unambiguous: every later per-chain portfolio slice's coverage: PortfolioCoverage field depends on it, so it must extract before the Solana/Tron/UTXO+summaries slices in PRs 8–10.

Part of #717

Note: export * from "./x.js" re-exports but does not locally bind names, so index.ts also carries import type { ... } from "./x.js" for every moved name its own remaining declarations still reference by bare identifier — scope-plumbing that vanishes once the last domain leaves the file.

graciangabriel8 and others added 4 commits August 21, 2026 15:23
Part of #717. Appends UnsignedTronTx (the tx-Tron slice of the plan's
8-export `tx` cluster) to the existing src/types/tx.ts, after the
tx-core types (DecodedArg/HumanDecode/TxVerification) extracted in the
prior PR — no new import needed since TxVerification already lives in
the same file.

Creates src/types/portfolio.ts with the portfolio-coverage slice
(CoverageStatus, PortfolioCoverage, UnpricedAsset — 3 of the plan's
23-export `portfolio` cluster), importing SupportedChain from
./chains.js. These three are the coverage-status building blocks every
later per-chain portfolio slice's `coverage: PortfolioCoverage` field
depends on, so they extract first per the acyclicity rule; the
Solana/Tron/UTXO+summaries slices land in later PRs appended to this
same file.

index.ts gains export * from ./portfolio.js; the tx.ts barrel entry
already existed from the prior PR.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… PortfolioSummary/MultiWalletPortfolioSummary

Both interfaces' coverage field still lives inline in index.ts. No
import needed for UnsignedTronTx despite the merge history — every
remaining mention of that name in the body is comment prose
(UnsignedSolanaTx/UnsignedBitcoinTx JSDoc saying "parallel to
UnsignedTronTx"), not a real code reference.
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.

1 participant