We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7306818 commit 10085a7Copy full SHA for 10085a7
.changeset/odd-rooms-sleep.md
@@ -0,0 +1,5 @@
1
+---
2
+"thirdweb": patch
3
4
+
5
+Only attempt autoconnect once
packages/thirdweb/src/wallets/connection/autoConnectCore.ts
@@ -19,6 +19,8 @@ import {
19
import type { WalletId } from "../wallet-types.js";
20
import type { AutoConnectProps } from "./types.js";
21
22
+let isAutoConnectAttempted = false;
23
24
/**
25
* @internal
26
*/
@@ -47,6 +49,12 @@ export const autoConnectCore = async ({
47
49
const { wallets, onConnect } = props;
48
50
const timeout = props.timeout ?? 15000;
51
52
+ if (isAutoConnectAttempted) {
53
+ return false;
54
+ }
55
56
+ isAutoConnectAttempted = true;
57
58
let autoConnected = false;
59
manager.isAutoConnecting.setValue(true);
60
0 commit comments