Skip to content

Thread network through local-HM for testnet2 tenant spawns#54

Merged
vrogojin merged 1 commit into
@vrogojin/uxffrom
vrogojin/uxf-p6-hm-testnet2
Jul 8, 2026
Merged

Thread network through local-HM for testnet2 tenant spawns#54
vrogojin merged 1 commit into
@vrogojin/uxffrom
vrogojin/uxf-p6-hm-testnet2

Conversation

@vrogojin

@vrogojin vrogojin commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Fix: sphere trader spawn --network testnet2 was accepted by the CLI but the HM booted with UNICITY_NETWORK=testnet. So the tenant ran against v1 (retired) gateway.

Change: thread network through LocalHmConfigbuildHmEnvUNICITY_NETWORK on the HM container. Also widened the type to include 'testnet2'. Supports SPHERE_LOCAL_HM_NETWORK env override.

Companion to sphere-sdk PR #656 (wave 6-P2-20 retry wrapper for testnet2 gateway 5xx transients).

…or testnet2

Adds `network` to `LocalHmConfig` and threads the trader spawn's
`--network` option through `ensureLocalHM` → `buildHmEnv` →
`UNICITY_NETWORK` on the HM container. The HM then inherits the
network into every tenant it spawns (trader, escrow, etc).

Before this change, `sphere trader spawn --network testnet2` was
accepted by the CLI but the HM booted with UNICITY_NETWORK=testnet,
so tenants ran against v1 gateway (which is retired) instead of
testnet2.

Widened the `network` type to include 'testnet2' at three sites:
- LocalHmConfig.network (new optional field)
- TraderSpawnOptions.network (was: testnet|mainnet|dev)
- TraderSpawnCliOpts.network (was: testnet|mainnet|dev)
- --network help text updated

Also supports SPHERE_LOCAL_HM_NETWORK env var as a fallback source.

Companion to sphere-sdk PR #656 (wave 6-P2-20 retry wrapper) which
handles testnet2 gateway 5xx transients.
@vrogojin vrogojin merged commit e08cf3b into @vrogojin/uxf Jul 8, 2026
@vrogojin vrogojin deleted the vrogojin/uxf-p6-hm-testnet2 branch July 8, 2026 15:05
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