@b3dotfun/sdk 0.0.50-alpha.0 → 0.0.50-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,9 @@
1
1
  import { useAuthStore } from "../../../global-account/react/index.js";
2
2
  import { debugB3React } from "../../../shared/utils/debug.js";
3
- import { client } from "../../../shared/utils/thirdweb.js";
4
- import { useEffect, useMemo, useState } from "react";
5
- import { viemAdapter } from "thirdweb/adapters/viem";
3
+ import { useEffect, useState } from "react";
6
4
  import { useConnectedWallets, useWalletInfo } from "thirdweb/react";
7
5
  const debug = debugB3React("useFirstEOA");
8
- export function useFirstEOA(chain) {
6
+ export function useFirstEOA() {
9
7
  const wallets = useConnectedWallets();
10
8
  const isConnected = useAuthStore(state => state.isConnected);
11
9
  const [firstEOA, setFirstEOA] = useState(undefined);
@@ -32,27 +30,9 @@ export function useFirstEOA(chain) {
32
30
  };
33
31
  autoSelectFirstEOAWallet();
34
32
  }, [isConnected, wallets]);
35
- const walletClient = useMemo(() => {
36
- if (!firstEOA)
37
- return undefined;
38
- if (!chain)
39
- return undefined;
40
- try {
41
- const viemClientWallet = viemAdapter.wallet.toViem({
42
- client,
43
- chain,
44
- wallet: firstEOA,
45
- });
46
- return viemClientWallet;
47
- }
48
- catch (err) {
49
- console.error("Error setting wallet client", err);
50
- }
51
- }, [firstEOA, chain]);
52
33
  return {
53
34
  account: firstEOA,
54
35
  address,
55
36
  info: walletInfo,
56
- walletClient,
57
37
  };
58
38
  }