From afea6b67822a7a2b96901ec851441d27ee0f7a52 Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Wed, 11 Dec 2024 20:38:05 -0500 Subject: [PATCH] fix(connect): pass through to `connector.connect` --- .changeset/honest-eggs-buy.md | 5 +++++ packages/core/src/actions/connect.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/honest-eggs-buy.md diff --git a/.changeset/honest-eggs-buy.md b/.changeset/honest-eggs-buy.md new file mode 100644 index 0000000000..d6398348f2 --- /dev/null +++ b/.changeset/honest-eggs-buy.md @@ -0,0 +1,5 @@ +--- +"@wagmi/core": patch +--- + +Passed through parameters to `connector.connect` in `connect` action. diff --git a/packages/core/src/actions/connect.ts b/packages/core/src/actions/connect.ts index 3856fa7586..f69809e504 100644 --- a/packages/core/src/actions/connect.ts +++ b/packages/core/src/actions/connect.ts @@ -78,7 +78,8 @@ export async function connect< config.setState((x) => ({ ...x, status: 'connecting' })) connector.emitter.emit('message', { type: 'connecting' }) - const data = await connector.connect({ chainId: parameters.chainId }) + const { connector: _, ...rest } = parameters + const data = await connector.connect(rest) const accounts = data.accounts as readonly [Address, ...Address[]] connector.emitter.off('connect', config._internal.events.connect)