File tree Expand file tree Collapse file tree 5 files changed +21
-10
lines changed Expand file tree Collapse file tree 5 files changed +21
-10
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " thirdweb " : patch
3
+ ---
4
+
5
+ Initialize activeWalletConnectionStatus as 'unknown' instead of 'disconnected'
Original file line number Diff line number Diff line change 316
316
"clean" : " rimraf dist" ,
317
317
"size" : " size-limit" ,
318
318
"test:watch" : " vitest -c ./test/vitest.config.ts dev" ,
319
- "test" : " vitest run -c ./test/vitest.config.ts --coverage" ,
320
- "test:cov" : " vitest dev -c ./test/vitest.config.ts --coverage" ,
321
- "test:ui" : " vitest dev -c ./test/vitest.config.ts --coverage --ui" ,
322
- "test:dev" : " vitest run -c ./test/vitest.config.ts" ,
319
+ "test" : " NODE_OPTIONS=--max-old-space-size=8192 vitest run -c ./test/vitest.config.ts --coverage" ,
320
+ "test:cov" : " NODE_OPTIONS=--max-old-space-size=8192 vitest dev -c ./test/vitest.config.ts --coverage" ,
321
+ "test:ui" : " NODE_OPTIONS=--max-old-space-size=8192 vitest dev -c ./test/vitest.config.ts --coverage --ui" ,
322
+ "test:dev" : " NODE_OPTIONS=--max-old-space-size=8192 vitest run -c ./test/vitest.config.ts" ,
323
323
"test:react" : " vitest run -c ./test/vitest.config.ts dev --ui src/react" ,
324
324
"typedoc" : " node scripts/typedoc.mjs && node scripts/parse.mjs" ,
325
325
"update-version" : " node scripts/version.mjs" ,
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ describe("useAddConnectedWallet", () => {
48
48
} ,
49
49
) ;
50
50
const { result } = renderHook ( ( ) => useConnect ( ) , { wrapper } ) ;
51
- expect ( statusResult . current ) . toEqual ( "disconnected " ) ;
51
+ expect ( statusResult . current ) . toEqual ( "unknown " ) ;
52
52
await result . current . connect ( async ( ) => wallet ) ;
53
53
expect ( statusResult . current ) . toEqual ( "connected" ) ;
54
54
@@ -67,7 +67,7 @@ describe("useAddConnectedWallet", () => {
67
67
} ,
68
68
) ;
69
69
const { result } = renderHook ( ( ) => useConnect ( ) , { wrapper } ) ;
70
- expect ( statusResult . current ) . toEqual ( "disconnected " ) ;
70
+ expect ( statusResult . current ) . toEqual ( "unknown " ) ;
71
71
await result . current . connect ( async ( ) => wallet ) ;
72
72
expect ( statusResult . current ) . toEqual ( "connected" ) ;
73
73
@@ -85,7 +85,7 @@ describe("useAddConnectedWallet", () => {
85
85
wrapper,
86
86
} ,
87
87
) ;
88
- expect ( statusResult . current ) . toEqual ( "disconnected " ) ;
88
+ expect ( statusResult . current ) . toEqual ( "unknown " ) ;
89
89
const { result } = renderHook ( ( ) => useConnect ( ) , { wrapper } ) ;
90
90
await result . current . connect ( async ( ) => {
91
91
throw new Error ( "test" ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,11 @@ import type { SmartWalletOptions } from "../smart/types.js";
15
15
import type { WalletId } from "../wallet-types.js" ;
16
16
17
17
type WalletIdToConnectedWalletMap = Map < string , Wallet > ;
18
- export type ConnectionStatus = "connected" | "disconnected" | "connecting" ;
18
+ export type ConnectionStatus =
19
+ | "connected"
20
+ | "disconnected"
21
+ | "connecting"
22
+ | "unknown" ;
19
23
20
24
const CONNECTED_WALLET_IDS = "thirdweb:connected-wallet-ids" ;
21
25
const LAST_ACTIVE_EOA_ID = "thirdweb:active-wallet-id" ;
@@ -47,7 +51,7 @@ export function createConnectionManager(storage: AsyncStorage) {
47
51
const activeAccountStore = createStore < Account | undefined > ( undefined ) ;
48
52
const activeWalletChainStore = createStore < Chain | undefined > ( undefined ) ;
49
53
const activeWalletConnectionStatusStore =
50
- createStore < ConnectionStatus > ( "disconnected " ) ;
54
+ createStore < ConnectionStatus > ( "unknown " ) ;
51
55
52
56
const definedChainsStore = createStore < Map < number , Chain > > ( new Map ( ) ) ;
53
57
Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ export default defineConfig({
38
38
globalSetup : [ join ( __dirname , "./globalSetup.ts" ) ] ,
39
39
testTimeout : 90_000 ,
40
40
retry : 3 ,
41
- maxConcurrency : 3 ,
41
+ maxConcurrency : 1 ,
42
+ maxWorkers : 4 ,
43
+ minWorkers : 2 ,
42
44
bail : 1 ,
43
45
// clear any mocks between any tests
44
46
clearMocks : true ,
You can’t perform that action at this time.
0 commit comments