Skip to content

fix(dev): correct jm-ng websocket port#1237

Merged
theborakompanioni merged 1 commit intov2-jm-ngfrom
tbk/v2-jm-ng
May 3, 2026
Merged

fix(dev): correct jm-ng websocket port#1237
theborakompanioni merged 1 commit intov2-jm-ngfrom
tbk/v2-jm-ng

Conversation

@theborakompanioni
Copy link
Copy Markdown
Collaborator

No description provided.

@theborakompanioni theborakompanioni marked this pull request as ready for review May 3, 2026 12:23
@theborakompanioni theborakompanioni merged commit 00f1e0e into v2-jm-ng May 3, 2026
@theborakompanioni theborakompanioni deleted the tbk/v2-jm-ng branch May 3, 2026 12:23
theborakompanioni added a commit that referenced this pull request May 5, 2026
…#1240)

* chore(regtest): initial joinmarket-ng backend for regtest environment

Adds jmwalletd, directory servers, makers, and bitcoind to the regtest
docker-compose environment so jam can be developed against the jm-ng
backend end-to-end.

chore(regtest): wire docker compose env and vite dev proxy for jm-ng

Connects the local regtest containers into a single compose network,
adds tor and fund-wallet helpers, and points Vite's dev proxy at the
local jmwalletd instance.

fix(tags): recognize cj-change, used-empty, and flagged UTXO statuses

joinmarket-ng's WalletService emits four statuses jam's JmPlainTagValue
didn't cover: 'cj-change' (deanonymising change from our CJ),
'used-empty' (previously-used address with zero balance), and 'flagged'
(address shared in a CJ that later failed). They fell through to the
generic 'default' badge with no distinguishing styling.

Add them to JmPlainTagValue and the status->variant map. 'used-empty'
maps to the existing 'used' variant, 'flagged' to 'reused' (both signal
a used address the user should avoid reusing). Add a dedicated
'cj-change' badge variant (emerald) next to 'cj-out' so the
deanonymising change output is visually distinct from an equal-amount
CJ output.

fix(send): keep direct send available with maker

Only block collaborative sends while the maker service is running. Direct sends stay enabled and the form explains why the collaborative toggle is unavailable.

Changelog: Allow direct sends while the maker service is running

docs(dev): explain jm-ng backend workflow

fix(auth): only clear auth on invalid_token 401s

Previously every 401 response cleared the session and logged the user out. jm-ng returns 401 for service-state errors (e.g. POST /tumbler/stop when nothing is running), which should never drop the session. Inspect the WWW-Authenticate header and only clear auth when the server signals ``error="invalid_token"``.

Changelog: Non-auth 401 responses no longer log the user out.

fix(dev): proxy /jmws to the jm-ng HTTPS port

jm-ng serves WebSocket on the same port as the HTTPS API. The `jm-ng:dev` script used to override JMWALLETD_WEBSOCKET_PORT to 32283, but the regtest stack exposes that port without a matching listener, so vite proxied WebSocket upgrades into a dead port and the handshake returned empty. Default the env var to JMWALLETD_API_PORT and drop the override.

Changelog: Fix WebSocket proxying in the local jm-ng dev setup.

fix(dev): correct jm-ng websocket port and proxy targets

Update the README and developer docs to reflect that both ports must be
set when overriding for a custom jm-ng setup.

fix(dev): correct jm-ng websocket port (#1237)

chore(dev): distinct server configs for various backends

* chore(regtest): address jm-ng review comments

---------

Co-authored-by: m0wer <m0wer@sgn.space>
Co-authored-by: Parth Bandwal <143504541+parrth20@users.noreply.github.com>
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