From f07b4b56c5ff82ae69b8a0edb578e4d75a582334 Mon Sep 17 00:00:00 2001 From: joaquim-verges Date: Wed, 12 Nov 2025 22:46:32 +0000 Subject: [PATCH] [SDK] Rename otherWallet to allConnectedWallets in autoConnect callback (#8408) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR focuses on renaming the `otherWallet` parameter to `allConnectedWallets` in the `onConnect` callback to improve clarity and consistency in the code. ### Detailed summary - Updated the `onConnect` callback type in `packages/thirdweb/src/wallets/connection/types.ts` to use `OnConnectCallback`. - Renamed `otherWallet` to `allConnectedWallets` in the `onConnect` function signature. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .changeset/clear-kiwis-rule.md | 5 +++++ packages/thirdweb/src/wallets/connection/types.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/clear-kiwis-rule.md diff --git a/.changeset/clear-kiwis-rule.md b/.changeset/clear-kiwis-rule.md new file mode 100644 index 00000000000..1c0cd152ec8 --- /dev/null +++ b/.changeset/clear-kiwis-rule.md @@ -0,0 +1,5 @@ +--- +"thirdweb": patch +--- + +Rename otherWallet to allConnectedWallets in autoConnect onConnect callback diff --git a/packages/thirdweb/src/wallets/connection/types.ts b/packages/thirdweb/src/wallets/connection/types.ts index 56ccd8cea77..f77537db9e3 100644 --- a/packages/thirdweb/src/wallets/connection/types.ts +++ b/packages/thirdweb/src/wallets/connection/types.ts @@ -1,5 +1,6 @@ import type { Chain } from "../../chains/types.js"; import type { ThirdwebClient } from "../../client/client.js"; +import type { OnConnectCallback } from "../../react/core/hooks/connection/types.js"; import type { Wallet } from "../../wallets/interfaces/wallet.js"; import type { SmartWalletOptions } from "../../wallets/smart/types.js"; import type { AppMetadata } from "../../wallets/types.js"; @@ -108,7 +109,7 @@ export type AutoConnectProps = { * /> * ``` */ - onConnect?: (activeWallet: Wallet, allConnectedWallets: Wallet[]) => void; + onConnect?: OnConnectCallback; /** * Optional chain to autoconnect to