@b3dotfun/sdk 0.0.64-alpha.2 → 0.0.65-test.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.
Files changed (229) hide show
  1. package/dist/cjs/anyspend/react/components/AnySpend.js +73 -33
  2. package/dist/cjs/anyspend/react/components/AnySpendCustom.js +1 -1
  3. package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +1 -1
  4. package/dist/cjs/anyspend/react/components/common/FeeDetailPanel.js +1 -1
  5. package/dist/cjs/anyspend/react/components/common/FiatPaymentMethod.js +2 -2
  6. package/dist/cjs/anyspend/react/components/common/OrderHistory.d.ts +1 -1
  7. package/dist/cjs/anyspend/react/components/common/OrderHistory.js +7 -3
  8. package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +1 -1
  9. package/dist/cjs/anyspend/react/components/common/PointsDetailPanel.js +1 -1
  10. package/dist/cjs/anyspend/react/components/common/RecipientSelection.js +1 -1
  11. package/dist/cjs/global-account/react/components/AccountAssets/AccountAssets.js +38 -2
  12. package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.js +139 -33
  13. package/dist/cjs/global-account/react/components/B3DynamicModal.js +25 -6
  14. package/dist/cjs/global-account/react/components/Deposit/Deposit.d.ts +1 -0
  15. package/dist/cjs/global-account/react/components/Deposit/Deposit.js +65 -0
  16. package/dist/cjs/global-account/react/components/LinkAccount/LinkAccount.d.ts +6 -4
  17. package/dist/cjs/global-account/react/components/LinkAccount/LinkAccount.js +113 -279
  18. package/dist/cjs/global-account/react/components/LinkAccount/LinkNewAccount.d.ts +4 -0
  19. package/dist/cjs/global-account/react/components/LinkAccount/LinkNewAccount.js +331 -0
  20. package/dist/cjs/global-account/react/components/ManageAccount/AppsContent.d.ts +6 -0
  21. package/dist/cjs/global-account/react/components/ManageAccount/AppsContent.js +34 -0
  22. package/dist/cjs/global-account/react/components/ManageAccount/BalanceContent.js +2 -2
  23. package/dist/cjs/global-account/react/components/ManageAccount/BottomNavigation.d.ts +2 -0
  24. package/dist/cjs/global-account/react/components/ManageAccount/BottomNavigation.js +23 -0
  25. package/dist/cjs/global-account/react/components/ManageAccount/Header.d.ts +3 -0
  26. package/dist/cjs/global-account/react/components/ManageAccount/Header.js +120 -0
  27. package/dist/cjs/global-account/react/components/ManageAccount/HomeActions.d.ts +5 -0
  28. package/dist/cjs/global-account/react/components/ManageAccount/HomeActions.js +43 -0
  29. package/dist/cjs/global-account/react/components/ManageAccount/HomeContent.d.ts +6 -0
  30. package/dist/cjs/global-account/react/components/ManageAccount/HomeContent.js +16 -0
  31. package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +24 -193
  32. package/dist/cjs/global-account/react/components/ManageAccount/NFTContent.d.ts +2 -0
  33. package/dist/cjs/global-account/react/components/ManageAccount/NFTContent.js +15 -0
  34. package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.d.ts +2 -0
  35. package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +44 -0
  36. package/dist/cjs/global-account/react/components/ManageAccount/SettingsContent.d.ts +7 -0
  37. package/dist/cjs/global-account/react/components/ManageAccount/SettingsContent.js +50 -0
  38. package/dist/cjs/global-account/react/components/ManageAccount/SettingsMenuItem.d.ts +9 -0
  39. package/dist/cjs/global-account/react/components/ManageAccount/SettingsMenuItem.js +8 -0
  40. package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.d.ts +2 -0
  41. package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.js +38 -0
  42. package/dist/cjs/global-account/react/components/ManageAccount/TokenContent.d.ts +2 -0
  43. package/dist/cjs/global-account/react/components/ManageAccount/TokenContent.js +22 -0
  44. package/dist/cjs/global-account/react/components/ModalHeader/ModalHeader.d.ts +10 -0
  45. package/dist/cjs/global-account/react/components/ModalHeader/ModalHeader.js +12 -0
  46. package/dist/cjs/global-account/react/components/Send/Send.d.ts +5 -0
  47. package/dist/cjs/global-account/react/components/Send/Send.js +187 -0
  48. package/dist/cjs/global-account/react/components/icons/BellIcon.d.ts +3 -0
  49. package/dist/cjs/global-account/react/components/icons/BellIcon.js +5 -0
  50. package/dist/cjs/global-account/react/components/icons/ChevronDownIcon.d.ts +2 -0
  51. package/dist/cjs/global-account/react/components/icons/ChevronDownIcon.js +7 -0
  52. package/dist/cjs/global-account/react/components/icons/CopyIcon.d.ts +2 -0
  53. package/dist/cjs/global-account/react/components/icons/CopyIcon.js +7 -0
  54. package/dist/cjs/global-account/react/components/icons/LinkIcon.d.ts +3 -0
  55. package/dist/cjs/global-account/react/components/icons/LinkIcon.js +5 -0
  56. package/dist/cjs/global-account/react/components/icons/LockIcon.d.ts +3 -0
  57. package/dist/cjs/global-account/react/components/icons/LockIcon.js +5 -0
  58. package/dist/cjs/global-account/react/components/icons/WalletIcon.d.ts +2 -0
  59. package/dist/cjs/global-account/react/components/icons/WalletIcon.js +7 -0
  60. package/dist/cjs/global-account/react/components/index.d.ts +4 -2
  61. package/dist/cjs/global-account/react/components/index.js +11 -4
  62. package/dist/cjs/global-account/react/components/ui/Tabs.js +2 -2
  63. package/dist/cjs/global-account/react/components/ui/dialog.js +2 -2
  64. package/dist/cjs/global-account/react/hooks/index.d.ts +1 -1
  65. package/dist/cjs/global-account/react/hooks/index.js +3 -1
  66. package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.js +1 -0
  67. package/dist/cjs/global-account/react/stores/index.d.ts +1 -0
  68. package/dist/cjs/global-account/react/stores/index.js +3 -1
  69. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +34 -3
  70. package/dist/cjs/global-account/react/stores/useRecentAddressesStore.d.ts +25 -0
  71. package/dist/cjs/global-account/react/stores/useRecentAddressesStore.js +36 -0
  72. package/dist/cjs/global-account/react/utils/profileDisplay.d.ts +2 -0
  73. package/dist/cjs/global-account/react/utils/profileDisplay.js +2 -2
  74. package/dist/cjs/shared/constants/chains/supported.d.ts +2 -2
  75. package/dist/cjs/shared/utils/ipfs.js +1 -1
  76. package/dist/esm/anyspend/react/components/AnySpend.js +74 -34
  77. package/dist/esm/anyspend/react/components/AnySpendCustom.js +1 -1
  78. package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +1 -1
  79. package/dist/esm/anyspend/react/components/common/FeeDetailPanel.js +1 -1
  80. package/dist/esm/anyspend/react/components/common/FiatPaymentMethod.js +2 -2
  81. package/dist/esm/anyspend/react/components/common/OrderHistory.d.ts +1 -1
  82. package/dist/esm/anyspend/react/components/common/OrderHistory.js +6 -5
  83. package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +1 -1
  84. package/dist/esm/anyspend/react/components/common/PointsDetailPanel.js +1 -1
  85. package/dist/esm/anyspend/react/components/common/RecipientSelection.js +1 -1
  86. package/dist/esm/global-account/react/components/AccountAssets/AccountAssets.js +38 -2
  87. package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.js +140 -34
  88. package/dist/esm/global-account/react/components/B3DynamicModal.js +25 -6
  89. package/dist/esm/global-account/react/components/Deposit/Deposit.d.ts +1 -0
  90. package/dist/esm/global-account/react/components/Deposit/Deposit.js +59 -0
  91. package/dist/esm/global-account/react/components/LinkAccount/LinkAccount.d.ts +6 -4
  92. package/dist/esm/global-account/react/components/LinkAccount/LinkAccount.js +113 -280
  93. package/dist/esm/global-account/react/components/LinkAccount/LinkNewAccount.d.ts +4 -0
  94. package/dist/esm/global-account/react/components/LinkAccount/LinkNewAccount.js +325 -0
  95. package/dist/esm/global-account/react/components/ManageAccount/AppsContent.d.ts +6 -0
  96. package/dist/esm/global-account/react/components/ManageAccount/AppsContent.js +32 -0
  97. package/dist/esm/global-account/react/components/ManageAccount/BalanceContent.js +2 -2
  98. package/dist/esm/global-account/react/components/ManageAccount/BottomNavigation.d.ts +2 -0
  99. package/dist/esm/global-account/react/components/ManageAccount/BottomNavigation.js +21 -0
  100. package/dist/esm/global-account/react/components/ManageAccount/Header.d.ts +3 -0
  101. package/dist/esm/global-account/react/components/ManageAccount/Header.js +81 -0
  102. package/dist/esm/global-account/react/components/ManageAccount/HomeActions.d.ts +5 -0
  103. package/dist/esm/global-account/react/components/ManageAccount/HomeActions.js +41 -0
  104. package/dist/esm/global-account/react/components/ManageAccount/HomeContent.d.ts +6 -0
  105. package/dist/esm/global-account/react/components/ManageAccount/HomeContent.js +10 -0
  106. package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +26 -195
  107. package/dist/esm/global-account/react/components/ManageAccount/NFTContent.d.ts +2 -0
  108. package/dist/esm/global-account/react/components/ManageAccount/NFTContent.js +13 -0
  109. package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.d.ts +2 -0
  110. package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +42 -0
  111. package/dist/esm/global-account/react/components/ManageAccount/SettingsContent.d.ts +7 -0
  112. package/dist/esm/global-account/react/components/ManageAccount/SettingsContent.js +45 -0
  113. package/dist/esm/global-account/react/components/ManageAccount/SettingsMenuItem.d.ts +9 -0
  114. package/dist/esm/global-account/react/components/ManageAccount/SettingsMenuItem.js +6 -0
  115. package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.d.ts +2 -0
  116. package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.js +36 -0
  117. package/dist/esm/global-account/react/components/ManageAccount/TokenContent.d.ts +2 -0
  118. package/dist/esm/global-account/react/components/ManageAccount/TokenContent.js +20 -0
  119. package/dist/esm/global-account/react/components/ModalHeader/ModalHeader.d.ts +10 -0
  120. package/dist/esm/global-account/react/components/ModalHeader/ModalHeader.js +10 -0
  121. package/dist/esm/global-account/react/components/Send/Send.d.ts +5 -0
  122. package/dist/esm/global-account/react/components/Send/Send.js +181 -0
  123. package/dist/esm/global-account/react/components/icons/BellIcon.d.ts +3 -0
  124. package/dist/esm/global-account/react/components/icons/BellIcon.js +3 -0
  125. package/dist/esm/global-account/react/components/icons/ChevronDownIcon.d.ts +2 -0
  126. package/dist/esm/global-account/react/components/icons/ChevronDownIcon.js +4 -0
  127. package/dist/esm/global-account/react/components/icons/CopyIcon.d.ts +2 -0
  128. package/dist/esm/global-account/react/components/icons/CopyIcon.js +4 -0
  129. package/dist/esm/global-account/react/components/icons/LinkIcon.d.ts +3 -0
  130. package/dist/esm/global-account/react/components/icons/LinkIcon.js +3 -0
  131. package/dist/esm/global-account/react/components/icons/LockIcon.d.ts +3 -0
  132. package/dist/esm/global-account/react/components/icons/LockIcon.js +3 -0
  133. package/dist/esm/global-account/react/components/icons/WalletIcon.d.ts +2 -0
  134. package/dist/esm/global-account/react/components/icons/WalletIcon.js +4 -0
  135. package/dist/esm/global-account/react/components/index.d.ts +4 -2
  136. package/dist/esm/global-account/react/components/index.js +7 -2
  137. package/dist/esm/global-account/react/components/ui/Tabs.js +2 -2
  138. package/dist/esm/global-account/react/components/ui/dialog.js +2 -2
  139. package/dist/esm/global-account/react/hooks/index.d.ts +1 -1
  140. package/dist/esm/global-account/react/hooks/index.js +1 -1
  141. package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.js +1 -0
  142. package/dist/esm/global-account/react/stores/index.d.ts +1 -0
  143. package/dist/esm/global-account/react/stores/index.js +1 -0
  144. package/dist/esm/global-account/react/stores/useModalStore.d.ts +34 -3
  145. package/dist/esm/global-account/react/stores/useRecentAddressesStore.d.ts +25 -0
  146. package/dist/esm/global-account/react/stores/useRecentAddressesStore.js +33 -0
  147. package/dist/esm/global-account/react/utils/profileDisplay.d.ts +2 -0
  148. package/dist/esm/global-account/react/utils/profileDisplay.js +2 -2
  149. package/dist/esm/shared/constants/chains/supported.d.ts +2 -2
  150. package/dist/esm/shared/utils/ipfs.js +1 -1
  151. package/dist/styles/index.css +1 -1
  152. package/dist/types/anyspend/react/components/common/OrderHistory.d.ts +1 -1
  153. package/dist/types/global-account/react/components/Deposit/Deposit.d.ts +1 -0
  154. package/dist/types/global-account/react/components/LinkAccount/LinkAccount.d.ts +6 -4
  155. package/dist/types/global-account/react/components/LinkAccount/LinkNewAccount.d.ts +4 -0
  156. package/dist/types/global-account/react/components/ManageAccount/AppsContent.d.ts +6 -0
  157. package/dist/types/global-account/react/components/ManageAccount/BottomNavigation.d.ts +2 -0
  158. package/dist/types/global-account/react/components/ManageAccount/Header.d.ts +3 -0
  159. package/dist/types/global-account/react/components/ManageAccount/HomeActions.d.ts +5 -0
  160. package/dist/types/global-account/react/components/ManageAccount/HomeContent.d.ts +6 -0
  161. package/dist/types/global-account/react/components/ManageAccount/NFTContent.d.ts +2 -0
  162. package/dist/types/global-account/react/components/ManageAccount/ProfileSection.d.ts +2 -0
  163. package/dist/types/global-account/react/components/ManageAccount/SettingsContent.d.ts +7 -0
  164. package/dist/types/global-account/react/components/ManageAccount/SettingsMenuItem.d.ts +9 -0
  165. package/dist/types/global-account/react/components/ManageAccount/SettingsProfileCard.d.ts +2 -0
  166. package/dist/types/global-account/react/components/ManageAccount/TokenContent.d.ts +2 -0
  167. package/dist/types/global-account/react/components/ModalHeader/ModalHeader.d.ts +10 -0
  168. package/dist/types/global-account/react/components/Send/Send.d.ts +5 -0
  169. package/dist/types/global-account/react/components/icons/BellIcon.d.ts +3 -0
  170. package/dist/types/global-account/react/components/icons/ChevronDownIcon.d.ts +2 -0
  171. package/dist/types/global-account/react/components/icons/CopyIcon.d.ts +2 -0
  172. package/dist/types/global-account/react/components/icons/LinkIcon.d.ts +3 -0
  173. package/dist/types/global-account/react/components/icons/LockIcon.d.ts +3 -0
  174. package/dist/types/global-account/react/components/icons/WalletIcon.d.ts +2 -0
  175. package/dist/types/global-account/react/components/index.d.ts +4 -2
  176. package/dist/types/global-account/react/hooks/index.d.ts +1 -1
  177. package/dist/types/global-account/react/stores/index.d.ts +1 -0
  178. package/dist/types/global-account/react/stores/useModalStore.d.ts +34 -3
  179. package/dist/types/global-account/react/stores/useRecentAddressesStore.d.ts +25 -0
  180. package/dist/types/global-account/react/utils/profileDisplay.d.ts +2 -0
  181. package/dist/types/shared/constants/chains/supported.d.ts +2 -2
  182. package/package.json +1 -1
  183. package/src/anyspend/react/components/AnySpend.tsx +225 -167
  184. package/src/anyspend/react/components/AnySpendCustom.tsx +1 -1
  185. package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +1 -1
  186. package/src/anyspend/react/components/common/FeeDetailPanel.tsx +1 -1
  187. package/src/anyspend/react/components/common/FiatPaymentMethod.tsx +2 -2
  188. package/src/anyspend/react/components/common/OrderHistory.tsx +8 -13
  189. package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +1 -1
  190. package/src/anyspend/react/components/common/PointsDetailPanel.tsx +1 -1
  191. package/src/anyspend/react/components/common/RecipientSelection.tsx +1 -1
  192. package/src/global-account/react/components/AccountAssets/AccountAssets.tsx +115 -25
  193. package/src/global-account/react/components/AvatarEditor/AvatarEditor.tsx +303 -126
  194. package/src/global-account/react/components/B3DynamicModal.tsx +28 -6
  195. package/src/global-account/react/components/Deposit/Deposit.tsx +211 -0
  196. package/src/global-account/react/components/LinkAccount/LinkAccount.tsx +332 -433
  197. package/src/global-account/react/components/LinkAccount/LinkNewAccount.tsx +490 -0
  198. package/src/global-account/react/components/ManageAccount/AppsContent.tsx +79 -0
  199. package/src/global-account/react/components/ManageAccount/BalanceContent.tsx +2 -3
  200. package/src/global-account/react/components/ManageAccount/BottomNavigation.tsx +83 -0
  201. package/src/global-account/react/components/ManageAccount/Header.tsx +230 -0
  202. package/src/global-account/react/components/ManageAccount/HomeActions.tsx +118 -0
  203. package/src/global-account/react/components/ManageAccount/HomeContent.tsx +42 -0
  204. package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +73 -589
  205. package/src/global-account/react/components/ManageAccount/NFTContent.tsx +24 -0
  206. package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +74 -0
  207. package/src/global-account/react/components/ManageAccount/SettingsContent.tsx +87 -0
  208. package/src/global-account/react/components/ManageAccount/SettingsMenuItem.tsx +31 -0
  209. package/src/global-account/react/components/ManageAccount/SettingsProfileCard.tsx +74 -0
  210. package/src/global-account/react/components/ManageAccount/TokenContent.tsx +41 -0
  211. package/src/global-account/react/components/ModalHeader/ModalHeader.tsx +50 -0
  212. package/src/global-account/react/components/Send/Send.tsx +585 -0
  213. package/src/global-account/react/components/icons/BellIcon.tsx +15 -0
  214. package/src/global-account/react/components/icons/ChevronDownIcon.tsx +17 -0
  215. package/src/global-account/react/components/icons/CopyIcon.tsx +22 -0
  216. package/src/global-account/react/components/icons/LinkIcon.tsx +15 -0
  217. package/src/global-account/react/components/icons/LockIcon.tsx +15 -0
  218. package/src/global-account/react/components/icons/WalletIcon.tsx +21 -0
  219. package/src/global-account/react/components/index.ts +9 -2
  220. package/src/global-account/react/components/ui/Tabs.tsx +5 -13
  221. package/src/global-account/react/components/ui/dialog.tsx +32 -14
  222. package/src/global-account/react/hooks/index.ts +3 -0
  223. package/src/global-account/react/hooks/useB3BalanceFromAddresses.ts +1 -0
  224. package/src/global-account/react/stores/index.ts +1 -0
  225. package/src/global-account/react/stores/useModalStore.ts +39 -2
  226. package/src/global-account/react/stores/useRecentAddressesStore.ts +55 -0
  227. package/src/global-account/react/utils/profileDisplay.ts +4 -2
  228. package/src/shared/utils/ipfs.ts +1 -1
  229. package/src/styles/index.css +6 -1
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.HomeContent = HomeContent;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const Tabs_1 = require("../ui/Tabs");
9
+ const Header_1 = require("./Header");
10
+ const HomeActions_1 = __importDefault(require("./HomeActions"));
11
+ const NFTContent_1 = __importDefault(require("./NFTContent"));
12
+ const ProfileSection_1 = __importDefault(require("./ProfileSection"));
13
+ const TokenContent_1 = __importDefault(require("./TokenContent"));
14
+ function HomeContent({ showDeposit = false, showSwap = true }) {
15
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col", children: [(0, jsx_runtime_1.jsx)(Header_1.Header, {}), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col", children: [(0, jsx_runtime_1.jsx)(ProfileSection_1.default, {}), (0, jsx_runtime_1.jsx)(HomeActions_1.default, { showDeposit: showDeposit, showSwap: showSwap }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-2 p-5", children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { defaultValue: "balance", children: [(0, jsx_runtime_1.jsxs)(Tabs_1.TabsList, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.TabTrigger, { value: "balance", className: "font-neue-montreal-semibold p-0 pr-3", children: "Balance" }), (0, jsx_runtime_1.jsx)(Tabs_1.TabTrigger, { value: "nfts", className: "font-neue-montreal-semibold p-0 pr-3", children: "NFTs" })] }), (0, jsx_runtime_1.jsx)(Tabs_1.TabsContent, { value: "balance", className: "px-0 pb-4 pt-2", children: (0, jsx_runtime_1.jsx)(TokenContent_1.default, {}) }), (0, jsx_runtime_1.jsx)(Tabs_1.TabsContent, { value: "nfts", className: "px-0 pb-4 pt-2", children: (0, jsx_runtime_1.jsx)(NFTContent_1.default, {}) })] }) })] })] }));
16
+ }
@@ -5,202 +5,33 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ManageAccount = ManageAccount;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
- const app_1 = __importDefault(require("../../../../global-account/app"));
9
8
  const react_1 = require("../../../../global-account/react");
10
- const SignOutIcon_1 = require("../../../../global-account/react/components/icons/SignOutIcon");
11
- const formatNumber_1 = require("../../../../shared/utils/formatNumber");
12
- const thirdweb_1 = require("../../../../shared/utils/thirdweb");
13
- const truncateAddress_1 = require("../../../../shared/utils/truncateAddress");
14
- const lucide_react_1 = require("lucide-react");
15
- const react_2 = require("react");
16
- const sonner_1 = require("sonner");
17
- const react_3 = require("thirdweb/react");
18
- const viem_1 = require("viem");
19
- const profileDisplay_1 = require("../../utils/profileDisplay");
20
- const AccountAssets_1 = require("../AccountAssets/AccountAssets");
21
- const ContentTokens_1 = require("./ContentTokens");
22
- // Helper function to check if a string is a wallet address and format it
23
- const formatProfileTitle = (title) => {
24
- // Check if title looks like an Ethereum address (0x followed by 40 hex characters)
25
- const isEthereumAddress = /^0x[a-fA-F0-9]{40}$/.test(title);
26
- if (isEthereumAddress) {
27
- return {
28
- displayTitle: (0, truncateAddress_1.truncateAddress)(title),
29
- isAddress: true,
30
- };
31
- }
32
- return {
33
- displayTitle: title,
34
- isAddress: false,
35
- };
9
+ const BottomNavigation_1 = __importDefault(require("./BottomNavigation"));
10
+ const HomeContent_1 = require("./HomeContent");
11
+ const SettingsContent_1 = __importDefault(require("./SettingsContent"));
12
+ const HomeIcon = ({ className, size = 24 }) => {
13
+ return ((0, jsx_runtime_1.jsx)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M12.5227 1.33636C12.1804 1.24368 11.8196 1.24368 11.4773 1.33636C11.08 1.44395 10.7454 1.7066 10.4784 1.91623L10.4038 1.97465L3.54376 7.31012C3.16713 7.6024 2.83532 7.85991 2.58806 8.19421C2.37107 8.48759 2.20942 8.8181 2.11106 9.1695C1.99898 9.56992 1.99943 9.98993 1.99995 10.4667L2.00002 17.8385C2 18.3657 1.99998 18.8204 2.03059 19.195C2.06289 19.5904 2.1342 19.9836 2.327 20.362C2.61462 20.9264 3.07356 21.3854 3.63805 21.673C4.01643 21.8658 4.40964 21.9371 4.80499 21.9694C5.17956 22 5.63431 22 6.16145 22H17.8386C18.3657 22 18.8205 22 19.195 21.9694C19.5904 21.9371 19.9836 21.8658 20.362 21.673C20.9265 21.3854 21.3854 20.9264 21.673 20.362C21.8658 19.9836 21.9371 19.5904 21.9694 19.195C22.0001 18.8204 22 18.3657 22 17.8386L22.0001 10.4667C22.0006 9.98993 22.0011 9.56992 21.889 9.1695C21.7906 8.8181 21.629 8.48759 21.412 8.19421C21.1647 7.8599 20.8329 7.6024 20.4563 7.31011L13.5963 1.97465L13.5216 1.91623C13.2546 1.7066 12.9201 1.44395 12.5227 1.33636ZM8.00003 16C7.44775 16 7.00003 16.4477 7.00003 17C7.00003 17.5523 7.44775 18 8.00003 18H16C16.5523 18 17 17.5523 17 17C17 16.4477 16.5523 16 16 16H8.00003Z", fill: "currentColor" }) }));
14
+ };
15
+ const SwapIcon = ({ className, size = 24 }) => {
16
+ return ((0, jsx_runtime_1.jsx)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M20.4533 12.893C20.1755 15.5029 18.6968 17.9487 16.2498 19.3614C12.1843 21.7086 6.98576 20.3157 4.63855 16.2502L4.38855 15.8172M3.5465 11.107C3.8243 8.49711 5.30309 6.05138 7.75007 4.63862C11.8156 2.29141 17.0141 3.68434 19.3613 7.74983L19.6113 8.18285M3.49353 18.0661L4.22558 15.334L6.95763 16.0661M17.0428 7.93401L19.7748 8.66606L20.5069 5.93401", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
17
+ };
18
+ const SettingsIcon = ({ className, size = 24 }) => {
19
+ return ((0, jsx_runtime_1.jsx)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M19.286 15.9606C19.2272 15.6362 19.2669 15.3016 19.4 15C19.5268 14.7042 19.7372 14.452 20.0055 14.2743C20.2738 14.0966 20.5882 14.0013 20.91 14H21C21.5304 14 22.0391 13.7893 22.4142 13.4142C22.7893 13.0391 23 12.5304 23 12C23 11.4696 22.7893 10.9609 22.4142 10.5858C22.0391 10.2107 21.5304 10 21 10H20.83C20.5082 9.99872 20.1938 9.90337 19.9255 9.72569C19.6572 9.54802 19.4468 9.29577 19.32 9V8.92C19.1869 8.61838 19.1472 8.28381 19.206 7.95941C19.2648 7.63502 19.4195 7.33568 19.65 7.1L19.71 7.04C19.896 6.85425 20.0435 6.63368 20.1441 6.39088C20.2448 6.14808 20.2966 5.88783 20.2966 5.625C20.2966 5.36217 20.2448 5.10192 20.1441 4.85912C20.0435 4.61632 19.896 4.39575 19.71 4.21C19.5243 4.02405 19.3037 3.87653 19.0609 3.77588C18.8181 3.67523 18.5578 3.62343 18.295 3.62343C18.0322 3.62343 17.7719 3.67523 17.5291 3.77588C17.2863 3.87653 17.0657 4.02405 16.88 4.21L16.82 4.27C16.5843 4.50054 16.285 4.65519 15.9606 4.714C15.6362 4.77282 15.3016 4.73312 15 4.6C14.7042 4.47324 14.452 4.26276 14.2743 3.99447C14.0966 3.72618 14.0013 3.41179 14 3.09V3C14 2.46957 13.7893 1.96086 13.4142 1.58579C13.0391 1.21071 12.5304 1 12 1C11.4696 1 10.9609 1.21071 10.5858 1.58579C10.2107 1.96086 10 2.46957 10 3V3.17C9.99872 3.49179 9.90337 3.80618 9.72569 4.07447C9.54802 4.34276 9.29577 4.55324 9 4.68H8.92C8.61838 4.81312 8.28381 4.85282 7.95941 4.794C7.63502 4.73519 7.33568 4.58054 7.1 4.35L7.04 4.29C6.85425 4.10405 6.63368 3.95653 6.39088 3.85588C6.14808 3.75523 5.88783 3.70343 5.625 3.70343C5.36217 3.70343 5.10192 3.75523 4.85912 3.85588C4.61632 3.95653 4.39575 4.10405 4.21 4.29C4.02405 4.47575 3.87653 4.69632 3.77588 4.93912C3.67523 5.18192 3.62343 5.44217 3.62343 5.705C3.62343 5.96783 3.67523 6.22808 3.77588 6.47088C3.87653 6.71368 4.02405 6.93425 4.21 7.12L4.27 7.18C4.50054 7.41568 4.65519 7.71502 4.714 8.03941C4.77282 8.36381 4.73312 8.69838 4.6 9C4.48572 9.31074 4.28059 9.5799 4.0113 9.77251C3.742 9.96512 3.42099 10.0723 3.09 10.08H3C2.46957 10.08 1.96086 10.2907 1.58579 10.6658C1.21071 11.0409 1 11.5496 1 12.08C1 12.6104 1.21071 13.1191 1.58579 13.4942C1.96086 13.8693 2.46957 14.08 3 14.08H3.17C3.49179 14.0813 3.80618 14.1766 4.07447 14.3543C4.34276 14.532 4.55324 14.7842 4.68 15.08C4.81312 15.3816 4.85282 15.7162 4.794 16.0406C4.73519 16.365 4.58054 16.6643 4.35 16.9L4.29 16.96C4.10405 17.1457 3.95653 17.3663 3.85588 17.6091C3.75523 17.8519 3.70343 18.1122 3.70343 18.375C3.70343 18.6378 3.75523 18.8981 3.85588 19.1409C3.95653 19.3837 4.10405 19.6043 4.29 19.79C4.47575 19.976 4.69632 20.1235 4.93912 20.2241C5.18192 20.3248 5.44217 20.3766 5.705 20.3766C5.96783 20.3766 6.22808 20.3248 6.47088 20.2241C6.71368 20.1235 6.93425 19.976 7.12 19.79L7.18 19.73C7.41568 19.4995 7.71502 19.3448 8.03941 19.286C8.36381 19.2272 8.69838 19.2669 9 19.4C9.31074 19.5143 9.5799 19.7194 9.77251 19.9887C9.96512 20.258 10.0723 20.579 10.08 20.91V21C10.08 21.5304 10.2907 22.0391 10.6658 22.4142C11.0409 22.7893 11.5496 23 12.08 23C12.6104 23 13.1191 22.7893 13.4942 22.4142C13.8693 22.0391 14.08 21.5304 14.08 21V20.83C14.0813 20.5082 14.1766 20.1938 14.3543 19.9255C14.532 19.6572 14.7842 19.4468 15.08 19.32C15.3816 19.1869 15.7162 19.1472 16.0406 19.206C16.365 19.2648 16.6643 19.4195 16.9 19.65L16.96 19.71C17.1457 19.896 17.3663 20.0435 17.6091 20.1441C17.8519 20.2448 18.1122 20.2966 18.375 20.2966C18.6378 20.2966 18.8981 20.2448 19.1409 20.1441C19.3837 20.0435 19.6043 19.896 19.79 19.71C19.976 19.5243 20.1235 19.3037 20.2241 19.0609C20.3248 18.8181 20.3766 18.5578 20.3766 18.295C20.3766 18.0322 20.3248 17.7719 20.2241 17.5291C20.1235 17.2863 19.976 17.0657 19.79 16.88L19.73 16.82C19.4995 16.5843 19.3448 16.285 19.286 15.9606ZM15 12C15 13.6569 13.6569 15 12 15C10.3431 15 9 13.6569 9 12C9 10.3431 10.3431 9 12 9C13.6569 9 15 10.3431 15 12Z", fill: "currentColor" }) }));
36
20
  };
37
- const BalanceContent_1 = require("./BalanceContent");
38
21
  function ManageAccount({ onLogout, onSwap: _onSwap, onDeposit: _onDeposit, chain, partnerId, showSwap, showDeposit, }) {
39
- const [revokingSignerId, setRevokingSignerId] = (0, react_2.useState)(null);
40
- const account = (0, react_3.useActiveAccount)();
41
- const { data: nfts, isLoading } = (0, react_1.useAccountAssets)(account?.address);
42
- const { data: signers, refetch: refetchSigners } = (0, react_1.useGetAllTWSigners)({
43
- chain,
44
- accountAddress: account?.address,
45
- });
46
- const { setB3ModalOpen, contentType } = (0, react_1.useModalStore)();
47
- const { activeTab = "overview", setActiveTab } = contentType;
48
- const { logout } = (0, react_1.useAuthentication)(partnerId);
49
- const [logoutLoading, setLogoutLoading] = (0, react_2.useState)(false);
50
- const { removeSessionKey } = (0, react_1.useRemoveSessionKey)({
51
- chain,
52
- onSuccess: tx => {
53
- console.log("@@removeSessionKey:tx", tx);
54
- setRevokingSignerId(null);
55
- },
56
- onError: error => {
57
- console.error("Error revoking access:", error);
58
- setRevokingSignerId(null);
59
- },
60
- refetchSigners: () => refetchSigners(),
61
- });
62
- const handleRevoke = async (signer) => {
63
- setRevokingSignerId(signer.id);
64
- await removeSessionKey(signer);
65
- };
66
- const onLogoutEnhanced = async () => {
67
- setLogoutLoading(true);
68
- await logout();
69
- onLogout?.();
70
- setB3ModalOpen(false);
71
- setLogoutLoading(false);
72
- };
73
- const AppsContent = () => ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [signers?.map((signer) => ((0, jsx_runtime_1.jsx)("div", { className: "rounded-xl border border-gray-200 p-4 dark:border-gray-800", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-gray-100 dark:bg-gray-800", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-medium text-gray-600 dark:text-gray-400", children: "App" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "font-medium text-gray-900 dark:text-white", children: signer.partner.name }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-2 space-y-1", children: [(0, jsx_runtime_1.jsxs)("p", { className: "text-xs text-gray-500", children: ["Added ", new Date(signer.createdAt).toLocaleDateString()] }), (0, jsx_runtime_1.jsxs)("p", { className: "text-xs text-gray-500", children: ["Expires ", new Date(Number(signer.endTimestamp) * 1000).toLocaleDateString()] }), (0, jsx_runtime_1.jsxs)("p", { className: "text-xs text-gray-500", children: ["Max spend: ", (0, formatNumber_1.formatNumber)(Number((0, viem_1.formatUnits)(signer.nativeTokenLimitPerTransaction, 18))), " ETH"] })] })] })] }), (0, jsx_runtime_1.jsx)(react_1.Button, { variant: "outline", size: "sm", className: "border-red-200 text-red-500 hover:border-red-300 hover:text-red-600", onClick: () => handleRevoke(signer), disabled: revokingSignerId === signer.id, children: revokingSignerId === signer.id ? "Revoking..." : "Revoke" })] }) }, signer.id))), !signers?.length && (0, jsx_runtime_1.jsx)("div", { className: "py-12 text-center text-gray-500", children: "No connected apps" })] }));
74
- const SettingsContent = () => {
75
- const [unlinkingAccountId, setUnlinkingAccountId] = (0, react_2.useState)(null);
76
- const { data: profilesRaw = [], isLoading: isLoadingProfiles } = (0, react_3.useProfiles)({ client: thirdweb_1.client });
77
- const { mutate: unlinkProfile, isPending: isUnlinking } = (0, react_3.useUnlinkProfile)();
78
- const { setB3ModalOpen, setB3ModalContentType, isLinking, contentType } = (0, react_1.useModalStore)();
79
- const { user, setUser } = (0, react_1.useB3)();
80
- const [isUpdatingCode, setIsUpdatingCode] = (0, react_2.useState)(false);
81
- const [newReferralCode, setNewReferralCode] = (0, react_2.useState)("");
82
- const [isEditingCode, setIsEditingCode] = (0, react_2.useState)(false);
83
- const referallCodeRef = (0, react_2.useRef)(null);
84
- const { data: referrals, isLoading: isLoadingReferrals } = (0, react_1.useQueryB3)("referrals", "find", { query: { referrerId: user?.userId } }, !!user?.userId);
85
- const showReferralInfo = contentType?.showReferralInfo ?? false;
86
- const mutationOptions = {
87
- onError: (error) => {
88
- console.error("Error Unlinking account:", error);
89
- sonner_1.toast.error(error.message);
90
- },
91
- onSuccess: async (data) => {
92
- console.log("Raw Link Account Data:", data);
93
- try {
94
- console.log("Sync user data...");
95
- await app_1.default.service("users").syncTwProfiles({});
22
+ const contentType = (0, react_1.useModalStore)(state => state.contentType);
23
+ const { activeTab = "home", setActiveTab } = contentType;
24
+ const setB3ModalContentType = (0, react_1.useModalStore)(state => state.setB3ModalContentType);
25
+ return ((0, jsx_runtime_1.jsx)("div", { className: "b3-manage-account flex-1", children: (0, jsx_runtime_1.jsxs)(react_1.TabsPrimitive, { defaultValue: activeTab, onValueChange: value => {
26
+ const tab = value;
27
+ if (tab === "swap") {
28
+ setB3ModalContentType({
29
+ type: "anySpend",
30
+ showBackButton: true,
31
+ });
96
32
  }
97
- catch (refreshError) {
98
- console.warn("⚠️ Could not sync user data:", refreshError);
33
+ else if (["home", "tokens", "nfts", "apps", "settings"].includes(tab)) {
34
+ setActiveTab?.(tab);
99
35
  }
100
- },
101
- };
102
- // Fetch referred users
103
- const currentReferralCode = user?.referralCode || user?.userId || "";
104
- const handleCopyCode = async () => {
105
- try {
106
- await navigator.clipboard.writeText(currentReferralCode);
107
- sonner_1.toast.success("Referral code copied to clipboard!");
108
- }
109
- catch (error) {
110
- sonner_1.toast.error("Failed to copy referral code");
111
- }
112
- };
113
- const handleUpdateReferralCode = async () => {
114
- if (!newReferralCode)
115
- return;
116
- setIsUpdatingCode(true);
117
- try {
118
- // @ts-expect-error - setReferralCode is not typed for some reason
119
- const newUser = await app_1.default.service("users").setReferralCode({
120
- userId: user?.userId,
121
- referralCode: newReferralCode,
122
- });
123
- setUser(newUser);
124
- sonner_1.toast.success("Referral code updated successfully!");
125
- setIsEditingCode(false);
126
- setNewReferralCode("");
127
- }
128
- catch (error) {
129
- sonner_1.toast.error("Failed to update referral code");
130
- }
131
- finally {
132
- setIsUpdatingCode(false);
133
- }
134
- };
135
- const profiles = profilesRaw
136
- .filter((profile) => !["custom_auth_endpoint"].includes(profile.type))
137
- .map((profile) => ({
138
- ...(0, profileDisplay_1.getProfileDisplayInfo)(profile),
139
- originalProfile: profile,
140
- }));
141
- const handleUnlink = async (profile) => {
142
- setUnlinkingAccountId(profile.title);
143
- try {
144
- unlinkProfile({ client: thirdweb_1.client, profileToUnlink: profile.originalProfile }, mutationOptions);
145
- }
146
- catch (error) {
147
- console.error("Error unlinking account:", error);
148
- }
149
- finally {
150
- setUnlinkingAccountId(null);
151
- }
152
- };
153
- const handleOpenLinkModal = () => {
154
- setB3ModalOpen(true);
155
- setB3ModalContentType({
156
- type: "linkAccount",
157
- showBackButton: true,
158
- partnerId,
159
- chain,
160
- onSuccess: async () => {
161
- // Let the LinkAccount component handle modal closing
162
- },
163
- onError: () => {
164
- // Let the LinkAccount component handle errors
165
- },
166
- onClose: () => {
167
- // Let the LinkAccount component handle closing
168
- },
169
- });
170
- };
171
- console.log("@@profiles", profiles);
172
- return ((0, jsx_runtime_1.jsxs)("div", { className: "linked-accounts-settings space-y-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "linked-accounts-section space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "linked-accounts-header flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-b3-grey font-neue-montreal-semibold linked-accounts-settings-title text-xl", children: "Linked Accounts" }), (0, jsx_runtime_1.jsxs)(react_1.Button, { className: "linked-accounts-settings-button linked-accounts-link-button bg-b3-primary-wash hover:bg-b3-primary-wash/70 flex items-center gap-2 rounded-full px-4 py-2", onClick: handleOpenLinkModal, disabled: isLinking, children: [isLinking ? ((0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "linked-accounts-link-loading text-b3-primary-blue animate-spin", size: 16 })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.LinkIcon, { size: 16, className: "linked-accounts-link-icon text-b3-primary-blue" })), (0, jsx_runtime_1.jsx)("span", { className: "linked-accounts-link-text text-b3-grey font-neue-montreal-semibold", children: isLinking ? "Linking..." : "Link New Account" })] })] }), isLoadingProfiles ? ((0, jsx_runtime_1.jsx)("div", { className: "linked-accounts-loading flex justify-center py-8", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "text-b3-grey animate-spin" }) })) : profiles.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "linked-accounts-list space-y-4", children: profiles.map(profile => ((0, jsx_runtime_1.jsxs)("div", { className: "linked-account-item bg-b3-line group flex items-center justify-between rounded-xl p-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "linked-account-info flex items-center gap-3", children: [profile.imageUrl ? ((0, jsx_runtime_1.jsx)("img", { src: profile.imageUrl, alt: profile.title, className: "linked-account-avatar linked-account-avatar-image size-10 rounded-full" })) : ((0, jsx_runtime_1.jsx)("div", { className: "linked-account-avatar linked-account-avatar-placeholder bg-b3-primary-wash flex h-10 w-10 items-center justify-center rounded-full", children: (0, jsx_runtime_1.jsx)("span", { className: "linked-account-initial text-b3-grey font-neue-montreal-semibold text-sm uppercase", children: profile.initial }) })), (0, jsx_runtime_1.jsxs)("div", { className: "linked-account-details", children: [(0, jsx_runtime_1.jsxs)("div", { className: "linked-account-title-row flex items-center gap-2", children: [(() => {
173
- const { displayTitle, isAddress } = formatProfileTitle(profile.title);
174
- const handleCopyAddress = async (e) => {
175
- e.stopPropagation();
176
- try {
177
- await navigator.clipboard.writeText(profile.title);
178
- sonner_1.toast.success("Address copied to clipboard!");
179
- }
180
- catch (error) {
181
- sonner_1.toast.error("Failed to copy address");
182
- }
183
- };
184
- return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1", children: [(0, jsx_runtime_1.jsx)("span", { className: `linked-account-title text-b3-grey font-neue-montreal-semibold ${isAddress
185
- ? "font-mono text-sm" // Use monospace font for addresses
186
- : "break-words" // Use break-words for emails/names (better than break-all)
187
- }`, title: isAddress ? profile.title : undefined, children: displayTitle }), isAddress && ((0, jsx_runtime_1.jsx)("button", { onClick: handleCopyAddress, className: "linked-account-copy-button ml-1 rounded p-1 opacity-0 transition-opacity hover:bg-gray-100 group-hover:opacity-100", title: "Copy full address", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { size: 12, className: "text-gray-500 hover:text-gray-700" }) }))] }));
188
- })(), (0, jsx_runtime_1.jsx)("span", { className: "linked-account-type text-b3-foreground-muted font-neue-montreal-medium bg-b3-primary-wash rounded px-2 py-0.5 text-xs", children: profile.type.toUpperCase() })] }), (0, jsx_runtime_1.jsx)("div", { className: "linked-account-subtitle text-b3-foreground-muted font-neue-montreal-medium text-sm", children: profile.subtitle })] })] }), (0, jsx_runtime_1.jsx)(react_1.Button, { variant: "ghost", size: "icon", className: "linked-account-unlink-button text-b3-grey hover:text-b3-negative", onClick: () => handleUnlink(profile), disabled: unlinkingAccountId === profile.title || isUnlinking, children: unlinkingAccountId === profile.title || isUnlinking ? ((0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "linked-account-unlink-loading animate-spin" })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.UnlinkIcon, { size: 16, className: "linked-account-unlink-icon" })) })] }, profile.title))) })) : ((0, jsx_runtime_1.jsx)("div", { className: "linked-accounts-empty text-b3-foreground-muted py-8 text-center", children: "No linked accounts found" }))] }), showReferralInfo && (
189
- /* Referral Section */
190
- (0, jsx_runtime_1.jsxs)("div", { className: "referrals-section space-y-4", children: [(0, jsx_runtime_1.jsx)("h3", { className: "referrals-title text-b3-grey font-neue-montreal-semibold text-xl", children: "Referrals" }), (0, jsx_runtime_1.jsxs)("div", { className: "referral-code-container bg-b3-line rounded-xl p-4", children: [isEditingCode && ((0, jsx_runtime_1.jsxs)("div", { className: "referral-code-header-editing", children: [(0, jsx_runtime_1.jsx)("div", { className: "referral-code-title text-b3-grey font-neue-montreal-semibold", children: "Your Referral Code" }), (0, jsx_runtime_1.jsx)("div", { className: "referral-code-description text-b3-foreground-muted font-neue-montreal-medium text-sm", children: "Share this code with friends to earn rewards" })] })), (0, jsx_runtime_1.jsxs)("div", { className: "referral-code-content flex items-center justify-between", children: [!isEditingCode && ((0, jsx_runtime_1.jsxs)("div", { className: "referral-code-header", children: [(0, jsx_runtime_1.jsx)("div", { className: "referral-code-title text-b3-grey font-neue-montreal-semibold", children: "Your Referral Code" }), (0, jsx_runtime_1.jsx)("div", { className: "referral-code-description text-b3-foreground-muted font-neue-montreal-medium text-sm", children: "Share this code with friends to earn rewards" })] })), (0, jsx_runtime_1.jsx)("div", { className: "referral-code-actions flex items-center gap-2", children: isEditingCode ? ((0, jsx_runtime_1.jsxs)("div", { className: "referral-code-edit-form flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("input", { type: "text", value: newReferralCode, onChange: e => setNewReferralCode(e.target.value), className: "referral-code-input rounded-lg border border-gray-200 bg-white px-3 py-1.5 text-sm", placeholder: "Enter new code", ref: referallCodeRef }), (0, jsx_runtime_1.jsx)(react_1.Button, { size: "sm", className: "referral-code-save-button", onClick: handleUpdateReferralCode, disabled: isUpdatingCode || !newReferralCode, children: isUpdatingCode ? ((0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "referral-code-save-loading h-4 w-4 animate-spin" })) : ("Save") }), (0, jsx_runtime_1.jsx)(react_1.Button, { size: "sm", variant: "ghost", className: "referral-code-cancel-button", onClick: () => {
191
- setIsEditingCode(false);
192
- setNewReferralCode("");
193
- }, children: "Cancel" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "referral-code-display rounded-lg border border-gray-200 bg-white px-3 py-1.5 text-sm", children: currentReferralCode }), (0, jsx_runtime_1.jsx)(react_1.Button, { size: "icon", variant: "ghost", className: "referral-code-copy-button", onClick: handleCopyCode, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { className: "referral-code-copy-icon h-4 w-4" }) }), (0, jsx_runtime_1.jsx)(react_1.Button, { size: "icon", variant: "ghost", className: "referral-code-edit-button", onClick: () => {
194
- setIsEditingCode(true);
195
- setTimeout(() => {
196
- referallCodeRef.current?.focus();
197
- }, 100);
198
- }, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Pencil, { className: "referral-code-edit-icon h-4 w-4" }) })] })) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "referred-users-container bg-b3-line rounded-xl p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "referred-users-title text-b3-grey font-neue-montreal-semibold mb-4", children: "Referred Users" }), isLoadingReferrals ? ((0, jsx_runtime_1.jsx)("div", { className: "referred-users-loading flex justify-center py-4", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "h-6 w-6 animate-spin text-gray-400" }) })) : referrals?.data?.length ? ((0, jsx_runtime_1.jsx)("div", { className: "referred-users-list space-y-3", children: referrals.data.map((referral) => ((0, jsx_runtime_1.jsxs)("div", { className: "referred-user-item flex items-center justify-between rounded-lg bg-white p-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "referred-user-id text-sm font-medium", children: referral.referreeId }), (0, jsx_runtime_1.jsx)("div", { className: "referred-user-date text-sm text-gray-500", children: new Date(referral.createdAt).toLocaleDateString() })] }, String(referral._id)))) })) : ((0, jsx_runtime_1.jsx)("div", { className: "referred-users-empty py-4 text-center text-gray-500", children: "No referred users yet" }))] })] })), (0, jsx_runtime_1.jsxs)("div", { className: "account-preferences-section space-y-4", children: [(0, jsx_runtime_1.jsx)("h3", { className: "account-preferences-title text-b3-grey font-neue-montreal-semibold text-xl", children: "Account Preferences" }), (0, jsx_runtime_1.jsx)("div", { className: "account-preferences-container bg-b3-line rounded-xl p-4", children: (0, jsx_runtime_1.jsxs)("div", { className: "account-preference-item flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className: "account-preference-info", children: [(0, jsx_runtime_1.jsx)("div", { className: "account-preference-title text-b3-grey font-neue-montreal-semibold", children: "Dark Mode" }), (0, jsx_runtime_1.jsx)("div", { className: "account-preference-description text-b3-foreground-muted font-neue-montreal-medium text-sm", children: "Switch between light and dark theme" })] }), (0, jsx_runtime_1.jsx)("div", { className: "account-preference-toggle theme-toggle-placeholder bg-b3-primary-wash h-6 w-12 rounded-full" })] }) })] }), (0, jsx_runtime_1.jsxs)("button", { className: "logout-button logout-section border-b3-line hover:bg-b3-line relative flex w-full items-center justify-center rounded-2xl border p-4 transition-colors", onClick: onLogoutEnhanced, children: [(0, jsx_runtime_1.jsx)("span", { className: "logout-text font-neue-montreal-semibold text-b3-grey", children: "Sign out" }), (0, jsx_runtime_1.jsx)("div", { className: "logout-icon-container absolute right-4", children: logoutLoading ? ((0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "logout-loading animate-spin", size: 16 })) : ((0, jsx_runtime_1.jsx)(SignOutIcon_1.SignOutIcon, { size: 16, className: "logout-icon text-b3-grey" })) })] })] }));
199
- };
200
- return ((0, jsx_runtime_1.jsx)("div", { className: "b3-manage-account bg-b3-background flex flex-col rounded-xl", children: (0, jsx_runtime_1.jsx)("div", { className: "flex-1", children: (0, jsx_runtime_1.jsxs)(react_1.TabsPrimitive, { defaultValue: activeTab, onValueChange: value => {
201
- const tab = value;
202
- if (["overview", "tokens", "nfts", "apps", "settings"].includes(tab)) {
203
- setActiveTab?.(tab);
204
- }
205
- }, children: [(0, jsx_runtime_1.jsx)("div", { className: "px-4", children: (0, jsx_runtime_1.jsxs)(react_1.TabsListPrimitive, { className: "grid h-auto grid-cols-2 grid-rows-2 gap-3 rounded-none border-none bg-transparent", children: [(0, jsx_runtime_1.jsxs)(react_1.TabTriggerPrimitive, { value: "overview", className: "data-[state=active]:bg-b3-primary-blue data-[state=active]:hover:bg-b3-primary-blue data-[state=active]:border-b3-primary-blue group flex h-12 w-full items-center justify-center gap-2 rounded-xl border border-gray-200 bg-white p-2 text-center shadow-sm transition-all duration-200 hover:bg-gray-50 hover:shadow-md data-[state=active]:shadow-lg", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.BarChart3, { size: 20, className: "text-b3-primary-blue shrink-0 group-data-[state=active]:text-white" }), (0, jsx_runtime_1.jsx)("span", { className: "text-b3-grey font-neue-montreal-semibold text-sm group-data-[state=active]:text-white", children: "Overview" })] }), (0, jsx_runtime_1.jsxs)(react_1.TabTriggerPrimitive, { value: "tokens", className: "data-[state=active]:bg-b3-primary-blue data-[state=active]:hover:bg-b3-primary-blue data-[state=active]:border-b3-primary-blue group flex h-12 w-full items-center justify-center gap-2 rounded-xl border border-gray-200 bg-white p-2 text-center shadow-sm transition-all duration-200 hover:bg-gray-50 hover:shadow-md data-[state=active]:shadow-lg", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Coins, { size: 20, className: "text-b3-primary-blue shrink-0 group-data-[state=active]:text-white" }), (0, jsx_runtime_1.jsx)("span", { className: "text-b3-grey font-neue-montreal-semibold text-sm group-data-[state=active]:text-white", children: "Tokens" })] }), (0, jsx_runtime_1.jsxs)(react_1.TabTriggerPrimitive, { value: "nfts", className: "data-[state=active]:bg-b3-primary-blue data-[state=active]:hover:bg-b3-primary-blue data-[state=active]:border-b3-primary-blue group flex h-12 w-full items-center justify-center gap-2 rounded-xl border border-gray-200 bg-white p-2 text-center shadow-sm transition-all duration-200 hover:bg-gray-50 hover:shadow-md data-[state=active]:shadow-lg", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Image, { size: 20, className: "text-b3-primary-blue shrink-0 group-data-[state=active]:text-white" }), (0, jsx_runtime_1.jsx)("span", { className: "text-b3-grey font-neue-montreal-semibold text-sm group-data-[state=active]:text-white", children: "NFTs" })] }), (0, jsx_runtime_1.jsxs)(react_1.TabTriggerPrimitive, { value: "settings", className: "data-[state=active]:bg-b3-primary-blue data-[state=active]:hover:bg-b3-primary-blue data-[state=active]:border-b3-primary-blue group flex h-12 w-full items-center justify-center gap-2 rounded-xl border border-gray-200 bg-white p-2 text-center shadow-sm transition-all duration-200 hover:bg-gray-50 hover:shadow-md data-[state=active]:shadow-lg", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Settings, { size: 20, className: "text-b3-primary-blue shrink-0 group-data-[state=active]:text-white" }), (0, jsx_runtime_1.jsx)("span", { className: "text-b3-grey font-neue-montreal-semibold text-sm group-data-[state=active]:text-white", children: "Settings" })] })] }) }), (0, jsx_runtime_1.jsx)(react_1.TabsContentPrimitive, { value: "overview", className: "px-4 pb-4 pt-2", children: (0, jsx_runtime_1.jsx)(BalanceContent_1.BalanceContent, { onLogout: onLogout, showDeposit: showDeposit, showSwap: showSwap }) }), (0, jsx_runtime_1.jsx)(react_1.TabsContentPrimitive, { value: "tokens", className: "px-4 pb-4 pt-2", children: (0, jsx_runtime_1.jsx)(ContentTokens_1.ContentTokens, { activeTab: activeTab }) }), (0, jsx_runtime_1.jsx)(react_1.TabsContentPrimitive, { value: "nfts", className: "px-4 pb-4 pt-2", children: (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-3 gap-4", children: nfts?.nftResponse ? ((0, jsx_runtime_1.jsx)(AccountAssets_1.AccountAssets, { nfts: nfts.nftResponse, isLoading: isLoading })) : ((0, jsx_runtime_1.jsx)("div", { className: "col-span-3 py-12 text-center text-gray-500", children: "No NFTs found" })) }) }), (0, jsx_runtime_1.jsx)(react_1.TabsContentPrimitive, { value: "apps", className: "px-4 pb-4 pt-2", children: (0, jsx_runtime_1.jsx)(AppsContent, {}) }), (0, jsx_runtime_1.jsx)(react_1.TabsContentPrimitive, { value: "settings", className: "px-4 pb-4 pt-2", children: (0, jsx_runtime_1.jsx)(SettingsContent, {}) })] }) }) }));
36
+ }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "p-0", children: [(0, jsx_runtime_1.jsx)(react_1.TabsContentPrimitive, { value: "home", className: "px-0 pb-4 pt-2", children: (0, jsx_runtime_1.jsx)(HomeContent_1.HomeContent, { showDeposit: showDeposit, showSwap: showSwap }) }), (0, jsx_runtime_1.jsx)(react_1.TabsContentPrimitive, { value: "swap", className: "hidden" }), (0, jsx_runtime_1.jsx)(react_1.TabsContentPrimitive, { value: "settings", className: "pb-4 pt-2", children: (0, jsx_runtime_1.jsx)(SettingsContent_1.default, { partnerId: partnerId, onLogout: onLogout, chain: chain }) })] }), (0, jsx_runtime_1.jsx)(BottomNavigation_1.default, {})] }) }));
206
37
  }
@@ -0,0 +1,2 @@
1
+ declare const NFTContent: () => import("react/jsx-runtime").JSX.Element;
2
+ export default NFTContent;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("thirdweb/react");
5
+ const __1 = require("..");
6
+ const hooks_1 = require("../../hooks");
7
+ const NFTContent = () => {
8
+ // Get active wallet state
9
+ const activeWallet = (0, react_1.useActiveWallet)();
10
+ const activeAccount = activeWallet?.getAccount();
11
+ const activeAddress = activeAccount?.address;
12
+ const { data: nfts, isLoading } = (0, hooks_1.useAccountAssets)(activeAddress);
13
+ return ((0, jsx_runtime_1.jsx)("div", { style: { minHeight: "100px" }, children: nfts?.nftResponse ? ((0, jsx_runtime_1.jsx)(__1.AccountAssets, { nfts: nfts.nftResponse, isLoading: isLoading })) : ((0, jsx_runtime_1.jsx)("div", { className: "py-12 text-center text-gray-500", children: "No NFTs found" })) }));
14
+ };
15
+ exports.default = NFTContent;
@@ -0,0 +1,2 @@
1
+ declare const ProfileSection: () => import("react/jsx-runtime").JSX.Element;
2
+ export default ProfileSection;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("../../../../global-account/react");
5
+ const utils_1 = require("../../../../shared/utils");
6
+ const ipfs_1 = require("../../../../shared/utils/ipfs");
7
+ const number_1 = require("../../../../shared/utils/number");
8
+ const lucide_react_1 = require("lucide-react");
9
+ const react_2 = require("react");
10
+ const react_3 = require("thirdweb/react");
11
+ const useFirstEOA_1 = require("../../hooks/useFirstEOA");
12
+ const ProfileSection = () => {
13
+ const account = (0, react_3.useActiveAccount)();
14
+ const { address: eoaAddress } = (0, useFirstEOA_1.useFirstEOA)();
15
+ const { address: smartWalletAddress } = (0, react_1.useAccountWallet)();
16
+ const { data: profile } = (0, react_1.useProfile)({
17
+ address: eoaAddress || account?.address,
18
+ fresh: true,
19
+ });
20
+ const { user } = (0, react_1.useB3)();
21
+ const setB3ModalOpen = (0, react_1.useModalStore)(state => state.setB3ModalOpen);
22
+ const setB3ModalContentType = (0, react_1.useModalStore)(state => state.setB3ModalContentType);
23
+ const navigateBack = (0, react_1.useModalStore)(state => state.navigateBack);
24
+ const { data: simBalance } = (0, react_1.useSimBalance)(smartWalletAddress);
25
+ // Calculate total balance in USD
26
+ const totalBalanceUsd = (0, react_2.useMemo)(() => {
27
+ if (!simBalance?.balances)
28
+ return 0;
29
+ return simBalance.balances.reduce((sum, token) => sum + (token.value_usd || 0), 0);
30
+ }, [simBalance]);
31
+ const avatarUrl = user?.avatar ? (0, ipfs_1.getIpfsUrl)(user?.avatar) : profile?.avatar;
32
+ const handleEditAvatar = () => {
33
+ setB3ModalOpen(true);
34
+ setB3ModalContentType({
35
+ type: "avatarEditor",
36
+ onSuccess: () => {
37
+ // navigate back on success
38
+ navigateBack();
39
+ },
40
+ });
41
+ };
42
+ return ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-between px-5 py-6", children: (0, jsx_runtime_1.jsxs)("div", { className: "global-account-profile flex items-center gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "global-account-profile-avatar relative", children: [avatarUrl ? ((0, jsx_runtime_1.jsx)("img", { src: avatarUrl, alt: "Profile", className: "size-14 rounded-full" })) : ((0, jsx_runtime_1.jsx)("div", { className: "bg-b3-primary-wash size-14 rounded-full" })), (0, jsx_runtime_1.jsx)("button", { onClick: handleEditAvatar, className: "border-b3-background hover:bg-b3-grey/80 absolute -bottom-1 -right-1 flex size-6 items-center justify-center rounded-full border-4 bg-[#a0a0ab] transition-colors", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Pencil, { size: 10, className: "text-b3-background" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "global-account-profile-info flex flex-col gap-1", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "text-b3-grey font-neue-montreal-semibold flex h-[38px] items-center gap-1 text-xl", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-b3-foreground-muted", children: " $" }), (0, jsx_runtime_1.jsx)("div", { className: "text-[30px]", children: (0, number_1.formatDisplayNumber)(totalBalanceUsd, { fractionDigits: 2 }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "font-neue-montreal-semibold text-base leading-none text-[#0B57C2]", children: profile?.displayName || (0, utils_1.formatUsername)(profile?.name || "") })] })] }) }));
43
+ };
44
+ exports.default = ProfileSection;
@@ -0,0 +1,7 @@
1
+ import { Chain } from "thirdweb";
2
+ declare const SettingsContent: ({ partnerId, onLogout, chain, }: {
3
+ partnerId: string;
4
+ onLogout?: () => void;
5
+ chain: Chain;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default SettingsContent;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = require("../../../../global-account/react");
8
+ const LinkIcon_1 = __importDefault(require("../icons/LinkIcon"));
9
+ const ModalHeader_1 = __importDefault(require("../ModalHeader/ModalHeader"));
10
+ const SettingsMenuItem_1 = __importDefault(require("./SettingsMenuItem"));
11
+ const SettingsProfileCard_1 = __importDefault(require("./SettingsProfileCard"));
12
+ const SettingsContent = ({ partnerId, onLogout, chain, }) => {
13
+ const setB3ModalContentType = (0, react_1.useModalStore)(state => state.setB3ModalContentType);
14
+ const setB3ModalOpen = (0, react_1.useModalStore)(state => state.setB3ModalOpen);
15
+ const handleNavigate = (type) => {
16
+ if (type === "home") {
17
+ setB3ModalContentType({
18
+ type: "manageAccount",
19
+ chain,
20
+ partnerId,
21
+ onLogout,
22
+ activeTab: "home",
23
+ });
24
+ }
25
+ else if (type === "swap") {
26
+ setB3ModalContentType({
27
+ type: "manageAccount",
28
+ chain,
29
+ partnerId,
30
+ onLogout,
31
+ activeTab: "tokens",
32
+ });
33
+ }
34
+ else if (type === "linkAccount") {
35
+ setB3ModalContentType({
36
+ type: "linkAccount",
37
+ chain,
38
+ partnerId,
39
+ });
40
+ }
41
+ else {
42
+ setB3ModalContentType({
43
+ type: "avatarEditor",
44
+ });
45
+ }
46
+ setB3ModalOpen(true);
47
+ };
48
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex h-[470px] flex-col", children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.default, { title: "Settings" }), (0, jsx_runtime_1.jsx)("div", { className: "p-5", children: (0, jsx_runtime_1.jsx)("div", { className: "flex items-center rounded-xl border border-[#e4e4e7] bg-[#f4f4f5] p-4", children: (0, jsx_runtime_1.jsx)(SettingsProfileCard_1.default, {}) }) }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-3 px-5", children: (0, jsx_runtime_1.jsx)(SettingsMenuItem_1.default, { icon: (0, jsx_runtime_1.jsx)(LinkIcon_1.default, { className: "text-b3-grey-500" }), title: "Linked Accounts", subtitle: "3 connected accounts", onClick: () => handleNavigate("linkAccount") }) })] }));
49
+ };
50
+ exports.default = SettingsContent;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from "react";
2
+ interface SettingsMenuItemProps {
3
+ icon: ReactNode;
4
+ title: string;
5
+ subtitle: string;
6
+ onClick?: () => void;
7
+ }
8
+ declare const SettingsMenuItem: ({ icon, title, subtitle, onClick }: SettingsMenuItemProps) => import("react/jsx-runtime").JSX.Element;
9
+ export default SettingsMenuItem;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const lucide_react_1 = require("lucide-react");
5
+ const SettingsMenuItem = ({ icon, title, subtitle, onClick }) => {
6
+ return ((0, jsx_runtime_1.jsxs)("button", { onClick: onClick, className: "flex w-full items-center gap-2 rounded-xl px-3 py-2 transition-colors hover:bg-[#f4f4f5]", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex size-10 items-center justify-center rounded-full bg-[#f4f4f5]", children: icon }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-1 flex-col items-start gap-1 text-left", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-neue-montreal-semibold text-[14px] leading-none tracking-[-0.28px] text-[#3f3f46]", children: title }), (0, jsx_runtime_1.jsx)("span", { className: "font-neue-montreal-medium text-[14px] leading-none tracking-[-0.28px] text-[#70707b]", children: subtitle })] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 20, className: "text-[#51525c]" })] }));
7
+ };
8
+ exports.default = SettingsMenuItem;
@@ -0,0 +1,2 @@
1
+ declare const SettingsProfileCard: () => import("react/jsx-runtime").JSX.Element;
2
+ export default SettingsProfileCard;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("../../../../global-account/react");
5
+ const utils_1 = require("../../../../shared/utils");
6
+ const ipfs_1 = require("../../../../shared/utils/ipfs");
7
+ const lucide_react_1 = require("lucide-react");
8
+ const react_2 = require("thirdweb/react");
9
+ const useFirstEOA_1 = require("../../hooks/useFirstEOA");
10
+ const SettingsProfileCard = () => {
11
+ const account = (0, react_2.useActiveAccount)();
12
+ const { address: eoaAddress } = (0, useFirstEOA_1.useFirstEOA)();
13
+ const { data: profile } = (0, react_1.useProfile)({
14
+ address: eoaAddress || account?.address,
15
+ fresh: true,
16
+ });
17
+ const { user } = (0, react_1.useB3)();
18
+ const setB3ModalOpen = (0, react_1.useModalStore)(state => state.setB3ModalOpen);
19
+ const setB3ModalContentType = (0, react_1.useModalStore)(state => state.setB3ModalContentType);
20
+ const navigateBack = (0, react_1.useModalStore)(state => state.navigateBack);
21
+ const avatarUrl = user?.avatar ? (0, ipfs_1.getIpfsUrl)(user?.avatar) : profile?.avatar;
22
+ const handleEditAvatar = () => {
23
+ setB3ModalOpen(true);
24
+ setB3ModalContentType({
25
+ type: "avatarEditor",
26
+ onSuccess: () => {
27
+ // navigate back on success
28
+ navigateBack();
29
+ },
30
+ });
31
+ };
32
+ const handleEditUsername = () => {
33
+ // TODO: Implement edit username functionality
34
+ console.log("Edit username clicked");
35
+ };
36
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex w-full items-center gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative shrink-0", children: [avatarUrl ? ((0, jsx_runtime_1.jsx)("img", { src: avatarUrl, alt: "Profile", className: "border-black/8 size-14 rounded-full border object-cover" })) : ((0, jsx_runtime_1.jsx)("div", { className: "bg-b3-primary-wash border-black/8 size-14 rounded-full border" })), (0, jsx_runtime_1.jsx)("button", { onClick: handleEditAvatar, className: "absolute -bottom-0.5 -right-0.5 flex size-[18px] items-center justify-center rounded-full border-[1.5px] border-white bg-[#a0a0ab] transition-colors hover:bg-[#a0a0ab]/80", "aria-label": "Edit avatar", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Pencil, { size: 10, className: "text-white", strokeWidth: 2.5 }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex shrink-0 flex-col gap-1", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-1", children: (0, jsx_runtime_1.jsx)("p", { className: "font-neue-montreal-semibold text-lg leading-none text-[#0B57C2]", children: profile?.displayName || (0, utils_1.formatUsername)(profile?.name || "") }) }), (0, jsx_runtime_1.jsx)("button", { onClick: handleEditUsername, className: "flex items-center justify-center gap-1 text-left transition-opacity hover:opacity-80", children: (0, jsx_runtime_1.jsx)("p", { className: "font-inter text-sm font-semibold leading-5 text-[#51525C]", children: "Edit Username" }) })] })] }));
37
+ };
38
+ exports.default = SettingsProfileCard;
@@ -0,0 +1,2 @@
1
+ declare const TokenContent: () => import("react/jsx-runtime").JSX.Element;
2
+ export default TokenContent;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("../../../../global-account/react");
5
+ const react_2 = require("thirdweb/react");
6
+ const TokenIcon_1 = require("../TokenIcon");
7
+ const TokenBalanceRow_1 = require("./TokenBalanceRow");
8
+ const TokenContent = () => {
9
+ // Get active wallet state
10
+ const activeWallet = (0, react_2.useActiveWallet)();
11
+ //const globalAccountWallet = useGlobalWalletState(state => state.globalAccountWallet);
12
+ const activeAccount = activeWallet?.getAccount();
13
+ const activeAddress = activeAccount?.address;
14
+ // Balance data fetching - use active wallet address
15
+ const { data: activeNativeBalance } = (0, react_1.useNativeBalance)(activeAddress);
16
+ const { data: activeB3Balance } = (0, react_1.useB3BalanceFromAddresses)(activeAddress);
17
+ if (!activeAddress) {
18
+ return (0, jsx_runtime_1.jsx)("div", { className: "col-span-3 py-12 text-center text-gray-500", children: "No tokens found" });
19
+ }
20
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-3", children: [(0, jsx_runtime_1.jsx)(TokenBalanceRow_1.TokenBalanceRow, { icon: (0, jsx_runtime_1.jsx)(TokenIcon_1.B3TokenIcon, { className: "size-10" }), name: "B3", balance: `${activeB3Balance?.formattedTotal || "0.00"} B3`, usdValue: activeB3Balance?.balanceUsdFormatted || "0.00", priceChange: activeB3Balance?.priceChange24h }), (0, jsx_runtime_1.jsx)(TokenBalanceRow_1.TokenBalanceRow, { icon: (0, jsx_runtime_1.jsx)(TokenIcon_1.EthereumTokenIcon, { className: "size-10" }), name: "Ethereum", balance: `${activeNativeBalance?.formattedTotal || "0.00"} ETH`, usdValue: activeNativeBalance?.formattedTotalUsd || "0.00", priceChange: activeNativeBalance?.priceChange24h })] }));
21
+ };
22
+ exports.default = TokenContent;
@@ -0,0 +1,10 @@
1
+ declare const ModalHeader: ({ handleBack, handleClose, title, children, showCloseButton, className, showBackWord, }: {
2
+ handleBack?: () => void;
3
+ handleClose?: () => void;
4
+ title: string;
5
+ children?: React.ReactNode;
6
+ showCloseButton?: boolean;
7
+ className?: string;
8
+ showBackWord?: boolean;
9
+ }) => import("react/jsx-runtime").JSX.Element;
10
+ export default ModalHeader;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const utils_1 = require("../../../../shared/utils");
5
+ const lucide_react_1 = require("lucide-react");
6
+ const stores_1 = require("../../stores");
7
+ const ModalHeader = ({ handleBack, handleClose, title, children, showCloseButton = true, className, showBackWord = false, }) => {
8
+ const navigateBack = (0, stores_1.useModalStore)(state => state.navigateBack);
9
+ const setB3ModalOpen = (0, stores_1.useModalStore)(state => state.setB3ModalOpen);
10
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("flex h-16 items-center justify-between border-b border-[#e4e4e7] bg-white px-5 py-3", className), children: [(0, jsx_runtime_1.jsxs)("button", { onClick: handleBack || navigateBack, className: "flex h-6 w-6 items-center justify-center transition-opacity hover:opacity-70", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "h-6 w-6 rotate-90 text-[#51525c]" }), showBackWord && (0, jsx_runtime_1.jsx)("span", { className: "text-sm font-medium", children: "Back" })] }), (0, jsx_runtime_1.jsx)("p", { className: "font-inter text-lg font-semibold leading-7 text-[#18181b]", children: title }), showCloseButton && ((0, jsx_runtime_1.jsx)("button", { onClick: handleClose || (() => setB3ModalOpen(false)), className: "flex h-6 w-6 items-center justify-center transition-opacity hover:opacity-70", children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "h-6 w-6 text-[#51525c]" }) })), children] }));
11
+ };
12
+ exports.default = ModalHeader;
@@ -0,0 +1,5 @@
1
+ export interface SendModalProps {
2
+ recipientAddress?: string;
3
+ onSuccess?: (txHash?: string) => void;
4
+ }
5
+ export declare function Send({ recipientAddress: initialRecipient, onSuccess }: SendModalProps): import("react/jsx-runtime").JSX.Element;