Skip to content

Commit

Permalink
fix: wallet slice
Browse files Browse the repository at this point in the history
  • Loading branch information
Argeare5 committed Jan 11, 2024
1 parent 9fce527 commit 9233aee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/web3/store/walletSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ export function createWalletSlice({
const publicClient = getPublicClient(config);
const walletClient = await getWalletClient(config);

console.log('publicClient', publicClient);
console.log('walletClient', walletClient);

if (publicClient && walletClient) {
const walletWithClients = {
...wallet,
Expand Down Expand Up @@ -220,7 +223,7 @@ export function createWalletSlice({
},
disconnectActiveWallet: async () => {
const config = get().wagmiConfig;
if (config) {
if (config && !!config.connectors.length) {
await disconnect(config);
set({ activeWallet: undefined });
deleteLocalStorageWallet();
Expand Down

0 comments on commit 9233aee

Please sign in to comment.