mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-07-22 18:25:50 +00:00
Merge main: pull in critical Tron ChainConnection fix + CI infra fixes
main now has the fix for a serious bug that also affects this branch: ChainRegistry unconditionally attempted a WSS connection for every chain including Tron (whose node is a plain REST API, not WSS), hanging indefinitely and blocking all subsequent chain registration in the sequential registration loop - a real freeze risk for any user with the Tron chain enabled, found while diagnosing balances_test.yml. Also pulls in the various CI-only fixes from PR #11 (unrelated to app behavior).
This commit is contained in:
@@ -215,12 +215,18 @@ class ChainRegistry(
|
||||
|
||||
if (chain.hasSubstrateRuntime) {
|
||||
runtimeProviderPool.setupRuntimeProvider(chain)
|
||||
runtimeSyncService.registerChain(chain, connection)
|
||||
runtimeSubscriptionPool.setupRuntimeSubscription(chain, connection)
|
||||
runtimeSyncService.registerChain(chain, requireNotNull(connection))
|
||||
runtimeSubscriptionPool.setupRuntimeSubscription(chain, requireNotNull(connection))
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun registerConnection(chain: Chain): ChainConnection {
|
||||
private suspend fun registerConnection(chain: Chain): ChainConnection? {
|
||||
// Tron nodes are plain REST APIs (TronGrid), not WSS JSON-RPC endpoints - ChainConnection's
|
||||
// SocketService can only speak the latter, so attempting to set one up here would hang
|
||||
// indefinitely instead of failing fast. Tron balance/transfer operations already go through
|
||||
// their own dedicated TronGridApi client, independent of this connection pool.
|
||||
if (chain.isTronBased) return null
|
||||
|
||||
val connection = connectionPool.setupConnection(chain)
|
||||
|
||||
if (chain.isEthereumBased) {
|
||||
|
||||
Reference in New Issue
Block a user