Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/kind-starfishes-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Respect passed in chain when connecting to inapp wallet with wallet strategy
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export async function siweAuthenticate(args: {
client: ThirdwebClient;
ecosystem?: Ecosystem;
}): Promise<AuthStoredTokenWithCookieReturnType> {
const { wallet, chain } = args;
const { wallet, chain, client, ecosystem } = args;
// only connect if the wallet doesn't already have an account
const account =
wallet.getAccount() || (await wallet.connect({ client: args.client }));
const clientFetch = getClientFetch(args.client, args.ecosystem);
wallet.getAccount() || (await wallet.connect({ client, chain }));
const clientFetch = getClientFetch(client, ecosystem);

const payload = await (async () => {
const path = getLoginUrl({
Expand Down
Loading