refactor(types): extract tx-Tron + portfolio-coverage type slices - #843
Draft
graciangabriel8 wants to merge 4 commits into
Draft
refactor(types): extract tx-Tron + portfolio-coverage type slices#843graciangabriel8 wants to merge 4 commits into
graciangabriel8 wants to merge 4 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Appends
UnsignedTronTx(the tx-Tron slice of the plan's 8-exporttxcluster) to the existingsrc/types/tx.ts. Createssrc/types/portfolio.tswith the portfolio-coverage slice (CoverageStatus,PortfolioCoverage,UnpricedAsset— 3 of the plan's 23-exportportfoliocluster), importingSupportedChainfrom./chains.js.Placement judgment:
UnsignedTronTxprecedesDecodedArg/HumanDecode/TxVerificationin the original file's line order, but lands intx.tsafter them here because tx-core was extracted first in PR #840 (itsTxVerificationis a dependency ofUnsignedTronTx.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'scoverage: PortfolioCoveragefield 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 carriesimport 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.