@b3dotfun/sdk 0.0.87 → 0.0.88-alpha.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 (175) hide show
  1. package/README.md +2 -1
  2. package/dist/cjs/anyspend/react/components/AnySpend.d.ts +5 -0
  3. package/dist/cjs/anyspend/react/components/AnySpend.js +77 -73
  4. package/dist/cjs/anyspend/react/components/AnySpendCustom.js +0 -1
  5. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +1 -1
  6. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +1 -2
  7. package/dist/cjs/anyspend/react/components/AnySpendDeposit.d.ts +122 -0
  8. package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +190 -0
  9. package/dist/cjs/anyspend/react/components/QRDeposit.d.ts +43 -0
  10. package/dist/cjs/anyspend/react/components/QRDeposit.js +146 -0
  11. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +17 -12
  12. package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +2 -0
  13. package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +12 -5
  14. package/dist/cjs/anyspend/react/components/common/OrderStatus.js +2 -2
  15. package/dist/cjs/anyspend/react/components/common/WarningText.d.ts +32 -0
  16. package/dist/cjs/anyspend/react/components/common/WarningText.js +36 -0
  17. package/dist/cjs/anyspend/react/components/icons/CreditCardIcon.d.ts +6 -0
  18. package/dist/cjs/anyspend/react/components/icons/CreditCardIcon.js +6 -0
  19. package/dist/cjs/anyspend/react/components/icons/QrCodeIcon.d.ts +6 -0
  20. package/dist/cjs/anyspend/react/components/icons/QrCodeIcon.js +6 -0
  21. package/dist/cjs/anyspend/react/components/index.d.ts +2 -0
  22. package/dist/cjs/anyspend/react/components/index.js +3 -1
  23. package/dist/cjs/anyspend/react/hooks/index.d.ts +1 -0
  24. package/dist/cjs/anyspend/react/hooks/index.js +1 -0
  25. package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +2 -2
  26. package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +35 -11
  27. package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +24 -0
  28. package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.js +86 -0
  29. package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +1 -1
  30. package/dist/cjs/anyspend/utils/format.js +28 -5
  31. package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.js +2 -1
  32. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +17 -47
  33. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +6 -7
  34. package/dist/cjs/global-account/react/components/B3Provider/types.d.ts +0 -5
  35. package/dist/cjs/global-account/react/components/B3Provider/types.js +4 -4
  36. package/dist/cjs/global-account/react/components/B3Provider/useB3.d.ts +1 -0
  37. package/dist/cjs/global-account/react/components/B3Provider/useB3.js +1 -0
  38. package/dist/cjs/global-account/react/components/B3Provider/useB3Account.d.ts +1 -0
  39. package/dist/cjs/global-account/react/components/B3Provider/useB3Account.js +10 -0
  40. package/dist/cjs/global-account/react/components/B3Provider/useB3Config.d.ts +9 -0
  41. package/dist/cjs/global-account/react/components/B3Provider/useB3Config.js +23 -0
  42. package/dist/cjs/global-account/react/components/LinkAccount/LinkAccount.js +1 -1
  43. package/dist/cjs/global-account/react/components/LinkAccount/LinkNewAccount.js +1 -2
  44. package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +2 -1
  45. package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.js +2 -1
  46. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +2 -1
  47. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +2 -1
  48. package/dist/cjs/global-account/react/components/index.d.ts +2 -0
  49. package/dist/cjs/global-account/react/components/index.js +7 -3
  50. package/dist/cjs/global-account/react/hooks/useAccountWallet.js +3 -2
  51. package/dist/cjs/global-account/react/hooks/useAuthentication.d.ts +1 -1
  52. package/dist/cjs/global-account/react/hooks/useAutoSelectWallet.d.ts +7 -0
  53. package/dist/cjs/global-account/react/hooks/useAutoSelectWallet.js +42 -0
  54. package/dist/cjs/global-account/react/hooks/useTurnkeyAuth.js +6 -4
  55. package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +2 -2
  56. package/dist/cjs/global-account/react/hooks/useUserQuery.d.ts +1 -1
  57. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +4 -0
  58. package/dist/esm/anyspend/react/components/AnySpend.d.ts +5 -0
  59. package/dist/esm/anyspend/react/components/AnySpend.js +77 -73
  60. package/dist/esm/anyspend/react/components/AnySpendCustom.js +0 -1
  61. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +1 -1
  62. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +1 -2
  63. package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +122 -0
  64. package/dist/esm/anyspend/react/components/AnySpendDeposit.js +187 -0
  65. package/dist/esm/anyspend/react/components/QRDeposit.d.ts +43 -0
  66. package/dist/esm/anyspend/react/components/QRDeposit.js +143 -0
  67. package/dist/esm/anyspend/react/components/common/OrderDetails.js +17 -12
  68. package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +2 -0
  69. package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +12 -5
  70. package/dist/esm/anyspend/react/components/common/OrderStatus.js +2 -2
  71. package/dist/esm/anyspend/react/components/common/WarningText.d.ts +32 -0
  72. package/dist/esm/anyspend/react/components/common/WarningText.js +32 -0
  73. package/dist/esm/anyspend/react/components/icons/CreditCardIcon.d.ts +6 -0
  74. package/dist/esm/anyspend/react/components/icons/CreditCardIcon.js +2 -0
  75. package/dist/esm/anyspend/react/components/icons/QrCodeIcon.d.ts +6 -0
  76. package/dist/esm/anyspend/react/components/icons/QrCodeIcon.js +2 -0
  77. package/dist/esm/anyspend/react/components/index.d.ts +2 -0
  78. package/dist/esm/anyspend/react/components/index.js +1 -0
  79. package/dist/esm/anyspend/react/hooks/index.d.ts +1 -0
  80. package/dist/esm/anyspend/react/hooks/index.js +1 -0
  81. package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +2 -2
  82. package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +35 -11
  83. package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +24 -0
  84. package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.js +83 -0
  85. package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +1 -1
  86. package/dist/esm/anyspend/utils/format.js +28 -5
  87. package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.js +3 -2
  88. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +21 -51
  89. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +6 -7
  90. package/dist/esm/global-account/react/components/B3Provider/types.d.ts +0 -5
  91. package/dist/esm/global-account/react/components/B3Provider/types.js +4 -4
  92. package/dist/esm/global-account/react/components/B3Provider/useB3.d.ts +1 -0
  93. package/dist/esm/global-account/react/components/B3Provider/useB3.js +1 -0
  94. package/dist/esm/global-account/react/components/B3Provider/useB3Account.d.ts +1 -0
  95. package/dist/esm/global-account/react/components/B3Provider/useB3Account.js +6 -0
  96. package/dist/esm/global-account/react/components/B3Provider/useB3Config.d.ts +9 -0
  97. package/dist/esm/global-account/react/components/B3Provider/useB3Config.js +19 -0
  98. package/dist/esm/global-account/react/components/LinkAccount/LinkAccount.js +2 -2
  99. package/dist/esm/global-account/react/components/LinkAccount/LinkNewAccount.js +2 -3
  100. package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +3 -2
  101. package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.js +3 -2
  102. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +3 -2
  103. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +3 -2
  104. package/dist/esm/global-account/react/components/index.d.ts +2 -0
  105. package/dist/esm/global-account/react/components/index.js +2 -0
  106. package/dist/esm/global-account/react/hooks/useAccountWallet.js +4 -3
  107. package/dist/esm/global-account/react/hooks/useAuthentication.d.ts +1 -1
  108. package/dist/esm/global-account/react/hooks/useAutoSelectWallet.d.ts +7 -0
  109. package/dist/esm/global-account/react/hooks/useAutoSelectWallet.js +39 -0
  110. package/dist/esm/global-account/react/hooks/useTurnkeyAuth.js +6 -4
  111. package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +2 -2
  112. package/dist/esm/global-account/react/hooks/useUserQuery.d.ts +1 -1
  113. package/dist/esm/global-account/react/stores/useModalStore.d.ts +4 -0
  114. package/dist/styles/index.css +1 -1
  115. package/dist/types/anyspend/react/components/AnySpend.d.ts +5 -0
  116. package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +1 -1
  117. package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +122 -0
  118. package/dist/types/anyspend/react/components/QRDeposit.d.ts +43 -0
  119. package/dist/types/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +2 -0
  120. package/dist/types/anyspend/react/components/common/WarningText.d.ts +32 -0
  121. package/dist/types/anyspend/react/components/icons/CreditCardIcon.d.ts +6 -0
  122. package/dist/types/anyspend/react/components/icons/QrCodeIcon.d.ts +6 -0
  123. package/dist/types/anyspend/react/components/index.d.ts +2 -0
  124. package/dist/types/anyspend/react/hooks/index.d.ts +1 -0
  125. package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +2 -2
  126. package/dist/types/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +24 -0
  127. package/dist/types/anyspend/react/hooks/useSigMint.d.ts +1 -1
  128. package/dist/types/global-account/react/components/B3Provider/types.d.ts +0 -5
  129. package/dist/types/global-account/react/components/B3Provider/useB3.d.ts +1 -0
  130. package/dist/types/global-account/react/components/B3Provider/useB3Account.d.ts +1 -0
  131. package/dist/types/global-account/react/components/B3Provider/useB3Config.d.ts +9 -0
  132. package/dist/types/global-account/react/components/index.d.ts +2 -0
  133. package/dist/types/global-account/react/hooks/useAuthentication.d.ts +1 -1
  134. package/dist/types/global-account/react/hooks/useAutoSelectWallet.d.ts +7 -0
  135. package/dist/types/global-account/react/hooks/useUserQuery.d.ts +1 -1
  136. package/dist/types/global-account/react/stores/useModalStore.d.ts +4 -0
  137. package/package.json +1 -1
  138. package/src/anyspend/react/components/AnySpend.tsx +105 -85
  139. package/src/anyspend/react/components/AnySpendCustom.tsx +0 -2
  140. package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +2 -3
  141. package/src/anyspend/react/components/AnySpendDeposit.tsx +578 -0
  142. package/src/anyspend/react/components/QRDeposit.tsx +348 -0
  143. package/src/anyspend/react/components/common/OrderDetails.tsx +26 -8
  144. package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +20 -8
  145. package/src/anyspend/react/components/common/OrderStatus.tsx +2 -2
  146. package/src/anyspend/react/components/common/WarningText.tsx +52 -0
  147. package/src/anyspend/react/components/icons/CreditCardIcon.tsx +25 -0
  148. package/src/anyspend/react/components/icons/QrCodeIcon.tsx +25 -0
  149. package/src/anyspend/react/components/icons/credit-card.svg +5 -0
  150. package/src/anyspend/react/components/icons/qr-code.svg +5 -0
  151. package/src/anyspend/react/components/index.ts +2 -0
  152. package/src/anyspend/react/hooks/index.ts +1 -0
  153. package/src/anyspend/react/hooks/useAnyspendFlow.ts +37 -12
  154. package/src/anyspend/react/hooks/useCreateDepositFirstOrder.ts +110 -0
  155. package/src/anyspend/utils/format.ts +33 -5
  156. package/src/global-account/react/components/AvatarEditor/AvatarEditor.tsx +10 -2
  157. package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +6 -7
  158. package/src/global-account/react/components/B3Provider/B3Provider.tsx +20 -71
  159. package/src/global-account/react/components/B3Provider/types.ts +8 -9
  160. package/src/global-account/react/components/B3Provider/useB3.ts +1 -0
  161. package/src/global-account/react/components/B3Provider/useB3Account.ts +7 -0
  162. package/src/global-account/react/components/B3Provider/useB3Config.ts +34 -0
  163. package/src/global-account/react/components/LinkAccount/LinkAccount.tsx +2 -2
  164. package/src/global-account/react/components/LinkAccount/LinkNewAccount.tsx +2 -3
  165. package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +10 -2
  166. package/src/global-account/react/components/ManageAccount/SettingsProfileCard.tsx +3 -2
  167. package/src/global-account/react/components/SignInWithB3/SignInWithB3.tsx +2 -2
  168. package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +5 -2
  169. package/src/global-account/react/components/index.ts +2 -0
  170. package/src/global-account/react/hooks/useAccountWallet.tsx +4 -3
  171. package/src/global-account/react/hooks/useAutoSelectWallet.ts +51 -0
  172. package/src/global-account/react/hooks/useTurnkeyAuth.ts +7 -5
  173. package/src/global-account/react/hooks/useUnifiedChainSwitchAndExecute.ts +2 -2
  174. package/src/global-account/react/stores/useModalStore.ts +4 -0
  175. package/src/styles/index.css +2 -0
@@ -1,6 +1,6 @@
1
1
  import { ens_normalize } from "@adraffy/ens-normalize";
2
2
  import app from "@b3dotfun/sdk/global-account/app";
3
- import { toast, useB3, useModalStore, useProfile } from "@b3dotfun/sdk/global-account/react";
3
+ import { toast, useAuthentication, useB3Config, useModalStore, useProfile } from "@b3dotfun/sdk/global-account/react";
4
4
  import { formatUsername } from "@b3dotfun/sdk/shared/utils";
5
5
  import { Check, Loader2, Pencil, X } from "lucide-react";
6
6
  import { useEffect, useRef, useState } from "react";
@@ -17,7 +17,8 @@ const SettingsProfileCard = () => {
17
17
  address: eoaAddress || account?.address,
18
18
  fresh: true,
19
19
  });
20
- const { user, setUser } = useB3();
20
+ const { partnerId } = useB3Config();
21
+ const { user, setUser } = useAuthentication(partnerId);
21
22
  const setB3ModalOpen = useModalStore(state => state.setB3ModalOpen);
22
23
  const setB3ModalContentType = useModalStore(state => state.setB3ModalContentType);
23
24
  const navigateBack = useModalStore(state => state.navigateBack);
@@ -3,11 +3,11 @@ import {
3
3
  SignInWithB3ModalProps,
4
4
  StyleRoot,
5
5
  useAuthStore,
6
- useB3,
7
6
  useIsMobile,
8
7
  useModalStore,
9
8
  } from "@b3dotfun/sdk/global-account/react";
10
9
  import { ReactNode, useEffect } from "react";
10
+ import { useB3Account } from "../B3Provider/useB3Account";
11
11
  import { ManageAccountButton } from "../custom/ManageAccountButton";
12
12
  import { Loading } from "../ui/Loading";
13
13
 
@@ -20,7 +20,7 @@ export type SignInWithB3Props = Omit<SignInWithB3ModalProps, "type" | "showBackB
20
20
 
21
21
  export function SignInWithB3(props: SignInWithB3Props) {
22
22
  const { setB3ModalOpen, setB3ModalContentType, setEcoSystemAccountAddress } = useModalStore();
23
- const { account } = useB3();
23
+ const account = useB3Account();
24
24
  const { isAuthenticating, isAuthenticated } = useAuthStore();
25
25
  const isMobile = useIsMobile();
26
26
 
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  Loading,
3
3
  SignInWithB3ModalProps,
4
+ useAuthentication,
4
5
  useAuthStore,
5
- useB3,
6
+ useB3Config,
6
7
  useGetAllTWSigners,
7
8
  useModalStore,
8
9
  } from "@b3dotfun/sdk/global-account/react";
@@ -33,7 +34,9 @@ export function SignInWithB3Flow({
33
34
  source = "signInWithB3Button",
34
35
  signersEnabled = false,
35
36
  }: SignInWithB3ModalProps) {
36
- const { automaticallySetFirstEoa, user, refetchUser, enableTurnkey } = useB3();
37
+ const { automaticallySetFirstEoa, enableTurnkey } = useB3Config();
38
+ const { user, refetchUser } = useAuthentication(partnerId);
39
+
37
40
  const [step, setStep] = useState<"login" | "permissions" | null>(source === "requestPermissions" ? null : "login");
38
41
  const [sessionKeyAdded, setSessionKeyAdded] = useState(source === "requestPermissions" ? true : false);
39
42
  const { setB3ModalContentType, setB3ModalOpen, isOpen, contentType } = useModalStore();
@@ -5,6 +5,8 @@ export { B3Provider, InnerProvider } from "./B3Provider/B3Provider";
5
5
  export { RelayKitProviderWrapper } from "./B3Provider/RelayKitProviderWrapper";
6
6
  export { B3Context, type B3ContextType } from "./B3Provider/types";
7
7
  export { useB3 } from "./B3Provider/useB3";
8
+ export { useB3Account } from "./B3Provider/useB3Account";
9
+ export { useB3Config } from "./B3Provider/useB3Config";
8
10
  export { StyleRoot } from "./StyleRoot";
9
11
 
10
12
  // SignInWithB3 Components
@@ -1,10 +1,11 @@
1
- import { useB3, useProfile } from "@b3dotfun/sdk/global-account/react";
1
+ import { useProfile } from "@b3dotfun/sdk/global-account/react";
2
2
  import { ecosystemWalletId } from "@b3dotfun/sdk/shared/constants";
3
3
  import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
4
4
  import { useEffect, useMemo, useState } from "react";
5
5
  import { getLastAuthProvider, useActiveWallet, useConnectedWallets, useWalletImage } from "thirdweb/react";
6
6
  import { Account, Wallet } from "thirdweb/wallets";
7
7
  import { socialIcons } from "thirdweb/wallets/in-app";
8
+ import { useB3Account } from "../components/B3Provider/useB3Account";
8
9
 
9
10
  const debug = debugB3React("useAccountWallet");
10
11
 
@@ -49,7 +50,7 @@ export function useAccountWallet(): {
49
50
  // const effectiveAccount = isAuthenticated ? accountOverride || activeAccount : undefined;
50
51
  // can we possibly just use useActiveAccount here?
51
52
  // --------------------
52
- const { account } = useB3();
53
+ const account = useB3Account();
53
54
 
54
55
  const activeWallet = useActiveWallet();
55
56
  const connectedWallets = useConnectedWallets();
@@ -114,7 +115,7 @@ export function useAccountWallet(): {
114
115
  }
115
116
 
116
117
  export function useAccountWalletImage(): string {
117
- const { account } = useB3();
118
+ const account = useB3Account();
118
119
 
119
120
  const activeWallet = useActiveWallet();
120
121
  const connectedWallets = useConnectedWallets();
@@ -0,0 +1,51 @@
1
+ import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
2
+ import { useCallback, useEffect } from "react";
3
+ import { getLastAuthProvider, useConnectedWallets, useSetActiveWallet } from "thirdweb/react";
4
+ import { Wallet } from "thirdweb/wallets";
5
+ import { useAuthStore } from "../stores";
6
+
7
+ const debug = debugB3React("useAutoSelectWallet");
8
+
9
+ /**
10
+ * Hook to automatically select the first EOA wallet when user is authenticated
11
+ * Only auto-selects if the last auth was via wallet or no previous auth provider
12
+ */
13
+ export function useAutoSelectWallet({ enabled }: { enabled: boolean }) {
14
+ const isAuthenticated = useAuthStore(state => state.isAuthenticated);
15
+ const wallets = useConnectedWallets();
16
+ const setActiveWallet = useSetActiveWallet();
17
+
18
+ const setWallet = useCallback(
19
+ (wallet: Wallet) => {
20
+ debug("@@setWallet", wallet.id, wallet.getAccount()?.address);
21
+ setActiveWallet(wallet);
22
+ },
23
+ [setActiveWallet],
24
+ );
25
+
26
+ useEffect(() => {
27
+ const autoSelectFirstEOAWallet = async () => {
28
+ // Only proceed if auto-selection is enabled and user is authenticated
29
+ if (!enabled || !isAuthenticated) {
30
+ return;
31
+ }
32
+
33
+ // Find the first EOA wallet (excluding ecosystem wallets)
34
+ const isEOAWallet = (wallet: Wallet) => !wallet.id.startsWith("ecosystem.");
35
+ const firstEOAWallet = wallets.find(isEOAWallet);
36
+
37
+ if (firstEOAWallet) {
38
+ // Only auto-select if the last auth was via wallet or no previous auth provider
39
+ const lastAuthProvider = await getLastAuthProvider();
40
+ const shouldAutoSelect = lastAuthProvider === null || lastAuthProvider === "wallet";
41
+
42
+ if (shouldAutoSelect) {
43
+ debug("Auto-selecting first EOA wallet", firstEOAWallet.id);
44
+ setWallet(firstEOAWallet);
45
+ }
46
+ }
47
+ };
48
+
49
+ autoSelectFirstEOAWallet();
50
+ }, [enabled, isAuthenticated, setWallet, wallets]);
51
+ }
@@ -1,9 +1,10 @@
1
- import app from "../../app";
2
- import { useAuthStore } from "../stores";
3
- import { useCallback, useState } from "react";
4
- import { useB3 } from "../components/B3Provider/useB3";
5
1
  import { TurnkeyAuthInitResponse } from "@b3dotfun/b3-api";
6
2
  import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
3
+ import { useCallback, useState } from "react";
4
+ import app from "../../app";
5
+ import { useB3Config } from "../components";
6
+ import { useAuthStore } from "../stores";
7
+ import { useAuthentication } from "./useAuthentication";
7
8
 
8
9
  const debug = debugB3React("useTurnkeyAuth");
9
10
 
@@ -32,7 +33,8 @@ export function useTurnkeyAuth(): UseTurnkeyAuthReturn {
32
33
  const [error, setError] = useState<string | null>(null);
33
34
  const setIsAuthenticating = useAuthStore(state => state.setIsAuthenticating);
34
35
  const setIsAuthenticated = useAuthStore(state => state.setIsAuthenticated);
35
- const { user } = useB3();
36
+ const { partnerId } = useB3Config();
37
+ const { user } = useAuthentication(partnerId);
36
38
 
37
39
  /**
38
40
  * Step 1: Initiate login with email
@@ -9,7 +9,7 @@ import { useCallback, useState } from "react";
9
9
  import { prepareTransaction, sendTransaction as twSendTransaction } from "thirdweb";
10
10
  import { isAddress } from "viem";
11
11
  import { useSwitchChain } from "wagmi";
12
- import { useB3 } from "../components";
12
+ import { useB3Account } from "../components/B3Provider/useB3Account";
13
13
  import { useAccountWallet } from "./useAccountWallet";
14
14
 
15
15
  export interface UnifiedTransactionParams {
@@ -31,7 +31,7 @@ export function useUnifiedChainSwitchAndExecute() {
31
31
  const [isSwitchingOrExecuting, setIsSwitchingOrExecuting] = useState(false);
32
32
 
33
33
  const { isActiveSmartWallet, isActiveEOAWallet, connectedEOAWallet } = useAccountWallet();
34
- const { account: aaAccount } = useB3();
34
+ const aaAccount = useB3Account();
35
35
 
36
36
  // Handle EOA wallet chain switch and execute transaction
37
37
  const handleEOASwitchChainAndSendTransaction = useCallback(
@@ -151,6 +151,10 @@ export interface AnySpendModalProps extends BaseModalProps {
151
151
  customUsdInputValues?: string[];
152
152
  /** Client-provided reference ID for tracking orders */
153
153
  clientReferenceId?: string;
154
+ /** Whether to hide the header */
155
+ hideHeader?: boolean;
156
+ /** When true, disables URL parameter management for swap configuration */
157
+ disableUrlParamManagement?: boolean;
154
158
  }
155
159
 
156
160
  /**
@@ -152,6 +152,7 @@
152
152
  --red-100: #fde6d7;
153
153
  --green-100: #dff9e8;
154
154
  --border-brand: #2a9fff;
155
+ --border-primary: #d1d1d6;
155
156
  --yellow-100: #fee6c7;
156
157
  --purple-100: #f5edfa;
157
158
  --purple-300: #ddc3ef;
@@ -249,6 +250,7 @@ html[data-theme="dark"] .b3-root,
249
250
  --red-100: #6a5550;
250
251
  --green-100: rgba(68, 90, 76, 0.57);
251
252
  --border-brand: #2a9fff;
253
+ --border-primary: #d1d1d6;
252
254
  --yellow-100: #957a6c;
253
255
  --purple-100: rgba(113, 88, 126, 0.38);
254
256
  --purple-300: #a375c3;