Files
zeekayandHanzo Dev d00b9f0f6a A network with no X-Chain is a shape we support, not a failure
FetchState asked for an X-Chain context and returned the error when the
network had none, so a P-only node -- Quasar-era mainnet registers P and C
and no X -- could not build a wallet at all. That contradicts the design it
was already documented to have: P required, X and C opt-in.

The design had been written. "wallet/primary: decomplect — P required, X/C
opt-in" landed FetchPState, AttachXChain and the fail-soft matcher, and four
commits later "deps: go.mod refresh" -- a commit whose other 30 files are CI
workflows and go.mod -- reverted this one file wholesale, taking all three
with it and restoring the hard-failing FetchState. Nothing decided that; a
refresh clobbered it.

So this restores that shape rather than inventing one. FetchPState fetches P
and nothing else, which is what a sovereign-L1 spawn, a validator operation
or a CreateChainTx caller needs. AttachXChain is opt-in, idempotent, and
fail-soft only on "this network has no X" -- every other RPC error still
reaches the caller. FetchState is the P+X convenience that calls both.

nil XCTX is how "not attached" reads. The attach also pulls X's UTXOs, which
the reverted code left to a comment saying they were fetched separately: an X
wallet built over an empty set reports insufficient funds whatever the
balance.

TestFetchState_XChainNotRegistered went from failing to passing, and it could
only fail once the file compiled again. TestIsXChainNotEnabled returns with
the matcher it covers.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-30 15:26:36 -07:00
..
2026-08-21 09:33:15 -07:00
2026-08-20 20:20:24 -07:00