@b3dotfun/sdk 0.1.0 → 0.1.1-test.0

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.
Files changed (221) hide show
  1. package/dist/cjs/anyspend/react/components/AnySpend.js +1 -1
  2. package/dist/cjs/anyspend/react/components/common/GasIndicator.d.ts +1 -1
  3. package/dist/cjs/anyspend/react/components/common/GasIndicator.js +6 -16
  4. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +1 -1
  5. package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.js +1 -1
  6. package/dist/cjs/anyspend/react/components/common/TokenBalance.js +15 -4
  7. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +1 -1
  8. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +1 -1
  9. package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.js +1 -1
  10. package/dist/cjs/anyspend/react/hooks/useValidatedClientReferenceId.js +1 -1
  11. package/dist/cjs/anyspend/react/providers/AnyspendProvider.js +1 -2
  12. package/dist/cjs/global-account/react/components/AccountAssets/AccountAssets.js +7 -3
  13. package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.js +1 -1
  14. package/dist/cjs/global-account/react/components/B3DynamicModal.js +1 -15
  15. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +18 -2
  16. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +57 -35
  17. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.d.ts +6 -6
  18. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +36 -39
  19. package/dist/cjs/global-account/react/components/B3Provider/types.d.ts +27 -0
  20. package/dist/cjs/global-account/react/components/B3Provider/types.js +24 -0
  21. package/dist/cjs/global-account/react/components/B3Provider/useB3.d.ts +3 -14
  22. package/dist/cjs/global-account/react/components/B3Provider/useB3.js +10 -4
  23. package/dist/cjs/global-account/react/components/B3Provider/useB3Account.js +2 -5
  24. package/dist/cjs/global-account/react/components/B3Provider/useB3Config.d.ts +2 -10
  25. package/dist/cjs/global-account/react/components/B3Provider/useB3Config.js +17 -18
  26. package/dist/cjs/global-account/react/components/ManageAccount/NFTContent.js +2 -2
  27. package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +2 -1
  28. package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.js +1 -1
  29. package/dist/cjs/global-account/react/components/ManageAccount/channels/DiscordChannel.js +1 -1
  30. package/dist/cjs/global-account/react/components/ManageAccount/channels/EmailChannel.js +1 -1
  31. package/dist/cjs/global-account/react/components/ManageAccount/channels/PhoneChannel.js +1 -1
  32. package/dist/cjs/global-account/react/components/ManageAccount/channels/TelegramChannel.js +1 -1
  33. package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.js +1 -1
  34. package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +1 -1
  35. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +13 -2
  36. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
  37. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +1 -1
  38. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +1 -1
  39. package/dist/cjs/global-account/react/components/StyleRoot.js +2 -2
  40. package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +2 -1
  41. package/dist/cjs/global-account/react/components/index.d.ts +2 -1
  42. package/dist/cjs/global-account/react/components/index.js +6 -3
  43. package/dist/cjs/global-account/react/hooks/index.d.ts +2 -2
  44. package/dist/cjs/global-account/react/hooks/index.js +5 -3
  45. package/dist/cjs/global-account/react/hooks/useAuth.d.ts +2 -2
  46. package/dist/cjs/global-account/react/hooks/useAuth.js +2 -2
  47. package/dist/cjs/global-account/react/hooks/useAuthentication.d.ts +2 -2
  48. package/dist/cjs/global-account/react/hooks/useAuthentication.js +1 -1
  49. package/dist/cjs/global-account/react/hooks/useClient.js +1 -1
  50. package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +1 -1
  51. package/dist/cjs/global-account/react/hooks/useNotifications.js +1 -1
  52. package/dist/cjs/global-account/react/hooks/useSimBalance.d.ts +7 -0
  53. package/dist/cjs/global-account/react/hooks/useSimBalance.js +43 -11
  54. package/dist/cjs/global-account/react/hooks/useSimCollectibles.d.ts +45 -0
  55. package/dist/cjs/global-account/react/hooks/useSimCollectibles.js +190 -0
  56. package/dist/cjs/global-account/react/hooks/useTokenBalance.js +5 -5
  57. package/dist/cjs/global-account/react/hooks/useTurnkeyAuth.js +1 -1
  58. package/dist/cjs/global-account/react/hooks/useUserQuery.d.ts +7 -6
  59. package/dist/cjs/global-account/react/hooks/useUserQuery.js +39 -64
  60. package/dist/cjs/global-account/react/index.native.d.ts +2 -0
  61. package/dist/cjs/global-account/react/index.native.js +5 -1
  62. package/dist/cjs/global-account/react/stores/index.d.ts +0 -1
  63. package/dist/cjs/global-account/react/stores/index.js +1 -3
  64. package/dist/cjs/global-account/react/utils/simdune.d.ts +7 -0
  65. package/dist/cjs/global-account/react/utils/simdune.js +21 -0
  66. package/dist/esm/anyspend/react/components/AnySpend.js +2 -2
  67. package/dist/esm/anyspend/react/components/common/GasIndicator.d.ts +1 -1
  68. package/dist/esm/anyspend/react/components/common/GasIndicator.js +7 -17
  69. package/dist/esm/anyspend/react/components/common/OrderDetails.js +2 -2
  70. package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.js +2 -2
  71. package/dist/esm/anyspend/react/components/common/TokenBalance.js +16 -5
  72. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +2 -2
  73. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +2 -2
  74. package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.js +2 -2
  75. package/dist/esm/anyspend/react/hooks/useValidatedClientReferenceId.js +2 -2
  76. package/dist/esm/anyspend/react/providers/AnyspendProvider.js +1 -2
  77. package/dist/esm/global-account/react/components/AccountAssets/AccountAssets.js +7 -3
  78. package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.js +2 -2
  79. package/dist/esm/global-account/react/components/B3DynamicModal.js +2 -16
  80. package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +18 -2
  81. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +58 -34
  82. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.d.ts +6 -6
  83. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +37 -37
  84. package/dist/esm/global-account/react/components/B3Provider/types.d.ts +27 -0
  85. package/dist/esm/global-account/react/components/B3Provider/types.js +21 -0
  86. package/dist/esm/global-account/react/components/B3Provider/useB3.d.ts +3 -14
  87. package/dist/esm/global-account/react/components/B3Provider/useB3.js +10 -4
  88. package/dist/esm/global-account/react/components/B3Provider/useB3Account.js +2 -5
  89. package/dist/esm/global-account/react/components/B3Provider/useB3Config.d.ts +2 -10
  90. package/dist/esm/global-account/react/components/B3Provider/useB3Config.js +17 -18
  91. package/dist/esm/global-account/react/components/ManageAccount/NFTContent.js +3 -3
  92. package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +3 -2
  93. package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.js +2 -2
  94. package/dist/esm/global-account/react/components/ManageAccount/channels/DiscordChannel.js +2 -2
  95. package/dist/esm/global-account/react/components/ManageAccount/channels/EmailChannel.js +2 -2
  96. package/dist/esm/global-account/react/components/ManageAccount/channels/PhoneChannel.js +2 -2
  97. package/dist/esm/global-account/react/components/ManageAccount/channels/TelegramChannel.js +2 -2
  98. package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.js +2 -2
  99. package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +2 -2
  100. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +15 -4
  101. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +2 -2
  102. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +2 -2
  103. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
  104. package/dist/esm/global-account/react/components/StyleRoot.js +2 -2
  105. package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +3 -2
  106. package/dist/esm/global-account/react/components/index.d.ts +2 -1
  107. package/dist/esm/global-account/react/components/index.js +2 -1
  108. package/dist/esm/global-account/react/hooks/index.d.ts +2 -2
  109. package/dist/esm/global-account/react/hooks/index.js +2 -2
  110. package/dist/esm/global-account/react/hooks/useAuth.d.ts +2 -2
  111. package/dist/esm/global-account/react/hooks/useAuth.js +3 -3
  112. package/dist/esm/global-account/react/hooks/useAuthentication.d.ts +2 -2
  113. package/dist/esm/global-account/react/hooks/useAuthentication.js +1 -1
  114. package/dist/esm/global-account/react/hooks/useClient.js +2 -2
  115. package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
  116. package/dist/esm/global-account/react/hooks/useNotifications.js +2 -2
  117. package/dist/esm/global-account/react/hooks/useSimBalance.d.ts +7 -0
  118. package/dist/esm/global-account/react/hooks/useSimBalance.js +42 -11
  119. package/dist/esm/global-account/react/hooks/useSimCollectibles.d.ts +45 -0
  120. package/dist/esm/global-account/react/hooks/useSimCollectibles.js +187 -0
  121. package/dist/esm/global-account/react/hooks/useTokenBalance.js +6 -6
  122. package/dist/esm/global-account/react/hooks/useTurnkeyAuth.js +2 -2
  123. package/dist/esm/global-account/react/hooks/useUserQuery.d.ts +7 -6
  124. package/dist/esm/global-account/react/hooks/useUserQuery.js +37 -63
  125. package/dist/esm/global-account/react/index.native.d.ts +2 -0
  126. package/dist/esm/global-account/react/index.native.js +2 -0
  127. package/dist/esm/global-account/react/stores/index.d.ts +0 -1
  128. package/dist/esm/global-account/react/stores/index.js +0 -1
  129. package/dist/esm/global-account/react/utils/simdune.d.ts +7 -0
  130. package/dist/esm/global-account/react/utils/simdune.js +17 -0
  131. package/dist/styles/index.css +1 -1
  132. package/dist/types/anyspend/react/components/common/GasIndicator.d.ts +1 -1
  133. package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +18 -2
  134. package/dist/types/global-account/react/components/B3Provider/B3Provider.native.d.ts +6 -6
  135. package/dist/types/global-account/react/components/B3Provider/types.d.ts +27 -0
  136. package/dist/types/global-account/react/components/B3Provider/useB3.d.ts +3 -14
  137. package/dist/types/global-account/react/components/B3Provider/useB3Config.d.ts +2 -10
  138. package/dist/types/global-account/react/components/index.d.ts +2 -1
  139. package/dist/types/global-account/react/hooks/index.d.ts +2 -2
  140. package/dist/types/global-account/react/hooks/useAuth.d.ts +2 -2
  141. package/dist/types/global-account/react/hooks/useAuthentication.d.ts +2 -2
  142. package/dist/types/global-account/react/hooks/useSimBalance.d.ts +7 -0
  143. package/dist/types/global-account/react/hooks/useSimCollectibles.d.ts +45 -0
  144. package/dist/types/global-account/react/hooks/useUserQuery.d.ts +7 -6
  145. package/dist/types/global-account/react/index.native.d.ts +2 -0
  146. package/dist/types/global-account/react/stores/index.d.ts +0 -1
  147. package/dist/types/global-account/react/utils/simdune.d.ts +7 -0
  148. package/package.json +1 -1
  149. package/src/anyspend/react/components/AnySpend.tsx +2 -2
  150. package/src/anyspend/react/components/common/GasIndicator.tsx +11 -30
  151. package/src/anyspend/react/components/common/OrderDetails.tsx +2 -2
  152. package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +2 -2
  153. package/src/anyspend/react/components/common/TokenBalance.tsx +17 -5
  154. package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +2 -2
  155. package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +2 -2
  156. package/src/anyspend/react/hooks/useCreateDepositFirstOrder.ts +2 -2
  157. package/src/anyspend/react/hooks/useValidatedClientReferenceId.ts +2 -2
  158. package/src/anyspend/react/providers/AnyspendProvider.tsx +2 -5
  159. package/src/global-account/react/components/AccountAssets/AccountAssets.tsx +25 -13
  160. package/src/global-account/react/components/AvatarEditor/AvatarEditor.tsx +2 -2
  161. package/src/global-account/react/components/B3DynamicModal.tsx +2 -18
  162. package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +57 -46
  163. package/src/global-account/react/components/B3Provider/B3Provider.tsx +117 -44
  164. package/src/global-account/react/components/B3Provider/types.ts +50 -0
  165. package/src/global-account/react/components/B3Provider/useB3.ts +12 -4
  166. package/src/global-account/react/components/B3Provider/useB3Account.ts +2 -6
  167. package/src/global-account/react/components/B3Provider/useB3Config.ts +31 -18
  168. package/src/global-account/react/components/ManageAccount/NFTContent.tsx +4 -4
  169. package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +4 -2
  170. package/src/global-account/react/components/ManageAccount/SettingsProfileCard.tsx +2 -2
  171. package/src/global-account/react/components/ManageAccount/channels/DiscordChannel.tsx +2 -2
  172. package/src/global-account/react/components/ManageAccount/channels/EmailChannel.tsx +2 -2
  173. package/src/global-account/react/components/ManageAccount/channels/PhoneChannel.tsx +2 -2
  174. package/src/global-account/react/components/ManageAccount/channels/TelegramChannel.tsx +2 -2
  175. package/src/global-account/react/components/RequestPermissions/RequestPermissions.tsx +2 -2
  176. package/src/global-account/react/components/SignInWithB3/SignIn.tsx +2 -2
  177. package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +15 -4
  178. package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +2 -2
  179. package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +2 -2
  180. package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +2 -2
  181. package/src/global-account/react/components/StyleRoot.tsx +2 -2
  182. package/src/global-account/react/components/custom/ManageAccountButton.tsx +3 -2
  183. package/src/global-account/react/components/index.ts +2 -1
  184. package/src/global-account/react/hooks/index.ts +2 -2
  185. package/src/global-account/react/hooks/useAuth.ts +3 -3
  186. package/src/global-account/react/hooks/useAuthentication.ts +1 -1
  187. package/src/global-account/react/hooks/useClient.ts +2 -2
  188. package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +2 -2
  189. package/src/global-account/react/hooks/useNotifications.ts +2 -2
  190. package/src/global-account/react/hooks/useSimBalance.ts +49 -12
  191. package/src/global-account/react/hooks/useSimCollectibles.ts +238 -0
  192. package/src/global-account/react/hooks/useTokenBalance.tsx +7 -8
  193. package/src/global-account/react/hooks/useTurnkeyAuth.ts +2 -2
  194. package/src/global-account/react/hooks/useUserQuery.ts +51 -64
  195. package/src/global-account/react/index.native.ts +2 -0
  196. package/src/global-account/react/stores/index.ts +0 -1
  197. package/src/global-account/react/utils/simdune.ts +20 -0
  198. package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +0 -5
  199. package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.js +0 -12
  200. package/dist/cjs/global-account/react/hooks/useUser.d.ts +0 -60
  201. package/dist/cjs/global-account/react/hooks/useUser.js +0 -20
  202. package/dist/cjs/global-account/react/stores/configStore.d.ts +0 -24
  203. package/dist/cjs/global-account/react/stores/configStore.js +0 -30
  204. package/dist/cjs/global-account/react/stores/userStore.d.ts +0 -22
  205. package/dist/cjs/global-account/react/stores/userStore.js +0 -30
  206. package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +0 -5
  207. package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.js +0 -10
  208. package/dist/esm/global-account/react/hooks/useUser.d.ts +0 -60
  209. package/dist/esm/global-account/react/hooks/useUser.js +0 -17
  210. package/dist/esm/global-account/react/stores/configStore.d.ts +0 -24
  211. package/dist/esm/global-account/react/stores/configStore.js +0 -27
  212. package/dist/esm/global-account/react/stores/userStore.d.ts +0 -22
  213. package/dist/esm/global-account/react/stores/userStore.js +0 -27
  214. package/dist/types/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +0 -5
  215. package/dist/types/global-account/react/hooks/useUser.d.ts +0 -60
  216. package/dist/types/global-account/react/stores/configStore.d.ts +0 -24
  217. package/dist/types/global-account/react/stores/userStore.d.ts +0 -22
  218. package/src/global-account/react/components/B3Provider/AuthenticationProvider.tsx +0 -19
  219. package/src/global-account/react/hooks/useUser.ts +0 -20
  220. package/src/global-account/react/stores/configStore.ts +0 -51
  221. package/src/global-account/react/stores/userStore.ts +0 -41
@@ -5,7 +5,7 @@ import {
5
5
  StyleRoot,
6
6
  useAccountWallet,
7
7
  useAuthentication,
8
- useB3Config,
8
+ useB3,
9
9
  useIsMobile,
10
10
  } from "@b3dotfun/sdk/global-account/react";
11
11
  import Icon from "@b3dotfun/sdk/global-account/react/components/custom/Icon";
@@ -30,7 +30,7 @@ type SignInWithB3Props = Omit<SignInWithB3ModalProps, "type" | "showBackButton">
30
30
 
31
31
  export function SignIn(props: SignInWithB3Props) {
32
32
  const { className } = props;
33
- const { automaticallySetFirstEoa, partnerId } = useB3Config();
33
+ const { automaticallySetFirstEoa, partnerId } = useB3();
34
34
  const {
35
35
  address: globalAddress,
36
36
  ensName,
@@ -3,12 +3,12 @@ import {
3
3
  SignInWithB3ModalProps,
4
4
  useAuthentication,
5
5
  useAuthStore,
6
- useB3Config,
6
+ useB3,
7
7
  useGetAllTWSigners,
8
8
  useModalStore,
9
9
  } from "@b3dotfun/sdk/global-account/react";
10
10
  import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
11
- import { useCallback, useEffect, useState } from "react";
11
+ import { useCallback, useEffect, useRef, useState } from "react";
12
12
  import { useActiveAccount } from "thirdweb/react";
13
13
  import { Account } from "thirdweb/wallets";
14
14
  import { TurnkeyAuthModal } from "../TurnkeyAuthModal";
@@ -35,8 +35,19 @@ export function SignInWithB3Flow({
35
35
  source = "signInWithB3Button",
36
36
  signersEnabled = false,
37
37
  }: SignInWithB3ModalProps) {
38
- const { automaticallySetFirstEoa, enableTurnkey } = useB3Config();
39
- const { user, refetchUser } = useAuthentication(partnerId);
38
+ const { automaticallySetFirstEoa, enableTurnkey } = useB3();
39
+ const { user, refetchUser, logout } = useAuthentication(partnerId);
40
+
41
+ // FIXME Logout before login to ensure a clean state
42
+ const hasLoggedOutRef = useRef(false);
43
+ useEffect(() => {
44
+ if (hasLoggedOutRef.current) return;
45
+ if (source !== "requestPermissions") {
46
+ debug("Logging out before login");
47
+ logout();
48
+ hasLoggedOutRef.current = true;
49
+ }
50
+ }, [source, logout]);
40
51
 
41
52
  const [step, setStep] = useState<"login" | "permissions" | null>(source === "requestPermissions" ? null : "login");
42
53
  const [sessionKeyAdded, setSessionKeyAdded] = useState(source === "requestPermissions" ? true : false);
@@ -2,7 +2,7 @@ import {
2
2
  Loading,
3
3
  useAuthentication,
4
4
  useAuthStore,
5
- useB3Config,
5
+ useB3,
6
6
  useHandleConnectWithPrivy,
7
7
  } from "@b3dotfun/sdk/global-account/react";
8
8
  import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
@@ -19,7 +19,7 @@ interface SignInWithB3PrivyProps {
19
19
  }
20
20
 
21
21
  export function SignInWithB3Privy({ onSuccess, onError, chain }: SignInWithB3PrivyProps) {
22
- const { partnerId } = useB3Config();
22
+ const { partnerId } = useB3();
23
23
  const { isLoading, connectTw, fullToken } = useHandleConnectWithPrivy(chain, onSuccess);
24
24
  const setIsAuthenticating = useAuthStore(state => state.setIsAuthenticating);
25
25
  const setIsAuthenticated = useAuthStore(state => state.setIsAuthenticated);
@@ -1,4 +1,4 @@
1
- import { useAuthentication, useB3Config, useQueryB3 } from "@b3dotfun/sdk/global-account/react";
1
+ import { useAuthentication, useB3, useQueryB3 } from "@b3dotfun/sdk/global-account/react";
2
2
  import { ecosystemWalletId } from "@b3dotfun/sdk/shared/constants";
3
3
  import { client } from "@b3dotfun/sdk/shared/utils/thirdweb";
4
4
  import { Chain } from "thirdweb";
@@ -50,7 +50,7 @@ export function LoginStepContainer({ children, partnerId }: LoginStepContainerPr
50
50
  }
51
51
 
52
52
  export function LoginStep({ onSuccess, chain }: LoginStepProps) {
53
- const { partnerId, theme } = useB3Config();
53
+ const { partnerId, theme } = useB3();
54
54
  const wallet = ecosystemWallet(ecosystemWalletId, {
55
55
  partnerId: partnerId,
56
56
  });
@@ -7,7 +7,7 @@ import {
7
7
  LoginStepContainer,
8
8
  useAuthentication,
9
9
  useAuthStore,
10
- useB3Config,
10
+ useB3,
11
11
  useConnect,
12
12
  WalletRow,
13
13
  } from "@b3dotfun/sdk/global-account/react";
@@ -37,7 +37,7 @@ export function LoginStepCustom({
37
37
  maxInitialWallets = 2,
38
38
  automaticallySetFirstEoa,
39
39
  }: LoginStepCustomProps) {
40
- const { partnerId } = useB3Config();
40
+ const { partnerId } = useB3();
41
41
  const [isLoading, setIsLoading] = useState(false);
42
42
  const [showAllWallets, setShowAllWallets] = useState(false);
43
43
  const { connect } = useConnect(partnerId, chain);
@@ -1,8 +1,8 @@
1
1
  import { PropsWithChildren } from "react";
2
- import { useB3Config } from "./B3Provider/useB3Config";
2
+ import { useB3 } from "./B3Provider/useB3";
3
3
 
4
4
  export function StyleRoot({ children, id }: PropsWithChildren<{ id?: string }>) {
5
- const { theme } = useB3Config();
5
+ const { theme } = useB3();
6
6
 
7
7
  return (
8
8
  <div className="b3-root" id={id} data-theme={theme}>
@@ -1,10 +1,11 @@
1
- import { Button, StyleRoot, useModalStore, useUser } from "@b3dotfun/sdk/global-account/react";
1
+ import { Button, StyleRoot, useAuthentication, useB3, useModalStore } from "@b3dotfun/sdk/global-account/react";
2
2
  import { cn } from "@b3dotfun/sdk/shared/utils";
3
3
  import { SignInWithB3Props } from "../SignInWithB3/SignInWithB3";
4
4
 
5
5
  export function ManageAccountButton(props: SignInWithB3Props & { className?: string }) {
6
+ const { partnerId } = useB3();
6
7
  const { setB3ModalOpen, setB3ModalContentType } = useModalStore();
7
- const { isConnected } = useUser();
8
+ const { isConnected } = useAuthentication(partnerId);
8
9
 
9
10
  const handleClickManageAccount = () => {
10
11
  setB3ModalContentType({
@@ -1,8 +1,9 @@
1
1
  // TODO woj: Barrel file for all components, this might be reason of bundle size issues
2
2
  // Core Components
3
3
  export { B3DynamicModal } from "./B3DynamicModal";
4
- export { B3Provider } from "./B3Provider/B3Provider";
4
+ export { B3Provider, InnerProvider } from "./B3Provider/B3Provider";
5
5
  export { RelayKitProviderWrapper } from "./B3Provider/RelayKitProviderWrapper";
6
+ export { B3Context, type B3ContextType } from "./B3Provider/types";
6
7
  export { useB3 } from "./B3Provider/useB3";
7
8
  export { useB3Account } from "./B3Provider/useB3Account";
8
9
  export { useB3Config } from "./B3Provider/useB3Config";
@@ -39,7 +39,8 @@ export { useQueryBSMNT } from "./useQueryBSMNT";
39
39
  export { useRemoveSessionKey } from "./useRemoveSessionKey";
40
40
  export { useRouter } from "./useRouter";
41
41
  export { useSearchParamsSSR } from "./useSearchParamsSSR";
42
- export { useSimBalance, useSimSvmBalance } from "./useSimBalance";
42
+ export { useSimBalance, useSimSvmBalance, useSimTokenBalance } from "./useSimBalance";
43
+ export { useSimCollectibles } from "./useSimCollectibles";
43
44
  export { useSiwe } from "./useSiwe";
44
45
  export { useTokenBalance } from "./useTokenBalance";
45
46
  export { useTokenBalanceDirect } from "./useTokenBalanceDirect";
@@ -52,4 +53,3 @@ export { useTokensFromAddress } from "./useTokensFromAddress";
52
53
  export { useTurnkeyAuth } from "./useTurnkeyAuth";
53
54
  export { useUnifiedChainSwitchAndExecute } from "./useUnifiedChainSwitchAndExecute";
54
55
  export { useURLParams } from "./useURLParams";
55
- export { useUser } from "./useUser";
@@ -1,6 +1,6 @@
1
1
  import app from "@b3dotfun/sdk/global-account/app";
2
2
  import { authenticateWithB3JWT } from "@b3dotfun/sdk/global-account/bsmnt";
3
- import { useAuthStore, useB3Config } from "@b3dotfun/sdk/global-account/react";
3
+ import { useAuthStore, useB3 } from "@b3dotfun/sdk/global-account/react";
4
4
  import { ecosystemWalletId } from "@b3dotfun/sdk/shared/constants";
5
5
  import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
6
6
  import { client } from "@b3dotfun/sdk/shared/utils/thirdweb";
@@ -47,7 +47,7 @@ export function useAuth() {
47
47
  const hasStartedConnecting = useAuthStore(state => state.hasStartedConnecting);
48
48
  const useAutoConnectLoadingPrevious = useRef(false);
49
49
  const referralCode = useSearchParam("referralCode");
50
- const { partnerId } = useB3Config();
50
+ const { partnerId } = useB3();
51
51
  const wagmiConfig = createWagmiConfig({ partnerId });
52
52
  const { connect } = useConnect();
53
53
  const activeWagmiAccount = useAccount();
@@ -330,7 +330,7 @@ export function useAuth() {
330
330
 
331
331
  setIsAuthenticated(false);
332
332
  setIsConnected(false);
333
- setUser();
333
+ setUser(undefined);
334
334
  callback?.();
335
335
  },
336
336
  [activeWallet, disconnect, wallets, setIsAuthenticated, setUser, setIsConnected],
@@ -179,7 +179,7 @@ export function useAuthentication(partnerId: string) {
179
179
 
180
180
  setIsAuthenticated(false);
181
181
  setIsConnected(false);
182
- setUser();
182
+ setUser(undefined);
183
183
  callback?.();
184
184
  },
185
185
  [activeWallet, disconnect, wallets, setIsAuthenticated, setUser, setIsConnected],
@@ -1,4 +1,4 @@
1
- import { useB3Config } from "@b3dotfun/sdk/global-account/react";
1
+ import { useB3 } from "@b3dotfun/sdk/global-account/react";
2
2
  import { useCallback } from "react";
3
3
  import {
4
4
  ClientType,
@@ -13,7 +13,7 @@ import {
13
13
  * Hook to access the current FeathersJS client and client management utilities
14
14
  */
15
15
  export function useClient() {
16
- const { clientType } = useB3Config();
16
+ const { clientType } = useB3();
17
17
 
18
18
  const getCurrentClient = useCallback(() => {
19
19
  return getClient();
@@ -1,4 +1,4 @@
1
- import { useB3Config, useConnect } from "@b3dotfun/sdk/global-account/react";
1
+ import { useB3, useConnect } from "@b3dotfun/sdk/global-account/react";
2
2
  import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
3
3
  import { useIdentityToken, usePrivy } from "@privy-io/react-auth";
4
4
  import { useCallback, useRef, useState } from "react";
@@ -11,7 +11,7 @@ const debug = debugB3React("@@b3:useHandleConnectWithPrivy");
11
11
  * Currently, this is for the basement-privy strategy
12
12
  */
13
13
  export function useHandleConnectWithPrivy(chain?: Chain, onSuccess?: (account: Account) => void) {
14
- const { partnerId } = useB3Config();
14
+ const { partnerId } = useB3();
15
15
  if (!chain) {
16
16
  throw new Error("Chain is required");
17
17
  }
@@ -1,4 +1,4 @@
1
- import { useB3Config } from "@b3dotfun/sdk/global-account/react";
1
+ import { useB3 } from "@b3dotfun/sdk/global-account/react";
2
2
  import { getAuthToken } from "@b3dotfun/sdk/shared/utils/auth-token";
3
3
  import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
4
4
  import { useCallback, useEffect, useState } from "react";
@@ -56,7 +56,7 @@ export interface UseNotificationsReturn {
56
56
  */
57
57
  export function useNotifications(): UseNotificationsReturn {
58
58
  const { user } = useUserQuery();
59
- const { partnerId } = useB3Config();
59
+ const { partnerId } = useB3();
60
60
  const [userData, setUserData] = useState<UserData | null>(null);
61
61
  const [loading, setLoading] = useState(true);
62
62
  const [error, setError] = useState<string | null>(null);
@@ -1,4 +1,5 @@
1
1
  import { useQuery } from "@tanstack/react-query";
2
+ import { buildSimduneUrl } from "../utils/simdune";
2
3
 
3
4
  export interface SimTokenMetadata {
4
5
  logo?: string;
@@ -60,11 +61,12 @@ async function fetchSimBalance(address: string, chainIdsParam: number[]): Promis
60
61
  if (!address) throw new Error("Address is required");
61
62
 
62
63
  const chainIds = chainIdsParam.length === 0 ? "mainnet" : chainIdsParam.join(",");
63
- let url = `https://simdune-api.sean-430.workers.dev/?url=https://api.sim.dune.com/v1/evm/balances/${address}?metadata=logo&chain_ids=${chainIds}&exclude_spam_tokens=true`;
64
- if (process.env.NEXT_PUBLIC_DEVMODE_SHARED_SECRET) {
65
- url += `&localkey=${process.env.NEXT_PUBLIC_DEVMODE_SHARED_SECRET}`;
66
- }
64
+ const queryParams = new URLSearchParams();
65
+ queryParams.append("metadata", "logo");
66
+ queryParams.append("chain_ids", chainIds);
67
+ queryParams.append("exclude_spam_tokens", "true");
67
68
 
69
+ const url = buildSimduneUrl(`/v1/evm/balances/${address}`, queryParams);
68
70
  const response = await fetch(url);
69
71
 
70
72
  if (!response.ok) {
@@ -75,6 +77,29 @@ async function fetchSimBalance(address: string, chainIdsParam: number[]): Promis
75
77
  return balanceData;
76
78
  }
77
79
 
80
+ async function fetchSimTokenBalance(
81
+ walletAddress: string,
82
+ tokenAddress: string,
83
+ chainId: number,
84
+ ): Promise<SimBalanceResponse> {
85
+ if (!walletAddress) throw new Error("Wallet address is required");
86
+ if (!tokenAddress) throw new Error("Token address is required");
87
+ if (!chainId) throw new Error("Chain ID is required");
88
+
89
+ const queryParams = new URLSearchParams();
90
+ queryParams.append("chain_ids", chainId.toString());
91
+
92
+ const url = buildSimduneUrl(`/v1/evm/balances/${walletAddress}/token/${tokenAddress}`, queryParams);
93
+ const response = await fetch(url);
94
+
95
+ if (!response.ok) {
96
+ throw new Error(`Failed to fetch token balance: ${response.statusText}`);
97
+ }
98
+
99
+ const balanceData: SimBalanceResponse = await response.json();
100
+ return balanceData;
101
+ }
102
+
78
103
  async function fetchSimSvmBalance(address: string, chains?: string[], limit?: number): Promise<SvmBalanceResponse> {
79
104
  if (!address) throw new Error("Address is required");
80
105
 
@@ -86,14 +111,7 @@ async function fetchSimSvmBalance(address: string, chains?: string[], limit?: nu
86
111
  queryParams.append("limit", limit.toString());
87
112
  }
88
113
 
89
- let url = `https://simdune-api.sean-430.workers.dev/?url=https://api.sim.dune.com/beta/svm/balances/${address}`;
90
- if (queryParams.toString()) {
91
- url += `?${queryParams.toString()}`;
92
- }
93
- if (process.env.NEXT_PUBLIC_LOCAL_SIMDUNE_KEY) {
94
- url += `${queryParams.toString() ? "&" : "?"}localkey=${process.env.NEXT_PUBLIC_LOCAL_SIMDUNE_KEY}`;
95
- }
96
-
114
+ const url = buildSimduneUrl(`/beta/svm/balances/${address}`, queryParams.toString() ? queryParams : undefined);
97
115
  const response = await fetch(url);
98
116
 
99
117
  if (!response.ok) {
@@ -125,3 +143,22 @@ export function useSimSvmBalance(address?: string, chains?: ("solana" | "eclipse
125
143
  enabled: Boolean(address),
126
144
  });
127
145
  }
146
+
147
+ /**
148
+ * Hook to fetch a single token balance for a wallet.
149
+ * @param walletAddress - The wallet address to fetch balance for
150
+ * @param tokenAddress - The token contract address, or "native" for native token (ETH, etc.)
151
+ * @param chainId - Chain ID to query (defaults to 1 for Ethereum mainnet)
152
+ */
153
+ export function useSimTokenBalance(walletAddress?: string, tokenAddress?: string, chainId?: number) {
154
+ return useQuery({
155
+ queryKey: ["simTokenBalance", walletAddress, tokenAddress, chainId],
156
+ queryFn: () => {
157
+ if (!walletAddress || !tokenAddress || !chainId) {
158
+ throw new Error("Missing required parameters");
159
+ }
160
+ return fetchSimTokenBalance(walletAddress, tokenAddress, chainId);
161
+ },
162
+ enabled: Boolean(walletAddress) && Boolean(tokenAddress),
163
+ });
164
+ }
@@ -0,0 +1,238 @@
1
+ import type { NFT, SimpleHashNFTResponse } from "@b3dotfun/sdk/global-account/types/simplehash.types";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { buildSimduneUrl } from "../utils/simdune";
4
+
5
+ /**
6
+ * Safely parse a balance string to a number, capping at MAX_SAFE_INTEGER
7
+ * to prevent overflow issues with large ERC1155 balances.
8
+ */
9
+ function safeParseBalance(balance: string | undefined): number {
10
+ if (!balance) return 1;
11
+ const parsed = parseInt(balance, 10);
12
+ if (Number.isNaN(parsed)) return 1;
13
+ return Math.min(parsed, Number.MAX_SAFE_INTEGER);
14
+ }
15
+
16
+ // Simdune Collectibles types
17
+ export interface SimCollectibleMetadata {
18
+ uri: string;
19
+ attributes?: Array<{
20
+ trait_type: string;
21
+ value: string;
22
+ display_type?: string | null;
23
+ }>;
24
+ }
25
+
26
+ export interface SimCollectibleEntry {
27
+ contract_address: string;
28
+ token_standard: "ERC721" | "ERC1155";
29
+ token_id: string;
30
+ chain: string;
31
+ chain_id: number;
32
+ name?: string;
33
+ description?: string;
34
+ symbol?: string;
35
+ image_url?: string;
36
+ last_sale_price?: string;
37
+ metadata?: SimCollectibleMetadata;
38
+ is_spam?: boolean;
39
+ spam_score?: number;
40
+ explanations?: string[];
41
+ balance?: string;
42
+ last_acquired?: string;
43
+ }
44
+
45
+ export interface SimCollectiblesResponse {
46
+ address: string;
47
+ entries: SimCollectibleEntry[];
48
+ next_offset?: string;
49
+ request_time: string;
50
+ response_time: string;
51
+ }
52
+
53
+ async function fetchSimCollectibles(
54
+ address: string,
55
+ chainIdsParam?: number[],
56
+ options?: { limit?: number; filterSpam?: boolean },
57
+ ): Promise<SimCollectiblesResponse> {
58
+ if (!address) throw new Error("Address is required");
59
+
60
+ const queryParams = new URLSearchParams();
61
+ if (chainIdsParam && chainIdsParam.length > 0) {
62
+ queryParams.append("chain_ids", chainIdsParam.join(","));
63
+ }
64
+ if (options?.limit) {
65
+ queryParams.append("limit", options.limit.toString());
66
+ }
67
+ if (options?.filterSpam !== undefined) {
68
+ queryParams.append("filter_spam", options.filterSpam.toString());
69
+ }
70
+
71
+ const url = buildSimduneUrl(`/v1/evm/collectibles/${address}`, queryParams);
72
+ const response = await fetch(url);
73
+
74
+ if (!response.ok) {
75
+ throw new Error(`Failed to fetch collectibles: ${response.statusText}`);
76
+ }
77
+
78
+ const data: SimCollectiblesResponse = await response.json();
79
+ return data;
80
+ }
81
+
82
+ /**
83
+ * Transforms Simdune collectibles response to SimpleHash NFT format
84
+ * for compatibility with existing AccountAssets component
85
+ */
86
+ function transformToSimpleHashFormat(data: SimCollectiblesResponse): SimpleHashNFTResponse {
87
+ const nfts: NFT[] = data.entries.map(entry => ({
88
+ nft_id: `${entry.chain}.${entry.contract_address}.${entry.token_id}`,
89
+ chain: entry.chain,
90
+ contract_address: entry.contract_address,
91
+ token_id: entry.token_id,
92
+ name: entry.name || "",
93
+ description: entry.description || "",
94
+ previews: {
95
+ image_small_url: entry.image_url || "",
96
+ image_medium_url: entry.image_url || "",
97
+ image_large_url: entry.image_url || "",
98
+ image_opengraph_url: entry.image_url || "",
99
+ blurhash: "",
100
+ predominant_color: "",
101
+ },
102
+ image_url: entry.image_url || "",
103
+ image_properties: {
104
+ width: 0,
105
+ height: 0,
106
+ size: 0,
107
+ mime_type: "",
108
+ exif_orientation: null,
109
+ },
110
+ video_url: null,
111
+ video_properties: null,
112
+ audio_url: null,
113
+ audio_properties: null,
114
+ model_url: null,
115
+ model_properties: null,
116
+ other_url: null,
117
+ other_properties: null,
118
+ background_color: null,
119
+ external_url: null,
120
+ created_date: "",
121
+ status: "minted",
122
+ token_count: 1,
123
+ owner_count: 1,
124
+ owners: [
125
+ {
126
+ owner_address: data.address,
127
+ quantity: safeParseBalance(entry.balance),
128
+ quantity_string: entry.balance || "1",
129
+ first_acquired_date: entry.last_acquired || "",
130
+ last_acquired_date: entry.last_acquired || "",
131
+ },
132
+ ],
133
+ contract: {
134
+ type: entry.token_standard,
135
+ name: entry.name || "",
136
+ symbol: entry.symbol || null,
137
+ deployed_by: "",
138
+ deployed_via_contract: "",
139
+ owned_by: "",
140
+ has_multiple_collections: false,
141
+ },
142
+ collection: {
143
+ collection_id: entry.contract_address,
144
+ name: entry.symbol || "Unknown Collection",
145
+ description: null,
146
+ image_url: entry.image_url || "",
147
+ image_properties: {
148
+ width: 0,
149
+ height: 0,
150
+ mime_type: "",
151
+ },
152
+ banner_image_url: null,
153
+ category: null,
154
+ is_nsfw: null,
155
+ external_url: null,
156
+ twitter_username: null,
157
+ discord_url: null,
158
+ instagram_username: null,
159
+ medium_username: null,
160
+ telegram_url: null,
161
+ marketplace_pages: [],
162
+ metaplex_mint: null,
163
+ metaplex_candy_machine: null,
164
+ metaplex_first_verified_creator: null,
165
+ floor_prices: [],
166
+ top_bids: [],
167
+ distinct_owner_count: 0,
168
+ distinct_nft_count: 0,
169
+ total_quantity: 0,
170
+ chains: [entry.chain],
171
+ top_contracts: [entry.contract_address],
172
+ collection_royalties: [],
173
+ },
174
+ last_sale: entry.last_sale_price
175
+ ? {
176
+ price: entry.last_sale_price,
177
+ }
178
+ : null,
179
+ primary_sale: null,
180
+ first_created: {
181
+ minted_to: data.address,
182
+ quantity: 1,
183
+ quantity_string: "1",
184
+ timestamp: "",
185
+ block_number: 0,
186
+ transaction: "",
187
+ transaction_initiator: "",
188
+ },
189
+ rarity: {
190
+ rank: null,
191
+ score: null,
192
+ unique_attributes: null,
193
+ },
194
+ royalty: [],
195
+ extra_metadata: {
196
+ attributes: (entry.metadata?.attributes || []).map(attr => ({
197
+ trait_type: attr.trait_type,
198
+ value: attr.value,
199
+ display_type: attr.display_type ?? null,
200
+ })),
201
+ image_original_url: entry.image_url || "",
202
+ animation_original_url: null,
203
+ metadata_original_url: entry.metadata?.uri || "",
204
+ },
205
+ }));
206
+
207
+ return {
208
+ next_cursor: data.next_offset || null,
209
+ next: null,
210
+ previous: null,
211
+ nfts,
212
+ };
213
+ }
214
+
215
+ /**
216
+ * Hook to fetch NFT collectibles from Simdune API.
217
+ * Returns data in SimpleHash format for compatibility with AccountAssets component.
218
+ * @param address - Wallet address to fetch collectibles for
219
+ * @param chainIdsParam - Optional array of chain IDs to filter by
220
+ * @param options - Optional parameters (limit, filterSpam)
221
+ */
222
+ export function useSimCollectibles(
223
+ address?: string,
224
+ chainIdsParam?: number[],
225
+ options?: { limit?: number; filterSpam?: boolean },
226
+ ) {
227
+ return useQuery({
228
+ queryKey: ["simCollectibles", address, chainIdsParam, options],
229
+ queryFn: async () => {
230
+ if (!address) throw new Error("Address is required");
231
+ const data = await fetchSimCollectibles(address, chainIdsParam, options);
232
+ return transformToSimpleHashFormat(data);
233
+ },
234
+ enabled: Boolean(address),
235
+ staleTime: 30 * 1000,
236
+ gcTime: 5 * 60 * 1000,
237
+ });
238
+ }
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
 
3
3
  import { isNativeToken } from "@b3dotfun/sdk/anyspend";
4
- import { components } from "@b3dotfun/sdk/anyspend/types/api";
5
- import { useAccountWallet, useAuthStore } from "@b3dotfun/sdk/global-account/react";
4
+ import { useB3, useAccountWallet } from "@b3dotfun/sdk/global-account/react";
6
5
  import { formatTokenAmount } from "@b3dotfun/sdk/shared/utils/number";
7
6
  import { getERC20Balances, getNativeTokenBalance } from "@b3dotfun/sdk/shared/utils/thirdweb-insights";
8
7
  import { useQuery } from "@tanstack/react-query";
9
8
  import { useEffect } from "react";
9
+ import { components } from "@b3dotfun/sdk/anyspend/types/api";
10
10
 
11
11
  interface UseTokenBalanceProps {
12
12
  token: components["schemas"]["Token"];
@@ -20,8 +20,7 @@ export interface TokenBalanceResult {
20
20
  }
21
21
 
22
22
  export function useTokenBalance({ token, address }: UseTokenBalanceProps): TokenBalanceResult {
23
- const isAuthenticated = useAuthStore(state => state.isAuthenticated);
24
-
23
+ const { ready } = useB3();
25
24
  const account = useAccountWallet();
26
25
 
27
26
  const effectiveAddress = address || account?.address;
@@ -61,7 +60,7 @@ export function useTokenBalance({ token, address }: UseTokenBalanceProps): Token
61
60
  }
62
61
  return { formatted: "0", raw: null };
63
62
  },
64
- enabled: isAuthenticated && !!effectiveAddress,
63
+ enabled: ready && !!effectiveAddress,
65
64
  staleTime: 30000,
66
65
  gcTime: 5 * 60 * 1000,
67
66
  retry: 2,
@@ -70,13 +69,13 @@ export function useTokenBalance({ token, address }: UseTokenBalanceProps): Token
70
69
 
71
70
  // Force a refetch when the wallet or token changes
72
71
  useEffect(() => {
73
- if (isAuthenticated && effectiveAddress) {
72
+ if (ready && effectiveAddress) {
74
73
  refetch();
75
74
  }
76
- }, [isAuthenticated, effectiveAddress, token.address, token.chainId, token.symbol, refetch]);
75
+ }, [ready, effectiveAddress, token.address, token.chainId, token.symbol, refetch]);
77
76
 
78
77
  // Determine if we're actually loading
79
- const isActuallyLoading = !isAuthenticated || !effectiveAddress || isLoading || (isFetching && !tokenBalance);
78
+ const isActuallyLoading = !ready || !effectiveAddress || isLoading || (isFetching && !tokenBalance);
80
79
 
81
80
  return {
82
81
  rawBalance: tokenBalance?.raw || BigInt(0),
@@ -2,7 +2,7 @@ import { TurnkeyAuthInitResponse } from "@b3dotfun/b3-api";
2
2
  import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
3
3
  import { useCallback, useState } from "react";
4
4
  import app from "../../app";
5
- import { useB3Config } from "../components";
5
+ import { useB3 } from "../components";
6
6
  import { useAuthStore } from "../stores";
7
7
  import { useAuth } from "./useAuth";
8
8
 
@@ -33,7 +33,7 @@ export function useTurnkeyAuth(): UseTurnkeyAuthReturn {
33
33
  const [error, setError] = useState<string | null>(null);
34
34
  const setIsAuthenticating = useAuthStore(state => state.setIsAuthenticating);
35
35
  const setIsAuthenticated = useAuthStore(state => state.setIsAuthenticated);
36
- const { partnerId } = useB3Config();
36
+ const { partnerId } = useB3();
37
37
  const { authenticate } = useAuth();
38
38
 
39
39
  /**