Skip to content

fix: make dex optional on the clearinghouseState subscription - #8

Open
camelpunch wants to merge 1 commit into
skedzior:mainfrom
code-supply:fix/clearinghouse-state-subscription-dex
Open

fix: make dex optional on the clearinghouseState subscription#8
camelpunch wants to merge 1 commit into
skedzior:mainfrom
code-supply:fix/clearinghouse-state-subscription-dex

Conversation

@camelpunch

Copy link
Copy Markdown

Another possible bug found by Claude. I want to automate a vault, which is on the first perp dex, which is "" according to the docs (example). Slop:

validate_required treated dex as always missing whenever it was set to "", the documented default for the main perps market used everywhere else in the package (Info.ClearinghouseState, meta, metaAndAssetCtxs, perpDexStatus). That made it impossible to subscribe to the main market's clearinghouse state at all. dex is now optional, defaulting to "" like its Info sibling, while a named builder-deployed dex can still be passed explicitly.

validate_required treated dex as always missing whenever it was set
to "", the documented default for the main perps market used
everywhere else in the package (Info.ClearinghouseState, meta,
metaAndAssetCtxs, perpDexStatus). That made it impossible to
subscribe to the main market's clearinghouse state at all. dex is now
optional, defaulting to "" like its Info sibling, while a named
builder-deployed dex can still be passed explicitly.
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