@b3dotfun/sdk 0.0.65-test.5 → 0.0.66
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.
- package/dist/cjs/anyspend/react/components/AnySpend.js +69 -97
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +23 -10
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +45 -14
- package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.d.ts +11 -0
- package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.js +41 -0
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +14 -251
- package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.d.ts +6 -0
- package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +3 -5
- package/dist/cjs/anyspend/react/components/common/FeeDetailPanel.js +1 -1
- package/dist/cjs/anyspend/react/components/common/FiatPaymentMethod.js +2 -2
- package/dist/cjs/anyspend/react/components/common/OrderHistory.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderHistory.js +3 -7
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.js +2 -10
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +1 -1
- package/dist/cjs/anyspend/react/components/common/PointsDetailPanel.js +1 -1
- package/dist/cjs/anyspend/react/components/common/RecipientSelection.js +1 -1
- package/dist/cjs/anyspend/react/components/index.d.ts +1 -0
- package/dist/cjs/anyspend/react/components/index.js +4 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +5 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +16 -10
- package/dist/cjs/anyspend/react/hooks/useAutoSelectCryptoPaymentMethod.d.ts +7 -5
- package/dist/cjs/anyspend/react/hooks/useAutoSelectCryptoPaymentMethod.js +13 -9
- package/dist/cjs/anyspend/react/hooks/useCryptoPaymentMethodState.d.ts +42 -0
- package/dist/cjs/anyspend/react/hooks/useCryptoPaymentMethodState.js +51 -0
- package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +1 -1
- package/dist/cjs/global-account/react/components/AccountAssets/AccountAssets.js +2 -38
- package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.d.ts +0 -1
- package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.js +35 -251
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +15 -23
- package/dist/cjs/global-account/react/components/LinkAccount/LinkAccount.d.ts +4 -6
- package/dist/cjs/global-account/react/components/LinkAccount/LinkAccount.js +279 -113
- package/dist/cjs/global-account/react/components/ManageAccount/BalanceContent.js +5 -6
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +193 -24
- package/dist/cjs/global-account/react/components/ProfileEditor/ProfileEditor.d.ts +6 -0
- package/dist/cjs/global-account/react/components/ProfileEditor/ProfileEditor.js +141 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +1 -3
- package/dist/cjs/global-account/react/components/index.d.ts +4 -5
- package/dist/cjs/global-account/react/components/index.js +9 -14
- package/dist/cjs/global-account/react/components/ui/Tabs.js +2 -2
- package/dist/cjs/global-account/react/components/ui/dialog.js +2 -2
- package/dist/cjs/global-account/react/components/ui/drawer.js +1 -1
- package/dist/cjs/global-account/react/hooks/index.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/index.js +1 -3
- package/dist/cjs/global-account/react/hooks/useAccountWallet.d.ts +0 -1
- package/dist/cjs/global-account/react/hooks/useAccountWallet.js +0 -18
- package/dist/cjs/global-account/react/hooks/useAuthentication.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.js +0 -1
- package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +6 -14
- package/dist/cjs/global-account/react/hooks/useUserQuery.d.ts +2 -2
- package/dist/cjs/global-account/react/stores/index.d.ts +0 -1
- package/dist/cjs/global-account/react/stores/index.js +1 -3
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +26 -31
- package/dist/cjs/global-account/react/utils/profileDisplay.d.ts +0 -2
- package/dist/cjs/global-account/react/utils/profileDisplay.js +2 -2
- package/dist/cjs/shared/constants/chains/supported.d.ts +3 -3
- package/dist/cjs/shared/utils/ipfs.js +3 -10
- package/dist/esm/anyspend/react/components/AnySpend.js +70 -98
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +23 -10
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +3 -1
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +45 -14
- package/dist/esm/anyspend/react/components/AnySpendDepositUpside.d.ts +11 -0
- package/dist/esm/anyspend/react/components/AnySpendDepositUpside.js +38 -0
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +15 -249
- package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.d.ts +6 -0
- package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +3 -5
- package/dist/esm/anyspend/react/components/common/FeeDetailPanel.js +1 -1
- package/dist/esm/anyspend/react/components/common/FiatPaymentMethod.js +2 -2
- package/dist/esm/anyspend/react/components/common/OrderHistory.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/OrderHistory.js +5 -6
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.js +2 -10
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +1 -1
- package/dist/esm/anyspend/react/components/common/PointsDetailPanel.js +1 -1
- package/dist/esm/anyspend/react/components/common/RecipientSelection.js +1 -1
- package/dist/esm/anyspend/react/components/index.d.ts +1 -0
- package/dist/esm/anyspend/react/components/index.js +1 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +5 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +16 -10
- package/dist/esm/anyspend/react/hooks/useAutoSelectCryptoPaymentMethod.d.ts +7 -5
- package/dist/esm/anyspend/react/hooks/useAutoSelectCryptoPaymentMethod.js +13 -9
- package/dist/esm/anyspend/react/hooks/useCryptoPaymentMethodState.d.ts +42 -0
- package/dist/esm/anyspend/react/hooks/useCryptoPaymentMethodState.js +48 -0
- package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +1 -1
- package/dist/esm/global-account/react/components/AccountAssets/AccountAssets.js +2 -38
- package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.d.ts +0 -1
- package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.js +38 -254
- package/dist/esm/global-account/react/components/B3DynamicModal.js +15 -23
- package/dist/esm/global-account/react/components/LinkAccount/LinkAccount.d.ts +4 -6
- package/dist/esm/global-account/react/components/LinkAccount/LinkAccount.js +280 -113
- package/dist/esm/global-account/react/components/ManageAccount/BalanceContent.js +5 -6
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +195 -26
- package/dist/esm/global-account/react/components/ProfileEditor/ProfileEditor.d.ts +6 -0
- package/dist/esm/global-account/react/components/ProfileEditor/ProfileEditor.js +135 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +2 -4
- package/dist/esm/global-account/react/components/index.d.ts +4 -5
- package/dist/esm/global-account/react/components/index.js +5 -9
- package/dist/esm/global-account/react/components/ui/Tabs.js +2 -2
- package/dist/esm/global-account/react/components/ui/dialog.js +2 -2
- package/dist/esm/global-account/react/components/ui/drawer.js +1 -1
- package/dist/esm/global-account/react/hooks/index.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/index.js +1 -1
- package/dist/esm/global-account/react/hooks/useAccountWallet.d.ts +0 -1
- package/dist/esm/global-account/react/hooks/useAccountWallet.js +0 -17
- package/dist/esm/global-account/react/hooks/useAuthentication.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.js +0 -1
- package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +6 -14
- package/dist/esm/global-account/react/hooks/useUserQuery.d.ts +2 -2
- package/dist/esm/global-account/react/stores/index.d.ts +0 -1
- package/dist/esm/global-account/react/stores/index.js +0 -1
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +26 -31
- package/dist/esm/global-account/react/utils/profileDisplay.d.ts +0 -2
- package/dist/esm/global-account/react/utils/profileDisplay.js +2 -2
- package/dist/esm/shared/constants/chains/supported.d.ts +3 -3
- package/dist/esm/shared/utils/ipfs.js +3 -10
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +3 -1
- package/dist/types/anyspend/react/components/AnySpendDepositUpside.d.ts +11 -0
- package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/CryptoPaymentMethod.d.ts +6 -0
- package/dist/types/anyspend/react/components/common/OrderHistory.d.ts +1 -1
- package/dist/types/anyspend/react/components/index.d.ts +1 -0
- package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +5 -1
- package/dist/types/anyspend/react/hooks/useAutoSelectCryptoPaymentMethod.d.ts +7 -5
- package/dist/types/anyspend/react/hooks/useCryptoPaymentMethodState.d.ts +42 -0
- package/dist/types/anyspend/react/hooks/useSigMint.d.ts +1 -1
- package/dist/types/global-account/react/components/AvatarEditor/AvatarEditor.d.ts +0 -1
- package/dist/types/global-account/react/components/LinkAccount/LinkAccount.d.ts +4 -6
- package/dist/types/global-account/react/components/ProfileEditor/ProfileEditor.d.ts +6 -0
- package/dist/types/global-account/react/components/index.d.ts +4 -5
- package/dist/types/global-account/react/hooks/index.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useAccountWallet.d.ts +0 -1
- package/dist/types/global-account/react/hooks/useAuthentication.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useUserQuery.d.ts +2 -2
- package/dist/types/global-account/react/stores/index.d.ts +0 -1
- package/dist/types/global-account/react/stores/useModalStore.d.ts +26 -31
- package/dist/types/global-account/react/utils/profileDisplay.d.ts +0 -2
- package/dist/types/shared/constants/chains/supported.d.ts +3 -3
- package/package.json +1 -2
- package/src/anyspend/react/components/AnySpend.tsx +218 -256
- package/src/anyspend/react/components/AnySpendCustom.tsx +31 -16
- package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +56 -13
- package/src/anyspend/react/components/AnySpendDepositUpside.tsx +81 -0
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +36 -524
- package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +14 -7
- package/src/anyspend/react/components/common/FeeDetailPanel.tsx +1 -1
- package/src/anyspend/react/components/common/FiatPaymentMethod.tsx +2 -2
- package/src/anyspend/react/components/common/OrderHistory.tsx +13 -8
- package/src/anyspend/react/components/common/OrderTokenAmount.tsx +2 -13
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +1 -1
- package/src/anyspend/react/components/common/PointsDetailPanel.tsx +1 -1
- package/src/anyspend/react/components/common/RecipientSelection.tsx +1 -1
- package/src/anyspend/react/components/index.ts +1 -0
- package/src/anyspend/react/hooks/useAnyspendFlow.ts +24 -12
- package/src/anyspend/react/hooks/useAutoSelectCryptoPaymentMethod.ts +20 -12
- package/src/anyspend/react/hooks/useCryptoPaymentMethodState.ts +71 -0
- package/src/global-account/react/components/AccountAssets/AccountAssets.tsx +25 -115
- package/src/global-account/react/components/AvatarEditor/AvatarEditor.tsx +128 -477
- package/src/global-account/react/components/B3DynamicModal.tsx +17 -28
- package/src/global-account/react/components/LinkAccount/LinkAccount.tsx +433 -332
- package/src/global-account/react/components/ManageAccount/BalanceContent.tsx +10 -6
- package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +589 -73
- package/src/global-account/react/components/ProfileEditor/ProfileEditor.tsx +265 -0
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +7 -11
- package/src/global-account/react/components/index.ts +5 -11
- package/src/global-account/react/components/ui/Tabs.tsx +13 -5
- package/src/global-account/react/components/ui/dialog.tsx +14 -32
- package/src/global-account/react/components/ui/drawer.tsx +1 -1
- package/src/global-account/react/hooks/index.ts +0 -3
- package/src/global-account/react/hooks/useAccountWallet.tsx +0 -26
- package/src/global-account/react/hooks/useB3BalanceFromAddresses.ts +0 -1
- package/src/global-account/react/hooks/useUnifiedChainSwitchAndExecute.ts +6 -12
- package/src/global-account/react/stores/index.ts +0 -1
- package/src/global-account/react/stores/useModalStore.ts +28 -35
- package/src/global-account/react/utils/profileDisplay.ts +2 -4
- package/src/shared/utils/ipfs.ts +3 -10
- package/src/styles/index.css +9 -6
- package/dist/cjs/global-account/react/components/Deposit/Deposit.d.ts +0 -1
- package/dist/cjs/global-account/react/components/Deposit/Deposit.js +0 -65
- package/dist/cjs/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +0 -39
- package/dist/cjs/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.js +0 -37
- package/dist/cjs/global-account/react/components/LinkAccount/LinkNewAccount.d.ts +0 -4
- package/dist/cjs/global-account/react/components/LinkAccount/LinkNewAccount.js +0 -331
- package/dist/cjs/global-account/react/components/ManageAccount/AppsContent.d.ts +0 -6
- package/dist/cjs/global-account/react/components/ManageAccount/AppsContent.js +0 -34
- package/dist/cjs/global-account/react/components/ManageAccount/BottomNavigation.d.ts +0 -2
- package/dist/cjs/global-account/react/components/ManageAccount/BottomNavigation.js +0 -23
- package/dist/cjs/global-account/react/components/ManageAccount/Header.d.ts +0 -3
- package/dist/cjs/global-account/react/components/ManageAccount/Header.js +0 -120
- package/dist/cjs/global-account/react/components/ManageAccount/HomeActions.d.ts +0 -5
- package/dist/cjs/global-account/react/components/ManageAccount/HomeActions.js +0 -43
- package/dist/cjs/global-account/react/components/ManageAccount/HomeContent.d.ts +0 -6
- package/dist/cjs/global-account/react/components/ManageAccount/HomeContent.js +0 -16
- package/dist/cjs/global-account/react/components/ManageAccount/NFTContent.d.ts +0 -2
- package/dist/cjs/global-account/react/components/ManageAccount/NFTContent.js +0 -15
- package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.d.ts +0 -2
- package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +0 -47
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsContent.d.ts +0 -7
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsContent.js +0 -50
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsMenuItem.d.ts +0 -9
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsMenuItem.js +0 -8
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.d.ts +0 -2
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.js +0 -106
- package/dist/cjs/global-account/react/components/ManageAccount/TokenContent.d.ts +0 -2
- package/dist/cjs/global-account/react/components/ManageAccount/TokenContent.js +0 -22
- package/dist/cjs/global-account/react/components/ModalHeader/ModalHeader.d.ts +0 -11
- package/dist/cjs/global-account/react/components/ModalHeader/ModalHeader.js +0 -12
- package/dist/cjs/global-account/react/components/Send/Send.d.ts +0 -5
- package/dist/cjs/global-account/react/components/Send/Send.js +0 -187
- package/dist/cjs/global-account/react/components/icons/BellIcon.d.ts +0 -3
- package/dist/cjs/global-account/react/components/icons/BellIcon.js +0 -5
- package/dist/cjs/global-account/react/components/icons/ChevronDownIcon.d.ts +0 -2
- package/dist/cjs/global-account/react/components/icons/ChevronDownIcon.js +0 -7
- package/dist/cjs/global-account/react/components/icons/CopyIcon.d.ts +0 -2
- package/dist/cjs/global-account/react/components/icons/CopyIcon.js +0 -7
- package/dist/cjs/global-account/react/components/icons/LinkIcon.d.ts +0 -3
- package/dist/cjs/global-account/react/components/icons/LinkIcon.js +0 -5
- package/dist/cjs/global-account/react/components/icons/LockIcon.d.ts +0 -3
- package/dist/cjs/global-account/react/components/icons/LockIcon.js +0 -5
- package/dist/cjs/global-account/react/components/icons/WalletIcon.d.ts +0 -2
- package/dist/cjs/global-account/react/components/icons/WalletIcon.js +0 -7
- package/dist/cjs/global-account/react/stores/useRecentAddressesStore.d.ts +0 -25
- package/dist/cjs/global-account/react/stores/useRecentAddressesStore.js +0 -36
- package/dist/esm/global-account/react/components/Deposit/Deposit.d.ts +0 -1
- package/dist/esm/global-account/react/components/Deposit/Deposit.js +0 -59
- package/dist/esm/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +0 -39
- package/dist/esm/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.js +0 -34
- package/dist/esm/global-account/react/components/LinkAccount/LinkNewAccount.d.ts +0 -4
- package/dist/esm/global-account/react/components/LinkAccount/LinkNewAccount.js +0 -325
- package/dist/esm/global-account/react/components/ManageAccount/AppsContent.d.ts +0 -6
- package/dist/esm/global-account/react/components/ManageAccount/AppsContent.js +0 -32
- package/dist/esm/global-account/react/components/ManageAccount/BottomNavigation.d.ts +0 -2
- package/dist/esm/global-account/react/components/ManageAccount/BottomNavigation.js +0 -21
- package/dist/esm/global-account/react/components/ManageAccount/Header.d.ts +0 -3
- package/dist/esm/global-account/react/components/ManageAccount/Header.js +0 -81
- package/dist/esm/global-account/react/components/ManageAccount/HomeActions.d.ts +0 -5
- package/dist/esm/global-account/react/components/ManageAccount/HomeActions.js +0 -41
- package/dist/esm/global-account/react/components/ManageAccount/HomeContent.d.ts +0 -6
- package/dist/esm/global-account/react/components/ManageAccount/HomeContent.js +0 -10
- package/dist/esm/global-account/react/components/ManageAccount/NFTContent.d.ts +0 -2
- package/dist/esm/global-account/react/components/ManageAccount/NFTContent.js +0 -13
- package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.d.ts +0 -2
- package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +0 -45
- package/dist/esm/global-account/react/components/ManageAccount/SettingsContent.d.ts +0 -7
- package/dist/esm/global-account/react/components/ManageAccount/SettingsContent.js +0 -45
- package/dist/esm/global-account/react/components/ManageAccount/SettingsMenuItem.d.ts +0 -9
- package/dist/esm/global-account/react/components/ManageAccount/SettingsMenuItem.js +0 -6
- package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.d.ts +0 -2
- package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.js +0 -101
- package/dist/esm/global-account/react/components/ManageAccount/TokenContent.d.ts +0 -2
- package/dist/esm/global-account/react/components/ManageAccount/TokenContent.js +0 -20
- package/dist/esm/global-account/react/components/ModalHeader/ModalHeader.d.ts +0 -11
- package/dist/esm/global-account/react/components/ModalHeader/ModalHeader.js +0 -10
- package/dist/esm/global-account/react/components/Send/Send.d.ts +0 -5
- package/dist/esm/global-account/react/components/Send/Send.js +0 -181
- package/dist/esm/global-account/react/components/icons/BellIcon.d.ts +0 -3
- package/dist/esm/global-account/react/components/icons/BellIcon.js +0 -3
- package/dist/esm/global-account/react/components/icons/ChevronDownIcon.d.ts +0 -2
- package/dist/esm/global-account/react/components/icons/ChevronDownIcon.js +0 -4
- package/dist/esm/global-account/react/components/icons/CopyIcon.d.ts +0 -2
- package/dist/esm/global-account/react/components/icons/CopyIcon.js +0 -4
- package/dist/esm/global-account/react/components/icons/LinkIcon.d.ts +0 -3
- package/dist/esm/global-account/react/components/icons/LinkIcon.js +0 -3
- package/dist/esm/global-account/react/components/icons/LockIcon.d.ts +0 -3
- package/dist/esm/global-account/react/components/icons/LockIcon.js +0 -3
- package/dist/esm/global-account/react/components/icons/WalletIcon.d.ts +0 -2
- package/dist/esm/global-account/react/components/icons/WalletIcon.js +0 -4
- package/dist/esm/global-account/react/stores/useRecentAddressesStore.d.ts +0 -25
- package/dist/esm/global-account/react/stores/useRecentAddressesStore.js +0 -33
- package/dist/types/global-account/react/components/Deposit/Deposit.d.ts +0 -1
- package/dist/types/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +0 -39
- package/dist/types/global-account/react/components/LinkAccount/LinkNewAccount.d.ts +0 -4
- package/dist/types/global-account/react/components/ManageAccount/AppsContent.d.ts +0 -6
- package/dist/types/global-account/react/components/ManageAccount/BottomNavigation.d.ts +0 -2
- package/dist/types/global-account/react/components/ManageAccount/Header.d.ts +0 -3
- package/dist/types/global-account/react/components/ManageAccount/HomeActions.d.ts +0 -5
- package/dist/types/global-account/react/components/ManageAccount/HomeContent.d.ts +0 -6
- package/dist/types/global-account/react/components/ManageAccount/NFTContent.d.ts +0 -2
- package/dist/types/global-account/react/components/ManageAccount/ProfileSection.d.ts +0 -2
- package/dist/types/global-account/react/components/ManageAccount/SettingsContent.d.ts +0 -7
- package/dist/types/global-account/react/components/ManageAccount/SettingsMenuItem.d.ts +0 -9
- package/dist/types/global-account/react/components/ManageAccount/SettingsProfileCard.d.ts +0 -2
- package/dist/types/global-account/react/components/ManageAccount/TokenContent.d.ts +0 -2
- package/dist/types/global-account/react/components/ModalHeader/ModalHeader.d.ts +0 -11
- package/dist/types/global-account/react/components/Send/Send.d.ts +0 -5
- package/dist/types/global-account/react/components/icons/BellIcon.d.ts +0 -3
- package/dist/types/global-account/react/components/icons/ChevronDownIcon.d.ts +0 -2
- package/dist/types/global-account/react/components/icons/CopyIcon.d.ts +0 -2
- package/dist/types/global-account/react/components/icons/LinkIcon.d.ts +0 -3
- package/dist/types/global-account/react/components/icons/LockIcon.d.ts +0 -3
- package/dist/types/global-account/react/components/icons/WalletIcon.d.ts +0 -2
- package/dist/types/global-account/react/stores/useRecentAddressesStore.d.ts +0 -25
- package/src/global-account/react/components/Deposit/Deposit.tsx +0 -211
- package/src/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.tsx +0 -84
- package/src/global-account/react/components/LinkAccount/LinkNewAccount.tsx +0 -490
- package/src/global-account/react/components/ManageAccount/AppsContent.tsx +0 -79
- package/src/global-account/react/components/ManageAccount/BottomNavigation.tsx +0 -83
- package/src/global-account/react/components/ManageAccount/Header.tsx +0 -230
- package/src/global-account/react/components/ManageAccount/HomeActions.tsx +0 -118
- package/src/global-account/react/components/ManageAccount/HomeContent.tsx +0 -42
- package/src/global-account/react/components/ManageAccount/NFTContent.tsx +0 -24
- package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +0 -79
- package/src/global-account/react/components/ManageAccount/SettingsContent.tsx +0 -87
- package/src/global-account/react/components/ManageAccount/SettingsMenuItem.tsx +0 -31
- package/src/global-account/react/components/ManageAccount/SettingsProfileCard.tsx +0 -182
- package/src/global-account/react/components/ManageAccount/TokenContent.tsx +0 -41
- package/src/global-account/react/components/ModalHeader/ModalHeader.tsx +0 -61
- package/src/global-account/react/components/Send/Send.tsx +0 -585
- package/src/global-account/react/components/icons/BellIcon.tsx +0 -15
- package/src/global-account/react/components/icons/ChevronDownIcon.tsx +0 -17
- package/src/global-account/react/components/icons/CopyIcon.tsx +0 -22
- package/src/global-account/react/components/icons/LinkIcon.tsx +0 -15
- package/src/global-account/react/components/icons/LockIcon.tsx +0 -15
- package/src/global-account/react/components/icons/WalletIcon.tsx +0 -21
- package/src/global-account/react/stores/useRecentAddressesStore.ts +0 -55
|
@@ -1,56 +1,57 @@
|
|
|
1
|
+
import app from "@b3dotfun/sdk/global-account/app";
|
|
1
2
|
import {
|
|
3
|
+
Button,
|
|
2
4
|
ManageAccountModalProps,
|
|
3
5
|
TabsContentPrimitive,
|
|
6
|
+
TabsListPrimitive,
|
|
4
7
|
TabsPrimitive,
|
|
8
|
+
TabTriggerPrimitive,
|
|
9
|
+
TWSignerWithMetadata,
|
|
10
|
+
useAccountAssets,
|
|
11
|
+
useAuthentication,
|
|
12
|
+
useB3,
|
|
13
|
+
useGetAllTWSigners,
|
|
5
14
|
useModalStore,
|
|
15
|
+
useQueryB3,
|
|
16
|
+
useRemoveSessionKey,
|
|
6
17
|
} from "@b3dotfun/sdk/global-account/react";
|
|
18
|
+
import { SignOutIcon } from "@b3dotfun/sdk/global-account/react/components/icons/SignOutIcon";
|
|
19
|
+
import { formatNumber } from "@b3dotfun/sdk/shared/utils/formatNumber";
|
|
20
|
+
import { client } from "@b3dotfun/sdk/shared/utils/thirdweb";
|
|
21
|
+
import { truncateAddress } from "@b3dotfun/sdk/shared/utils/truncateAddress";
|
|
22
|
+
import { BarChart3, Coins, Copy, Image, LinkIcon, Loader2, Pencil, Settings, UnlinkIcon } from "lucide-react";
|
|
23
|
+
import { useRef, useState } from "react";
|
|
24
|
+
import { toast } from "sonner";
|
|
7
25
|
import { Chain } from "thirdweb";
|
|
26
|
+
import { useActiveAccount, useProfiles, useUnlinkProfile } from "thirdweb/react";
|
|
27
|
+
import { formatUnits } from "viem";
|
|
8
28
|
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
29
|
+
import { getProfileDisplayInfo } from "../../utils/profileDisplay";
|
|
30
|
+
import { AccountAssets } from "../AccountAssets/AccountAssets";
|
|
31
|
+
import { ContentTokens } from "./ContentTokens";
|
|
12
32
|
|
|
13
|
-
|
|
33
|
+
// Helper function to check if a string is a wallet address and format it
|
|
34
|
+
const formatProfileTitle = (title: string): { displayTitle: string; isAddress: boolean } => {
|
|
35
|
+
// Check if title looks like an Ethereum address (0x followed by 40 hex characters)
|
|
36
|
+
const isEthereumAddress = /^0x[a-fA-F0-9]{40}$/.test(title);
|
|
14
37
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
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"
|
|
22
|
-
fill="currentColor"
|
|
23
|
-
/>
|
|
24
|
-
</svg>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
38
|
+
if (isEthereumAddress) {
|
|
39
|
+
return {
|
|
40
|
+
displayTitle: truncateAddress(title),
|
|
41
|
+
isAddress: true,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
27
44
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
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"
|
|
33
|
-
stroke="currentColor"
|
|
34
|
-
stroke-width="2"
|
|
35
|
-
stroke-linecap="round"
|
|
36
|
-
stroke-linejoin="round"
|
|
37
|
-
/>
|
|
38
|
-
</svg>
|
|
39
|
-
);
|
|
45
|
+
return {
|
|
46
|
+
displayTitle: title,
|
|
47
|
+
isAddress: false,
|
|
48
|
+
};
|
|
40
49
|
};
|
|
41
50
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
fill-rule="evenodd"
|
|
47
|
-
clip-rule="evenodd"
|
|
48
|
-
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"
|
|
49
|
-
fill="currentColor"
|
|
50
|
-
/>
|
|
51
|
-
</svg>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
51
|
+
import { Referrals, Users } from "@b3dotfun/b3-api";
|
|
52
|
+
import { BalanceContent } from "./BalanceContent";
|
|
53
|
+
|
|
54
|
+
type TabValue = "overview" | "tokens" | "nfts" | "apps" | "settings";
|
|
54
55
|
|
|
55
56
|
interface ManageAccountProps {
|
|
56
57
|
onLogout?: () => void;
|
|
@@ -73,47 +74,562 @@ export function ManageAccount({
|
|
|
73
74
|
showSwap,
|
|
74
75
|
showDeposit,
|
|
75
76
|
}: ManageAccountProps) {
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
const
|
|
77
|
+
const [revokingSignerId, setRevokingSignerId] = useState<string | null>(null);
|
|
78
|
+
const account = useActiveAccount();
|
|
79
|
+
const { data: nfts, isLoading } = useAccountAssets(account?.address);
|
|
80
|
+
|
|
81
|
+
const { data: signers, refetch: refetchSigners } = useGetAllTWSigners({
|
|
82
|
+
chain,
|
|
83
|
+
accountAddress: account?.address,
|
|
84
|
+
});
|
|
85
|
+
const { setB3ModalOpen, contentType } = useModalStore();
|
|
86
|
+
const { activeTab = "overview", setActiveTab } = contentType as ManageAccountModalProps;
|
|
87
|
+
const { logout } = useAuthentication(partnerId);
|
|
88
|
+
const [logoutLoading, setLogoutLoading] = useState(false);
|
|
89
|
+
|
|
90
|
+
const { removeSessionKey } = useRemoveSessionKey({
|
|
91
|
+
chain,
|
|
92
|
+
onSuccess: tx => {
|
|
93
|
+
console.log("@@removeSessionKey:tx", tx);
|
|
94
|
+
setRevokingSignerId(null);
|
|
95
|
+
},
|
|
96
|
+
onError: error => {
|
|
97
|
+
console.error("Error revoking access:", error);
|
|
98
|
+
setRevokingSignerId(null);
|
|
99
|
+
},
|
|
100
|
+
refetchSigners: () => refetchSigners(),
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
const handleRevoke = async (signer: TWSignerWithMetadata) => {
|
|
104
|
+
setRevokingSignerId(signer.id);
|
|
105
|
+
await removeSessionKey(signer);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const onLogoutEnhanced = async () => {
|
|
109
|
+
setLogoutLoading(true);
|
|
110
|
+
await logout();
|
|
111
|
+
onLogout?.();
|
|
112
|
+
setB3ModalOpen(false);
|
|
113
|
+
setLogoutLoading(false);
|
|
114
|
+
};
|
|
115
|
+
const AppsContent = () => (
|
|
116
|
+
<div className="space-y-4">
|
|
117
|
+
{signers?.map((signer: TWSignerWithMetadata) => (
|
|
118
|
+
<div key={signer.id} className="rounded-xl border border-gray-200 p-4 dark:border-gray-800">
|
|
119
|
+
<div className="flex items-start justify-between">
|
|
120
|
+
<div className="flex items-start gap-4">
|
|
121
|
+
<div className="flex h-10 w-10 items-center justify-center rounded-full bg-gray-100 dark:bg-gray-800">
|
|
122
|
+
<span className="text-xs font-medium text-gray-600 dark:text-gray-400">App</span>
|
|
123
|
+
</div>
|
|
124
|
+
<div>
|
|
125
|
+
<h3 className="font-medium text-gray-900 dark:text-white">{signer.partner.name}</h3>
|
|
126
|
+
<div className="mt-2 space-y-1">
|
|
127
|
+
<p className="text-xs text-gray-500">Added {new Date(signer.createdAt).toLocaleDateString()}</p>
|
|
128
|
+
<p className="text-xs text-gray-500">
|
|
129
|
+
Expires {new Date(Number(signer.endTimestamp) * 1000).toLocaleDateString()}
|
|
130
|
+
</p>
|
|
131
|
+
<p className="text-xs text-gray-500">
|
|
132
|
+
Max spend: {formatNumber(Number(formatUnits(signer.nativeTokenLimitPerTransaction, 18)))} ETH
|
|
133
|
+
</p>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
<Button
|
|
138
|
+
variant="outline"
|
|
139
|
+
size="sm"
|
|
140
|
+
className="border-red-200 text-red-500 hover:border-red-300 hover:text-red-600"
|
|
141
|
+
onClick={() => handleRevoke(signer)}
|
|
142
|
+
disabled={revokingSignerId === signer.id}
|
|
143
|
+
>
|
|
144
|
+
{revokingSignerId === signer.id ? "Revoking..." : "Revoke"}
|
|
145
|
+
</Button>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
))}
|
|
149
|
+
|
|
150
|
+
{!signers?.length && <div className="py-12 text-center text-gray-500">No connected apps</div>}
|
|
151
|
+
</div>
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
const SettingsContent = () => {
|
|
155
|
+
const [unlinkingAccountId, setUnlinkingAccountId] = useState<string | null>(null);
|
|
156
|
+
const { data: profilesRaw = [], isLoading: isLoadingProfiles } = useProfiles({ client });
|
|
157
|
+
const { mutate: unlinkProfile, isPending: isUnlinking } = useUnlinkProfile();
|
|
158
|
+
const { setB3ModalOpen, setB3ModalContentType, isLinking, contentType } = useModalStore();
|
|
159
|
+
const { user, setUser } = useB3();
|
|
160
|
+
const [isUpdatingCode, setIsUpdatingCode] = useState(false);
|
|
161
|
+
const [newReferralCode, setNewReferralCode] = useState("");
|
|
162
|
+
const [isEditingCode, setIsEditingCode] = useState(false);
|
|
163
|
+
const referallCodeRef = useRef<HTMLInputElement>(null);
|
|
164
|
+
const { data: referrals, isLoading: isLoadingReferrals } = useQueryB3(
|
|
165
|
+
"referrals",
|
|
166
|
+
"find",
|
|
167
|
+
{ query: { referrerId: user?.userId } },
|
|
168
|
+
!!user?.userId,
|
|
169
|
+
);
|
|
170
|
+
const showReferralInfo = (contentType as ManageAccountModalProps)?.showReferralInfo ?? false;
|
|
171
|
+
|
|
172
|
+
const mutationOptions = {
|
|
173
|
+
onError: (error: Error) => {
|
|
174
|
+
console.error("Error Unlinking account:", error);
|
|
175
|
+
toast.error(error.message);
|
|
176
|
+
},
|
|
177
|
+
onSuccess: async (data: any) => {
|
|
178
|
+
console.log("Raw Link Account Data:", data);
|
|
179
|
+
try {
|
|
180
|
+
console.log("Sync user data...");
|
|
181
|
+
await app.service("users").syncTwProfiles({});
|
|
182
|
+
} catch (refreshError) {
|
|
183
|
+
console.warn("⚠️ Could not sync user data:", refreshError);
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
// Fetch referred users
|
|
189
|
+
const currentReferralCode = user?.referralCode || user?.userId || "";
|
|
190
|
+
|
|
191
|
+
const handleCopyCode = async () => {
|
|
192
|
+
try {
|
|
193
|
+
await navigator.clipboard.writeText(currentReferralCode);
|
|
194
|
+
toast.success("Referral code copied to clipboard!");
|
|
195
|
+
} catch (error) {
|
|
196
|
+
toast.error("Failed to copy referral code");
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
const handleUpdateReferralCode = async () => {
|
|
201
|
+
if (!newReferralCode) return;
|
|
202
|
+
|
|
203
|
+
setIsUpdatingCode(true);
|
|
204
|
+
try {
|
|
205
|
+
// @ts-expect-error - setReferralCode is not typed for some reason
|
|
206
|
+
const newUser = await app.service("users").setReferralCode({
|
|
207
|
+
userId: user?.userId,
|
|
208
|
+
referralCode: newReferralCode,
|
|
209
|
+
});
|
|
210
|
+
setUser(newUser as unknown as Users);
|
|
211
|
+
toast.success("Referral code updated successfully!");
|
|
212
|
+
setIsEditingCode(false);
|
|
213
|
+
setNewReferralCode("");
|
|
214
|
+
} catch (error) {
|
|
215
|
+
toast.error("Failed to update referral code");
|
|
216
|
+
} finally {
|
|
217
|
+
setIsUpdatingCode(false);
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
const profiles = profilesRaw
|
|
222
|
+
.filter((profile: any) => !["custom_auth_endpoint"].includes(profile.type))
|
|
223
|
+
.map((profile: any) => ({
|
|
224
|
+
...getProfileDisplayInfo(profile),
|
|
225
|
+
originalProfile: profile,
|
|
226
|
+
}));
|
|
227
|
+
|
|
228
|
+
const handleUnlink = async (profile: any) => {
|
|
229
|
+
setUnlinkingAccountId(profile.title);
|
|
230
|
+
try {
|
|
231
|
+
unlinkProfile({ client, profileToUnlink: profile.originalProfile }, mutationOptions);
|
|
232
|
+
} catch (error) {
|
|
233
|
+
console.error("Error unlinking account:", error);
|
|
234
|
+
} finally {
|
|
235
|
+
setUnlinkingAccountId(null);
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
const handleOpenLinkModal = () => {
|
|
240
|
+
setB3ModalOpen(true);
|
|
241
|
+
setB3ModalContentType({
|
|
242
|
+
type: "linkAccount",
|
|
243
|
+
showBackButton: true,
|
|
244
|
+
partnerId,
|
|
245
|
+
chain,
|
|
246
|
+
onSuccess: async () => {
|
|
247
|
+
// Let the LinkAccount component handle modal closing
|
|
248
|
+
},
|
|
249
|
+
onError: () => {
|
|
250
|
+
// Let the LinkAccount component handle errors
|
|
251
|
+
},
|
|
252
|
+
onClose: () => {
|
|
253
|
+
// Let the LinkAccount component handle closing
|
|
254
|
+
},
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
console.log("@@profiles", profiles);
|
|
259
|
+
|
|
260
|
+
return (
|
|
261
|
+
<div className="linked-accounts-settings space-y-8">
|
|
262
|
+
{/* Linked Accounts Section */}
|
|
263
|
+
<div className="linked-accounts-section space-y-4">
|
|
264
|
+
<div className="linked-accounts-header flex items-center justify-between">
|
|
265
|
+
<h3 className="text-b3-grey font-neue-montreal-semibold linked-accounts-settings-title text-xl">
|
|
266
|
+
Linked Accounts
|
|
267
|
+
</h3>
|
|
268
|
+
<Button
|
|
269
|
+
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"
|
|
270
|
+
onClick={handleOpenLinkModal}
|
|
271
|
+
disabled={isLinking}
|
|
272
|
+
>
|
|
273
|
+
{isLinking ? (
|
|
274
|
+
<Loader2 className="linked-accounts-link-loading text-b3-primary-blue animate-spin" size={16} />
|
|
275
|
+
) : (
|
|
276
|
+
<LinkIcon size={16} className="linked-accounts-link-icon text-b3-primary-blue" />
|
|
277
|
+
)}
|
|
278
|
+
<span className="linked-accounts-link-text text-b3-grey font-neue-montreal-semibold">
|
|
279
|
+
{isLinking ? "Linking..." : "Link New Account"}
|
|
280
|
+
</span>
|
|
281
|
+
</Button>
|
|
282
|
+
</div>
|
|
283
|
+
|
|
284
|
+
{isLoadingProfiles ? (
|
|
285
|
+
<div className="linked-accounts-loading flex justify-center py-8">
|
|
286
|
+
<Loader2 className="text-b3-grey animate-spin" />
|
|
287
|
+
</div>
|
|
288
|
+
) : profiles.length > 0 ? (
|
|
289
|
+
<div className="linked-accounts-list space-y-4">
|
|
290
|
+
{profiles.map(profile => (
|
|
291
|
+
<div
|
|
292
|
+
key={profile.title}
|
|
293
|
+
className="linked-account-item bg-b3-line group flex items-center justify-between rounded-xl p-4"
|
|
294
|
+
>
|
|
295
|
+
<div className="linked-account-info flex items-center gap-3">
|
|
296
|
+
{profile.imageUrl ? (
|
|
297
|
+
<img
|
|
298
|
+
src={profile.imageUrl}
|
|
299
|
+
alt={profile.title}
|
|
300
|
+
className="linked-account-avatar linked-account-avatar-image size-10 rounded-full"
|
|
301
|
+
/>
|
|
302
|
+
) : (
|
|
303
|
+
<div className="linked-account-avatar linked-account-avatar-placeholder bg-b3-primary-wash flex h-10 w-10 items-center justify-center rounded-full">
|
|
304
|
+
<span className="linked-account-initial text-b3-grey font-neue-montreal-semibold text-sm uppercase">
|
|
305
|
+
{profile.initial}
|
|
306
|
+
</span>
|
|
307
|
+
</div>
|
|
308
|
+
)}
|
|
309
|
+
<div className="linked-account-details">
|
|
310
|
+
<div className="linked-account-title-row flex items-center gap-2">
|
|
311
|
+
{(() => {
|
|
312
|
+
const { displayTitle, isAddress } = formatProfileTitle(profile.title);
|
|
313
|
+
|
|
314
|
+
const handleCopyAddress = async (e: React.MouseEvent) => {
|
|
315
|
+
e.stopPropagation();
|
|
316
|
+
try {
|
|
317
|
+
await navigator.clipboard.writeText(profile.title);
|
|
318
|
+
toast.success("Address copied to clipboard!");
|
|
319
|
+
} catch (error) {
|
|
320
|
+
toast.error("Failed to copy address");
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
return (
|
|
325
|
+
<div className="flex items-center gap-1">
|
|
326
|
+
<span
|
|
327
|
+
className={`linked-account-title text-b3-grey font-neue-montreal-semibold ${
|
|
328
|
+
isAddress
|
|
329
|
+
? "font-mono text-sm" // Use monospace font for addresses
|
|
330
|
+
: "break-words" // Use break-words for emails/names (better than break-all)
|
|
331
|
+
}`}
|
|
332
|
+
title={isAddress ? profile.title : undefined} // Show full address on hover
|
|
333
|
+
>
|
|
334
|
+
{displayTitle}
|
|
335
|
+
</span>
|
|
336
|
+
{isAddress && (
|
|
337
|
+
<button
|
|
338
|
+
onClick={handleCopyAddress}
|
|
339
|
+
className="linked-account-copy-button ml-1 rounded p-1 opacity-0 transition-opacity hover:bg-gray-100 group-hover:opacity-100"
|
|
340
|
+
title="Copy full address"
|
|
341
|
+
>
|
|
342
|
+
<Copy size={12} className="text-gray-500 hover:text-gray-700" />
|
|
343
|
+
</button>
|
|
344
|
+
)}
|
|
345
|
+
</div>
|
|
346
|
+
);
|
|
347
|
+
})()}
|
|
348
|
+
<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">
|
|
349
|
+
{profile.type.toUpperCase()}
|
|
350
|
+
</span>
|
|
351
|
+
</div>
|
|
352
|
+
<div className="linked-account-subtitle text-b3-foreground-muted font-neue-montreal-medium text-sm">
|
|
353
|
+
{profile.subtitle}
|
|
354
|
+
</div>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
<Button
|
|
358
|
+
variant="ghost"
|
|
359
|
+
size="icon"
|
|
360
|
+
className="linked-account-unlink-button text-b3-grey hover:text-b3-negative"
|
|
361
|
+
onClick={() => handleUnlink(profile)}
|
|
362
|
+
disabled={unlinkingAccountId === profile.title || isUnlinking}
|
|
363
|
+
>
|
|
364
|
+
{unlinkingAccountId === profile.title || isUnlinking ? (
|
|
365
|
+
<Loader2 className="linked-account-unlink-loading animate-spin" />
|
|
366
|
+
) : (
|
|
367
|
+
<UnlinkIcon size={16} className="linked-account-unlink-icon" />
|
|
368
|
+
)}
|
|
369
|
+
</Button>
|
|
370
|
+
</div>
|
|
371
|
+
))}
|
|
372
|
+
</div>
|
|
373
|
+
) : (
|
|
374
|
+
<div className="linked-accounts-empty text-b3-foreground-muted py-8 text-center">
|
|
375
|
+
No linked accounts found
|
|
376
|
+
</div>
|
|
377
|
+
)}
|
|
378
|
+
</div>
|
|
379
|
+
|
|
380
|
+
{showReferralInfo && (
|
|
381
|
+
/* Referral Section */
|
|
382
|
+
<div className="referrals-section space-y-4">
|
|
383
|
+
<h3 className="referrals-title text-b3-grey font-neue-montreal-semibold text-xl">Referrals</h3>
|
|
384
|
+
|
|
385
|
+
{/* Referral Code */}
|
|
386
|
+
<div className="referral-code-container bg-b3-line rounded-xl p-4">
|
|
387
|
+
{isEditingCode && (
|
|
388
|
+
<div className="referral-code-header-editing">
|
|
389
|
+
<div className="referral-code-title text-b3-grey font-neue-montreal-semibold">Your Referral Code</div>
|
|
390
|
+
<div className="referral-code-description text-b3-foreground-muted font-neue-montreal-medium text-sm">
|
|
391
|
+
Share this code with friends to earn rewards
|
|
392
|
+
</div>
|
|
393
|
+
</div>
|
|
394
|
+
)}
|
|
395
|
+
<div className="referral-code-content flex items-center justify-between">
|
|
396
|
+
{!isEditingCode && (
|
|
397
|
+
<div className="referral-code-header">
|
|
398
|
+
<div className="referral-code-title text-b3-grey font-neue-montreal-semibold">
|
|
399
|
+
Your Referral Code
|
|
400
|
+
</div>
|
|
401
|
+
<div className="referral-code-description text-b3-foreground-muted font-neue-montreal-medium text-sm">
|
|
402
|
+
Share this code with friends to earn rewards
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
)}
|
|
406
|
+
<div className="referral-code-actions flex items-center gap-2">
|
|
407
|
+
{isEditingCode ? (
|
|
408
|
+
<div className="referral-code-edit-form flex items-center gap-2">
|
|
409
|
+
<input
|
|
410
|
+
type="text"
|
|
411
|
+
value={newReferralCode}
|
|
412
|
+
onChange={e => setNewReferralCode(e.target.value)}
|
|
413
|
+
className="referral-code-input rounded-lg border border-gray-200 bg-white px-3 py-1.5 text-sm"
|
|
414
|
+
placeholder="Enter new code"
|
|
415
|
+
ref={referallCodeRef}
|
|
416
|
+
/>
|
|
417
|
+
<Button
|
|
418
|
+
size="sm"
|
|
419
|
+
className="referral-code-save-button"
|
|
420
|
+
onClick={handleUpdateReferralCode}
|
|
421
|
+
disabled={isUpdatingCode || !newReferralCode}
|
|
422
|
+
>
|
|
423
|
+
{isUpdatingCode ? (
|
|
424
|
+
<Loader2 className="referral-code-save-loading h-4 w-4 animate-spin" />
|
|
425
|
+
) : (
|
|
426
|
+
"Save"
|
|
427
|
+
)}
|
|
428
|
+
</Button>
|
|
429
|
+
<Button
|
|
430
|
+
size="sm"
|
|
431
|
+
variant="ghost"
|
|
432
|
+
className="referral-code-cancel-button"
|
|
433
|
+
onClick={() => {
|
|
434
|
+
setIsEditingCode(false);
|
|
435
|
+
setNewReferralCode("");
|
|
436
|
+
}}
|
|
437
|
+
>
|
|
438
|
+
Cancel
|
|
439
|
+
</Button>
|
|
440
|
+
</div>
|
|
441
|
+
) : (
|
|
442
|
+
<>
|
|
443
|
+
<div className="referral-code-display rounded-lg border border-gray-200 bg-white px-3 py-1.5 text-sm">
|
|
444
|
+
{currentReferralCode}
|
|
445
|
+
</div>
|
|
446
|
+
<Button
|
|
447
|
+
size="icon"
|
|
448
|
+
variant="ghost"
|
|
449
|
+
className="referral-code-copy-button"
|
|
450
|
+
onClick={handleCopyCode}
|
|
451
|
+
>
|
|
452
|
+
<Copy className="referral-code-copy-icon h-4 w-4" />
|
|
453
|
+
</Button>
|
|
454
|
+
<Button
|
|
455
|
+
size="icon"
|
|
456
|
+
variant="ghost"
|
|
457
|
+
className="referral-code-edit-button"
|
|
458
|
+
onClick={() => {
|
|
459
|
+
setIsEditingCode(true);
|
|
460
|
+
setTimeout(() => {
|
|
461
|
+
referallCodeRef.current?.focus();
|
|
462
|
+
}, 100);
|
|
463
|
+
}}
|
|
464
|
+
>
|
|
465
|
+
<Pencil className="referral-code-edit-icon h-4 w-4" />
|
|
466
|
+
</Button>
|
|
467
|
+
</>
|
|
468
|
+
)}
|
|
469
|
+
</div>
|
|
470
|
+
</div>
|
|
471
|
+
</div>
|
|
472
|
+
|
|
473
|
+
{/* Referred Users */}
|
|
474
|
+
<div className="referred-users-container bg-b3-line rounded-xl p-4">
|
|
475
|
+
<div className="referred-users-title text-b3-grey font-neue-montreal-semibold mb-4">Referred Users</div>
|
|
476
|
+
{isLoadingReferrals ? (
|
|
477
|
+
<div className="referred-users-loading flex justify-center py-4">
|
|
478
|
+
<Loader2 className="h-6 w-6 animate-spin text-gray-400" />
|
|
479
|
+
</div>
|
|
480
|
+
) : referrals?.data?.length ? (
|
|
481
|
+
<div className="referred-users-list space-y-3">
|
|
482
|
+
{referrals.data.map((referral: Referrals) => (
|
|
483
|
+
<div
|
|
484
|
+
key={String(referral._id)}
|
|
485
|
+
className="referred-user-item flex items-center justify-between rounded-lg bg-white p-3"
|
|
486
|
+
>
|
|
487
|
+
<div className="referred-user-id text-sm font-medium">{referral.referreeId}</div>
|
|
488
|
+
<div className="referred-user-date text-sm text-gray-500">
|
|
489
|
+
{new Date(referral.createdAt).toLocaleDateString()}
|
|
490
|
+
</div>
|
|
491
|
+
</div>
|
|
492
|
+
))}
|
|
493
|
+
</div>
|
|
494
|
+
) : (
|
|
495
|
+
<div className="referred-users-empty py-4 text-center text-gray-500">No referred users yet</div>
|
|
496
|
+
)}
|
|
497
|
+
</div>
|
|
498
|
+
</div>
|
|
499
|
+
)}
|
|
500
|
+
|
|
501
|
+
{/* Additional Settings Sections */}
|
|
502
|
+
<div className="account-preferences-section space-y-4">
|
|
503
|
+
<h3 className="account-preferences-title text-b3-grey font-neue-montreal-semibold text-xl">
|
|
504
|
+
Account Preferences
|
|
505
|
+
</h3>
|
|
506
|
+
<div className="account-preferences-container bg-b3-line rounded-xl p-4">
|
|
507
|
+
<div className="account-preference-item flex items-center justify-between">
|
|
508
|
+
<div className="account-preference-info">
|
|
509
|
+
<div className="account-preference-title text-b3-grey font-neue-montreal-semibold">Dark Mode</div>
|
|
510
|
+
<div className="account-preference-description text-b3-foreground-muted font-neue-montreal-medium text-sm">
|
|
511
|
+
Switch between light and dark theme
|
|
512
|
+
</div>
|
|
513
|
+
</div>
|
|
514
|
+
{/* Theme toggle placeholder - can be implemented later */}
|
|
515
|
+
<div className="account-preference-toggle theme-toggle-placeholder bg-b3-primary-wash h-6 w-12 rounded-full"></div>
|
|
516
|
+
</div>
|
|
517
|
+
</div>
|
|
518
|
+
</div>
|
|
519
|
+
|
|
520
|
+
<button
|
|
521
|
+
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"
|
|
522
|
+
onClick={onLogoutEnhanced}
|
|
523
|
+
>
|
|
524
|
+
<span className="logout-text font-neue-montreal-semibold text-b3-grey">Sign out</span>
|
|
525
|
+
<div className="logout-icon-container absolute right-4">
|
|
526
|
+
{logoutLoading ? (
|
|
527
|
+
<Loader2 className="logout-loading animate-spin" size={16} />
|
|
528
|
+
) : (
|
|
529
|
+
<SignOutIcon size={16} className="logout-icon text-b3-grey" />
|
|
530
|
+
)}
|
|
531
|
+
</div>
|
|
532
|
+
</button>
|
|
533
|
+
</div>
|
|
534
|
+
);
|
|
535
|
+
};
|
|
536
|
+
|
|
79
537
|
return (
|
|
80
|
-
<div className="b3-manage-account flex-
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
538
|
+
<div className="b3-manage-account bg-b3-background flex flex-col rounded-xl">
|
|
539
|
+
<div className="flex-1">
|
|
540
|
+
<TabsPrimitive
|
|
541
|
+
defaultValue={activeTab}
|
|
542
|
+
onValueChange={value => {
|
|
543
|
+
const tab = value as TabValue;
|
|
544
|
+
if (["overview", "tokens", "nfts", "apps", "settings"].includes(tab)) {
|
|
545
|
+
setActiveTab?.(tab);
|
|
546
|
+
}
|
|
547
|
+
}}
|
|
548
|
+
>
|
|
549
|
+
<div className="px-4">
|
|
550
|
+
<TabsListPrimitive className="grid h-auto grid-cols-2 grid-rows-2 gap-3 rounded-none border-none bg-transparent">
|
|
551
|
+
<TabTriggerPrimitive
|
|
552
|
+
value="overview"
|
|
553
|
+
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"
|
|
554
|
+
>
|
|
555
|
+
<BarChart3 size={20} className="text-b3-primary-blue shrink-0 group-data-[state=active]:text-white" />
|
|
556
|
+
<span className="text-b3-grey font-neue-montreal-semibold text-sm group-data-[state=active]:text-white">
|
|
557
|
+
Overview
|
|
558
|
+
</span>
|
|
559
|
+
</TabTriggerPrimitive>
|
|
560
|
+
<TabTriggerPrimitive
|
|
561
|
+
value="tokens"
|
|
562
|
+
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"
|
|
563
|
+
>
|
|
564
|
+
<Coins size={20} className="text-b3-primary-blue shrink-0 group-data-[state=active]:text-white" />
|
|
565
|
+
<span className="text-b3-grey font-neue-montreal-semibold text-sm group-data-[state=active]:text-white">
|
|
566
|
+
Tokens
|
|
567
|
+
</span>
|
|
568
|
+
</TabTriggerPrimitive>
|
|
569
|
+
<TabTriggerPrimitive
|
|
570
|
+
value="nfts"
|
|
571
|
+
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"
|
|
572
|
+
>
|
|
573
|
+
<Image size={20} className="text-b3-primary-blue shrink-0 group-data-[state=active]:text-white" />
|
|
574
|
+
<span className="text-b3-grey font-neue-montreal-semibold text-sm group-data-[state=active]:text-white">
|
|
575
|
+
NFTs
|
|
576
|
+
</span>
|
|
577
|
+
</TabTriggerPrimitive>
|
|
578
|
+
{/*
|
|
579
|
+
// TODO: Apps is a remnant of session key flow. Moving forward, we should find a way to properly associate apps from linked partners that a user has logged in with
|
|
580
|
+
// https://linear.app/npclabs/issue/B3-2318/find-a-way-to-properly-display-which-partner-apps-a-user-has-logged-in
|
|
581
|
+
<TabTriggerPrimitive
|
|
582
|
+
value="apps"
|
|
583
|
+
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-16 w-full flex-col items-start justify-between rounded-xl border border-gray-200 bg-white p-3 text-left shadow-sm transition-all duration-200 hover:bg-gray-50 hover:shadow-md data-[state=active]:shadow-lg col-start-1 col-end-2"
|
|
584
|
+
>
|
|
585
|
+
<div className="flex w-full items-center justify-between">
|
|
586
|
+
<Grid3X3 size={20} className="text-b3-primary-blue shrink-0 group-data-[state=active]:text-white" />
|
|
587
|
+
<span className="text-b3-grey font-neue-montreal-bold text-lg group-data-[state=active]:text-white">4</span>
|
|
588
|
+
</div>
|
|
589
|
+
<span className="text-b3-grey font-neue-montreal-semibold text-sm group-data-[state=active]:text-white">
|
|
590
|
+
Apps
|
|
591
|
+
</span>
|
|
592
|
+
</TabTriggerPrimitive>
|
|
593
|
+
*/}
|
|
594
|
+
<TabTriggerPrimitive
|
|
595
|
+
value="settings"
|
|
596
|
+
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"
|
|
597
|
+
>
|
|
598
|
+
<Settings size={20} className="text-b3-primary-blue shrink-0 group-data-[state=active]:text-white" />
|
|
599
|
+
<span className="text-b3-grey font-neue-montreal-semibold text-sm group-data-[state=active]:text-white">
|
|
600
|
+
Settings
|
|
601
|
+
</span>
|
|
602
|
+
</TabTriggerPrimitive>
|
|
603
|
+
</TabsListPrimitive>
|
|
604
|
+
</div>
|
|
605
|
+
|
|
606
|
+
<TabsContentPrimitive value="overview" className="px-4 pb-4 pt-2">
|
|
607
|
+
<BalanceContent onLogout={onLogout} showDeposit={showDeposit} showSwap={showSwap} />
|
|
98
608
|
</TabsContentPrimitive>
|
|
99
609
|
|
|
100
|
-
|
|
610
|
+
<TabsContentPrimitive value="tokens" className="px-4 pb-4 pt-2">
|
|
101
611
|
<ContentTokens activeTab={activeTab} />
|
|
102
|
-
</TabsContentPrimitive>
|
|
612
|
+
</TabsContentPrimitive>
|
|
103
613
|
|
|
104
|
-
|
|
105
|
-
<
|
|
106
|
-
|
|
614
|
+
<TabsContentPrimitive value="nfts" className="px-4 pb-4 pt-2">
|
|
615
|
+
<div className="grid grid-cols-3 gap-4">
|
|
616
|
+
{nfts?.nftResponse ? (
|
|
617
|
+
<AccountAssets nfts={nfts.nftResponse} isLoading={isLoading} />
|
|
618
|
+
) : (
|
|
619
|
+
<div className="col-span-3 py-12 text-center text-gray-500">No NFTs found</div>
|
|
620
|
+
)}
|
|
621
|
+
</div>
|
|
622
|
+
</TabsContentPrimitive>
|
|
107
623
|
|
|
108
|
-
|
|
109
|
-
|
|
624
|
+
<TabsContentPrimitive value="apps" className="px-4 pb-4 pt-2">
|
|
625
|
+
<AppsContent />
|
|
626
|
+
</TabsContentPrimitive>
|
|
110
627
|
|
|
111
|
-
<TabsContentPrimitive value="settings" className="
|
|
112
|
-
<SettingsContent
|
|
628
|
+
<TabsContentPrimitive value="settings" className="px-4 pb-4 pt-2">
|
|
629
|
+
<SettingsContent />
|
|
113
630
|
</TabsContentPrimitive>
|
|
114
|
-
</
|
|
115
|
-
|
|
116
|
-
</TabsPrimitive>
|
|
631
|
+
</TabsPrimitive>
|
|
632
|
+
</div>
|
|
117
633
|
</div>
|
|
118
634
|
);
|
|
119
635
|
}
|