Skip to content

Commit 2ef53e7

Browse files
authored
fix: initial store bug on first load (#1903)
* fix: initial store bug on first load * fix: set user undefined in default store state
1 parent c0d17d1 commit 2ef53e7

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

account-kit/core/src/hydrate.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ export function hydrate(
7171
config,
7272
),
7373
});
74-
} else if (!config.store.persist.hasHydrated()) {
75-
config.store.setState({
76-
...config.store.getInitialState(),
77-
user: undefined,
78-
});
7974
}
8075

8176
const initialWagmiState =

account-kit/core/src/store/store.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ const createInitialStoreState = (
193193
),
194194
smartAccountClients: createEmptySmartAccountClientState(chains),
195195
smartWalletClients: createEmptySmartWalletClientState(chains),
196+
user: undefined,
196197
};
197198

198199
if ("solana" in params && params.solana) {

0 commit comments

Comments
 (0)