fix: noble client init failure must not block trading - #2112
Open
yasyzb wants to merge 1 commit into
Open
Conversation
|
@yasyzb is attempting to deploy a commit to the dYdX Trading Team on Vercel. A member of the Team first needs to authorize it. |
yasyzb
force-pushed
the
fix/noble-client-init-error-blocks-trading
branch
from
June 6, 2026 15:05
06dbc73 to
e0dd69b
Compare
The noble (IBC cross-chain) client is optional and is only required for cross-chain deposit/withdrawal transfers. However, when the nobleValidator endpoint is empty or unreachable (e.g. in local dev environments), the client initialization throws an error, which previously set `errorInitializing: true` in Redux state. This flag propagated through the following chain: errorInitializing: true → selectClientInitializationError: true → getConnectionError returns CHAIN_DISRUPTION → tradingUnavailable: true → place-order button permanently disabled Fix: 1. Skip StargateClient.connect() when nobleValidator URL is empty/falsy. 2. Remove `errorInitializing: true` from the noble client onError handler. Noble is not a prerequisite for core perpetuals trading; its failure should only mark `nobleClientReady: false`.
yasyzb
force-pushed
the
fix/noble-client-init-error-blocks-trading
branch
from
June 6, 2026 15:06
e0dd69b to
c5fcf3d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When the
nobleValidatorendpoint is empty or unreachable (common in local dev environments that don't configure Noble cross-chain support), the nobleStargateClientinitialization throws an error.Previously, this error set
errorInitializing: truein Redux state, which propagated through the following chain:This means any developer running a local dYdX environment without a Noble validator configured cannot place any orders, even though Noble is only needed for cross-chain IBC transfers — not core perpetuals trading.
Root Cause
In
compositeClientManager.ts, the noble clientonErrorhandler setserrorInitializing: true, which is the same flag used to signal that the composite client (the core trading client) has failed. Noble failure is incorrectly treated as a fatal initialization error.Fix
StargateClient.connect()whennobleValidatorURL is empty/falsy, rather than passing an empty string which causes an immediate connection error.errorInitializing: truefrom the noble clientonErrorhandler. Noble client failure now only setsnobleClientReady: false, which correctly disables cross-chain transfer UI without affecting trading.Impact
nobleClientReady.