Skip to content

fix(gui): null version#1068

Merged
binarybaron merged 1 commit into
masterfrom
fix/gui-null-version
Jun 5, 2026
Merged

fix(gui): null version#1068
binarybaron merged 1 commit into
masterfrom
fix/gui-null-version

Conversation

@binarybaron

Copy link
Copy Markdown

A maker with no advertised version arrives from the backend as JSON null (Rust Option serializing None), but typeshare types the field as version?: string, hiding the null at the type level. The guard functions in multiAddrUtils.ts only bailed on undefined, so a null version slipped through to semver.compare(null, ...), which throws "Invalid version. Must be a string. Got type object" (typeof null === "object"). Because this happens during render of the offer list, the exception propagated up and crashed the entire swap page into the error boundary.

This widens the three guard signatures to accept null and switches their checks to nullish so both null and undefined are rejected before reaching semver, which is the correct answer since a maker with no version has nothing to compare against.

@binarybaron binarybaron merged commit 503afc6 into master Jun 5, 2026
63 of 76 checks passed
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