From 15aa33000b0aebed7bab603feb7a08d41ed02241 Mon Sep 17 00:00:00 2001 From: Satoshi Qazi Muhammed Date: Wed, 8 Jul 2026 10:21:56 -0700 Subject: [PATCH] fix: don't show perpetual "Connecting" for Tron chains in Networks list Real user reported Tron stuck showing "Connecting..." forever in the Networks screen after the ChainRegistry fix (which correctly skips creating a ChainConnection for Tron, since TronGrid is a plain REST API, not WSS). NetworkListAdapterItemFactory.getConnectingState() rendered every non-Connected state (including the Disconnected default a missing connection pool entry falls back to) as "Connecting" with an indefinite shimmer - there was no way to distinguish "never had a connection to begin with" from "still negotiating one". Tron doesn't have a meaningful WS connection state at all (its actual balance/transfer operations poll TronGridApi directly, confirmed independent of ChainConnection), so there's nothing correct to show here - treat it the same as the already-existing isDisabled early return (no status badge) rather than defaulting into the generic "still connecting" UI. --- .../networkList/common/NetworkListAdapterItemFactory.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/feature-settings-impl/src/main/java/io/novafoundation/nova/feature_settings_impl/presentation/networkManagement/networkList/common/NetworkListAdapterItemFactory.kt b/feature-settings-impl/src/main/java/io/novafoundation/nova/feature_settings_impl/presentation/networkManagement/networkList/common/NetworkListAdapterItemFactory.kt index e51b8680..60d44e3f 100644 --- a/feature-settings-impl/src/main/java/io/novafoundation/nova/feature_settings_impl/presentation/networkManagement/networkList/common/NetworkListAdapterItemFactory.kt +++ b/feature-settings-impl/src/main/java/io/novafoundation/nova/feature_settings_impl/presentation/networkManagement/networkList/common/NetworkListAdapterItemFactory.kt @@ -61,6 +61,12 @@ class RealNetworkListAdapterItemFactory( private fun getConnectingState(network: NetworkState): ConnectionStateModel? { if (network.chain.isDisabled) return null + // Tron chains never get a ChainConnection/SocketService (TronGrid is a plain REST API, not + // WSS JSON-RPC - see ChainRegistry.registerConnection()), so connectionState is always the + // Disconnected default here, never Connected. Treat that as "nothing to show" rather than + // falling into the generic "Connecting" state below, which would otherwise spin forever. + if (network.chain.isTronBased) return null + return when (network.connectionState) { is SocketStateMachine.State.Connected -> null