From 3d13c28cfc6b080772c0bf0317e45ea358686879 Mon Sep 17 00:00:00 2001 From: yushen Date: Wed, 4 Feb 2026 13:27:33 +0800 Subject: [PATCH] feat(store): pass hubId and token to GatewayClient for verification Co-Authored-By: Claude Opus 4.5 --- packages/store/src/connection-store.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/store/src/connection-store.ts b/packages/store/src/connection-store.ts index 76589656..19dde590 100644 --- a/packages/store/src/connection-store.ts +++ b/packages/store/src/connection-store.ts @@ -73,6 +73,8 @@ let client: GatewayClient | null = null function createClient( url: string, deviceId: string, + hubId: string, + token: string, set: (s: Partial) => void, getState: () => ConnectionStoreState, ): GatewayClient { @@ -80,6 +82,8 @@ function createClient( url, deviceId, deviceType: "client", + hubId, + token, }) // Sync connection state changes to the store .onStateChange((connectionState) => { @@ -192,7 +196,7 @@ export const useConnectionStore = create()( agentId: code.agentId, }) - client = createClient(code.gateway, get().deviceId, set, get) + client = createClient(code.gateway, get().deviceId, code.hubId, code.token, set, get) client.connect() },