Skip to content

Commit

Permalink
fix(connect): pass through to connector.connect
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Dec 12, 2024
1 parent 8b0726c commit afea6b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/honest-eggs-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wagmi/core": patch
---

Passed through parameters to `connector.connect` in `connect` action.
3 changes: 2 additions & 1 deletion packages/core/src/actions/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit afea6b6

Please sign in to comment.