Skip to content

Commit f07b4b5

Browse files
[SDK] Rename otherWallet to allConnectedWallets in autoConnect callback (#8408)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## 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}` <!-- end pr-codex -->
1 parent 9442dc7 commit f07b4b5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/clear-kiwis-rule.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Rename otherWallet to allConnectedWallets in autoConnect onConnect callback

packages/thirdweb/src/wallets/connection/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { Chain } from "../../chains/types.js";
22
import type { ThirdwebClient } from "../../client/client.js";
3+
import type { OnConnectCallback } from "../../react/core/hooks/connection/types.js";
34
import type { Wallet } from "../../wallets/interfaces/wallet.js";
45
import type { SmartWalletOptions } from "../../wallets/smart/types.js";
56
import type { AppMetadata } from "../../wallets/types.js";
@@ -108,7 +109,7 @@ export type AutoConnectProps = {
108109
* />
109110
* ```
110111
*/
111-
onConnect?: (activeWallet: Wallet, allConnectedWallets: Wallet[]) => void;
112+
onConnect?: OnConnectCallback;
112113

113114
/**
114115
* Optional chain to autoconnect to

0 commit comments

Comments
 (0)