From 58127e0bb2a9f514f9adb59baae94b00f149ca27 Mon Sep 17 00:00:00 2001 From: Daniel Isaac Geslin Date: Fri, 20 Sep 2024 14:31:49 +0200 Subject: [PATCH] bug/query-params-not-working (#1098) --- apps/connect/src/hooks/useConnectConfig.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/apps/connect/src/hooks/useConnectConfig.ts b/apps/connect/src/hooks/useConnectConfig.ts index 91df0d04..cbe21231 100644 --- a/apps/connect/src/hooks/useConnectConfig.ts +++ b/apps/connect/src/hooks/useConnectConfig.ts @@ -51,17 +51,19 @@ export const useConnectConfig = () => { () => ({ ...defaultConfig, chains: networks!, - searchTx: { - ...(txHash && { txHash }), - ...(sourceChain && { chainName: sourceChain }), + ui: { + ...(defaultConfig.ui as NonNullable), + searchTx: { + ...(txHash && { txHash }), + ...(sourceChain && { chainName: sourceChain }), + }, + defaultInputs: { + ...(sourceChain && { fromChain: sourceChain }), + ...(targetChain && { toChain: targetChain }), + ...(token && { tokenKey: token }), + ...(requiredNetwork && { requiredChain: requiredNetwork }), + }, }, - bridgeDefaults: { - ...(sourceChain && { fromChain: sourceChain }), - ...(targetChain && { toChain: targetChain }), - ...(token && { tokenKey: token }), - ...(requiredNetwork && { requiredChain: requiredNetwork }), - }, - //...(route && { routes: [route] }), }), [networks, txHash, sourceChain, targetChain, token, requiredNetwork] );