Skip to content

Commit ff2ea97

Browse files
refactor(client): rename WalletState to WalletStateClient to avoid conflict with on-chain state
1 parent 170452d commit ff2ea97

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/react/store.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
import * as anchor from '@coral-xyz/anchor';
99
import { create } from 'zustand';
1010
import { createJSONStorage, persist } from 'zustand/middleware';
11-
import { WalletState, WalletInfo, WalletConfig, ConnectOptions, SignOptions } from '../types';
11+
import { WalletStateClient, WalletInfo, WalletConfig, ConnectOptions, SignOptions } from '../types';
1212
import { DEFAULT_COMMITMENT, DEFAULTS, STORAGE_KEYS } from '../config';
1313
import { logger } from '../core/logger';
1414
import { connectAction, disconnectAction, signMessageAction } from '../actions';
15-
import { SmartWalletActionArgs } from '../contract-integration';
15+
import { SmartWalletActionArgs } from '../contract';
1616

1717
// AsyncStorage dynamic import remains unchanged
1818
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -68,7 +68,7 @@ const storage = {
6868
},
6969
};
7070

71-
export const useWalletStore = create<WalletState>()(
71+
export const useWalletStore = create<WalletStateClient>()(
7272
persist(
7373
(set, get) => ({
7474
wallet: null,
@@ -141,7 +141,7 @@ export const useWalletStore = create<WalletState>()(
141141
{
142142
name: STORAGE_KEYS.WALLET,
143143
storage: createJSONStorage(() => storage),
144-
partialize: (state: WalletState) => ({
144+
partialize: (state: WalletStateClient) => ({
145145
wallet: state.wallet,
146146
config: state.config,
147147
}),

0 commit comments

Comments
 (0)