@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,181 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { ALL_CHAINS, getExplorerTxUrl } from "../../../../anyspend/index.js";
|
|
3
|
-
import { ChainTokenIcon } from "../../../../anyspend/react/components/common/ChainTokenIcon.js";
|
|
4
|
-
import { useAccountWallet, useAnalytics, useModalStore, useSimBalance, useUnifiedChainSwitchAndExecute, } from "../../../../global-account/react/index.js";
|
|
5
|
-
import { formatDisplayNumber, formatTokenAmount } from "../../../../shared/utils/number.js";
|
|
6
|
-
import invariant from "invariant";
|
|
7
|
-
import { CircleHelp, Clock, Loader2, Send as SendIcon, Wallet } from "lucide-react";
|
|
8
|
-
import { useState } from "react";
|
|
9
|
-
import { NumericFormat } from "react-number-format";
|
|
10
|
-
import { toast } from "sonner";
|
|
11
|
-
import { encodeFunctionData, erc20Abi, isAddress, parseUnits } from "viem";
|
|
12
|
-
import { useRecentAddressesStore } from "../../stores/useRecentAddressesStore.js";
|
|
13
|
-
import ModalHeader from "../ModalHeader/ModalHeader.js";
|
|
14
|
-
import { Button } from "../ui/button.js";
|
|
15
|
-
export function Send({ recipientAddress: initialRecipient, onSuccess }) {
|
|
16
|
-
const { address } = useAccountWallet();
|
|
17
|
-
const navigateBack = useModalStore(state => state.navigateBack);
|
|
18
|
-
const setB3ModalOpen = useModalStore(state => state.setB3ModalOpen);
|
|
19
|
-
// Wizard state
|
|
20
|
-
const [step, setStep] = useState("recipient");
|
|
21
|
-
const [selectedToken, setSelectedToken] = useState(null);
|
|
22
|
-
const [recipientAddress, setRecipientAddress] = useState(initialRecipient || "");
|
|
23
|
-
const [sendAmount, setSendAmount] = useState("");
|
|
24
|
-
const [isSending, setIsSending] = useState(false);
|
|
25
|
-
const [addressError, setAddressError] = useState("");
|
|
26
|
-
const [showValidatedResult, setShowValidatedResult] = useState(false);
|
|
27
|
-
// Hooks
|
|
28
|
-
const { data: simBalance, refetch: refetchSimBalance, isLoading: isLoadingBalance } = useSimBalance(address);
|
|
29
|
-
const { switchChainAndExecute } = useUnifiedChainSwitchAndExecute();
|
|
30
|
-
const { sendAnalyticsEvent } = useAnalytics();
|
|
31
|
-
// Recent addresses store
|
|
32
|
-
const recentAddresses = useRecentAddressesStore(state => state.recentAddresses);
|
|
33
|
-
const addRecentAddress = useRecentAddressesStore(state => state.addRecentAddress);
|
|
34
|
-
// Address validation
|
|
35
|
-
const handleRecipientAddressChange = (value) => {
|
|
36
|
-
setRecipientAddress(value);
|
|
37
|
-
setShowValidatedResult(false);
|
|
38
|
-
if (value && !isAddress(value)) {
|
|
39
|
-
setAddressError("Please enter a valid EVM address (0x...)");
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
setAddressError("");
|
|
43
|
-
if (value && isAddress(value)) {
|
|
44
|
-
setShowValidatedResult(true);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
// Paste from clipboard
|
|
49
|
-
const handlePaste = async () => {
|
|
50
|
-
try {
|
|
51
|
-
const text = await navigator.clipboard.readText();
|
|
52
|
-
const trimmedText = text.trim();
|
|
53
|
-
setRecipientAddress(trimmedText);
|
|
54
|
-
if (trimmedText && isAddress(trimmedText)) {
|
|
55
|
-
setAddressError("");
|
|
56
|
-
setShowValidatedResult(true);
|
|
57
|
-
}
|
|
58
|
-
else if (trimmedText) {
|
|
59
|
-
setAddressError("Please enter a valid EVM address (0x...)");
|
|
60
|
-
setShowValidatedResult(false);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
catch (error) {
|
|
64
|
-
toast.error("Failed to read clipboard");
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
// Handle clicking on the validated result to proceed
|
|
68
|
-
const handleSelectValidatedAddress = () => {
|
|
69
|
-
if (recipientAddress && isAddress(recipientAddress)) {
|
|
70
|
-
addRecentAddress(recipientAddress);
|
|
71
|
-
setStep("token");
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
// Go to previous step
|
|
75
|
-
const handleBack = () => {
|
|
76
|
-
if (step === "token")
|
|
77
|
-
setStep("recipient");
|
|
78
|
-
else if (step === "amount")
|
|
79
|
-
setStep("token");
|
|
80
|
-
else if (step === "confirm")
|
|
81
|
-
setStep("amount");
|
|
82
|
-
else
|
|
83
|
-
navigateBack();
|
|
84
|
-
};
|
|
85
|
-
// Get current selected token from fresh balance
|
|
86
|
-
const getCurrentSelectedToken = () => {
|
|
87
|
-
if (!selectedToken || !simBalance?.balances) {
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
const found = simBalance.balances.find(token => token.chain_id === selectedToken.chain_id && token.address === selectedToken.address);
|
|
91
|
-
return found || null;
|
|
92
|
-
};
|
|
93
|
-
// Percentage button handler
|
|
94
|
-
const handlePercentageClick = (percentage) => {
|
|
95
|
-
const currentToken = getCurrentSelectedToken();
|
|
96
|
-
if (currentToken) {
|
|
97
|
-
const tokenBalance = (BigInt(currentToken.amount) * BigInt(percentage)) / BigInt(100);
|
|
98
|
-
const amount = formatTokenAmount(tokenBalance, currentToken.decimals, 30, false);
|
|
99
|
-
setSendAmount(amount);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
// Send transaction
|
|
103
|
-
const handleSend = async () => {
|
|
104
|
-
const sendAmountWithoutCommas = sendAmount.replace(/,/g, "");
|
|
105
|
-
const currentToken = getCurrentSelectedToken();
|
|
106
|
-
if (!currentToken || !recipientAddress || !sendAmount || parseFloat(sendAmountWithoutCommas) <= 0) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
setIsSending(true);
|
|
110
|
-
const amountInWei = parseUnits(sendAmountWithoutCommas, currentToken.decimals);
|
|
111
|
-
const analyticsData = {
|
|
112
|
-
amount: sendAmount,
|
|
113
|
-
symbol: currentToken.symbol,
|
|
114
|
-
chain_id: currentToken.chain_id,
|
|
115
|
-
address: currentToken.address,
|
|
116
|
-
};
|
|
117
|
-
try {
|
|
118
|
-
invariant(isAddress(recipientAddress), "Recipient address is not a valid address");
|
|
119
|
-
const sendTokenData = encodeFunctionData({
|
|
120
|
-
abi: erc20Abi,
|
|
121
|
-
functionName: "transfer",
|
|
122
|
-
args: [recipientAddress, amountInWei],
|
|
123
|
-
});
|
|
124
|
-
const tx = await switchChainAndExecute(currentToken.chain_id, {
|
|
125
|
-
to: currentToken.address === "native" ? recipientAddress : currentToken.address,
|
|
126
|
-
data: sendTokenData,
|
|
127
|
-
value: currentToken.address === "native" ? amountInWei : BigInt(0),
|
|
128
|
-
});
|
|
129
|
-
if (tx) {
|
|
130
|
-
sendAnalyticsEvent("send_token_button_click", {
|
|
131
|
-
...analyticsData,
|
|
132
|
-
success: true,
|
|
133
|
-
tx: getExplorerTxUrl(currentToken.chain_id, tx),
|
|
134
|
-
});
|
|
135
|
-
setStep("success");
|
|
136
|
-
toast.success(`Successfully sent ${sendAmount} ${currentToken.symbol}`);
|
|
137
|
-
if (onSuccess) {
|
|
138
|
-
onSuccess(tx);
|
|
139
|
-
}
|
|
140
|
-
setTimeout(async () => {
|
|
141
|
-
await refetchSimBalance();
|
|
142
|
-
}, 1000);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
catch (error) {
|
|
146
|
-
sendAnalyticsEvent("send_token_button_click", {
|
|
147
|
-
...analyticsData,
|
|
148
|
-
success: false,
|
|
149
|
-
reason: error.message || "Unknown error",
|
|
150
|
-
});
|
|
151
|
-
toast.error(`Failed to send ${currentToken.symbol}: ${error.message || "Unknown error"}`);
|
|
152
|
-
}
|
|
153
|
-
finally {
|
|
154
|
-
setIsSending(false);
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
// Get step title
|
|
158
|
-
const getStepTitle = () => {
|
|
159
|
-
switch (step) {
|
|
160
|
-
case "recipient":
|
|
161
|
-
return "Select Recipient";
|
|
162
|
-
case "token":
|
|
163
|
-
return "Select Token";
|
|
164
|
-
case "amount":
|
|
165
|
-
return "Enter Amount";
|
|
166
|
-
case "confirm":
|
|
167
|
-
return "Confirm";
|
|
168
|
-
case "success":
|
|
169
|
-
return "Sent!";
|
|
170
|
-
default:
|
|
171
|
-
return "Send";
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
return (_jsxs("div", { className: "flex h-[600px] w-full flex-col bg-white", children: [_jsx(ModalHeader, { handleBack: handleBack, title: getStepTitle() }), _jsxs("div", { className: "flex-1 overflow-y-auto", children: [step === "recipient" && (_jsxs("div", { className: "flex flex-col gap-6 p-5", children: [_jsxs("div", { className: "flex h-12 w-full items-stretch overflow-hidden rounded-lg border border-[#d1d1d6] bg-white", children: [_jsx("div", { className: "flex w-12 items-center justify-center bg-transparent px-3 py-2", children: _jsx("span", { className: "font-neue-montreal-medium text-base text-[#3f3f46]", children: "To" }) }), _jsxs("div", { className: "flex flex-1 items-center border-l border-[#d1d1d6] px-3 py-2", children: [_jsx("input", { type: "text", value: recipientAddress, onChange: e => handleRecipientAddressChange(e.target.value), placeholder: "ENS or Address", className: "font-neue-montreal-medium flex-1 text-base text-[#70707b] outline-none placeholder:text-[#70707b]" }), _jsx("button", { onClick: handlePaste, className: "font-inter ml-2 rounded-md border border-[#e4e4e7] bg-[#fafafa] px-2.5 py-0.5 text-sm font-medium text-[#3f3f46] transition-colors hover:bg-[#f4f4f5]", children: "Paste" })] })] }), addressError && _jsx("p", { className: "font-neue-montreal-medium -mt-4 text-xs text-red-500", children: addressError }), showValidatedResult && recipientAddress && isAddress(recipientAddress) && (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "flex items-center gap-1", children: _jsx("span", { className: "font-sf-pro-text text-sm font-semibold leading-[1.3] tracking-[-0.41px] text-[#0b57c2]", children: "Result" }) }), _jsxs("button", { onClick: handleSelectValidatedAddress, className: "flex items-center gap-2 rounded-xl bg-[#f4f4f5] px-3 py-2 transition-colors hover:bg-[#e4e4e7]", children: [_jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-full border border-[#e4e4e7] bg-[#f4f4f5]", children: _jsx(Wallet, { className: "h-5 w-5 text-[#a0a0ab]" }) }), _jsxs("span", { className: "font-neue-montreal-medium text-base tracking-[-0.32px] text-[#70707b]", children: [recipientAddress.slice(0, 6), "...", recipientAddress.slice(-4)] })] })] })), recentAddresses.length > 0 && (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Clock, { className: "h-3.5 w-3.5 text-[#3f3f46]" }), _jsx("span", { className: "font-sf-pro-text text-sm font-semibold leading-[1.3] tracking-[-0.41px] text-[#3f3f46]", children: "Recents" })] }), _jsx("div", { className: "flex flex-col", children: recentAddresses.map((recent, index) => (_jsxs("button", { onClick: () => {
|
|
175
|
-
// Just fill the input and show validation - don't auto-proceed
|
|
176
|
-
handleRecipientAddressChange(recent.address);
|
|
177
|
-
}, className: "flex items-center gap-2 rounded-xl px-3 py-2 transition-colors hover:bg-[#fafafa]", children: [_jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-full border border-[#e4e4e7] bg-[#f4f4f5]", children: _jsx(Wallet, { className: "h-5 w-5 text-[#a0a0ab]" }) }), _jsxs("span", { className: "font-neue-montreal-medium text-base tracking-[-0.32px] text-[#70707b]", children: [recent.address.slice(0, 6), "...", recent.address.slice(-4)] })] }, index))) })] }))] })), step === "token" && (_jsx("div", { className: "flex flex-col p-5", children: isLoadingBalance ? (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "space-y-1", children: [...Array(3)].map((_, index) => (_jsxs("div", { className: "flex items-center justify-between rounded-xl p-3", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: "bg-b3-line h-10 w-10 animate-pulse rounded-full" }), _jsxs("div", { children: [_jsx("div", { className: "bg-b3-line mb-1 h-4 w-16 animate-pulse rounded" }), _jsx("div", { className: "bg-b3-line h-3 w-24 animate-pulse rounded" })] })] }), _jsxs("div", { className: "text-right", children: [_jsx("div", { className: "bg-b3-line mb-1 h-4 w-20 animate-pulse rounded" }), _jsx("div", { className: "bg-b3-line h-3 w-16 animate-pulse rounded" })] })] }, index))) }) })) : simBalance?.balances && simBalance.balances.length > 0 ? (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "space-y-1", children: simBalance.balances.map(token => (_jsxs("div", { className: "hover:bg-b3-line/60 dark:hover:bg-b3-primary-wash/40 group flex cursor-pointer items-center justify-between rounded-xl p-3 transition-all duration-200", onClick: () => {
|
|
178
|
-
setSelectedToken(token);
|
|
179
|
-
setStep("amount");
|
|
180
|
-
}, children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-full", children: ALL_CHAINS[token.chain_id]?.logoUrl ? (_jsx(ChainTokenIcon, { chainUrl: ALL_CHAINS[token.chain_id].logoUrl, tokenUrl: token.token_metadata?.logo, className: "size-10" })) : (_jsx(CircleHelp, { className: "text-b3-react-foreground size-10" })) }), _jsxs("div", { children: [_jsx("div", { className: "flex items-center gap-2", children: _jsx("span", { className: "text-b3-grey font-neue-montreal-semibold transition-colors duration-200 group-hover:font-bold group-hover:text-black", children: token.symbol }) }), _jsx("div", { className: "text-b3-foreground-muted font-neue-montreal-medium text-sm transition-colors duration-200 group-hover:text-gray-700", children: token.name })] })] }), _jsxs("div", { className: "text-right", children: [_jsx("div", { className: "text-b3-grey font-neue-montreal-semibold transition-colors duration-200 group-hover:font-bold group-hover:text-black", children: formatTokenAmount(BigInt(token.amount), token.decimals) }), _jsx("div", { className: "text-b3-foreground-muted font-neue-montreal-medium text-sm transition-colors duration-200 group-hover:text-gray-700", children: formatDisplayNumber(token.value_usd, { style: "currency", fractionDigits: 2 }) })] })] }, token.chain_id + "_" + token.address))) }) })) : (_jsxs("div", { className: "flex flex-col items-center justify-center py-12 text-center", children: [_jsx(CircleHelp, { className: "text-b3-foreground-muted mb-4 h-8 w-8" }), _jsx("p", { className: "text-b3-foreground-muted font-neue-montreal-medium text-sm", children: "No tokens available" })] })) })), step === "amount" && selectedToken && (_jsxs("div", { className: "flex flex-col gap-6 p-5", children: [_jsxs("div", { className: "flex items-center justify-between rounded-xl border border-[#d1d1d6] bg-[#fafafa] p-3", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: "flex h-10 w-10 items-center justify-center", children: ALL_CHAINS[selectedToken.chain_id]?.logoUrl ? (_jsx(ChainTokenIcon, { chainUrl: ALL_CHAINS[selectedToken.chain_id].logoUrl, tokenUrl: selectedToken.token_metadata?.logo, className: "size-10" })) : (_jsx(CircleHelp, { className: "text-b3-react-foreground size-10" })) }), _jsxs("div", { children: [_jsx("div", { className: "font-neue-montreal-semibold text-base text-[#18181b]", children: selectedToken.symbol }), _jsx("div", { className: "font-neue-montreal-medium text-sm text-[#70707b]", children: formatTokenAmount(BigInt(selectedToken.amount), selectedToken.decimals) })] })] }), _jsx("button", { onClick: () => setStep("token"), className: "text-b3-primary-blue font-neue-montreal-semibold hover:text-b3-primary-blue/80 text-sm transition-colors", children: "Change" })] }), _jsxs("div", { className: "space-y-3", children: [_jsx(NumericFormat, { decimalSeparator: ".", allowedDecimalSeparators: [","], thousandSeparator: true, inputMode: "decimal", autoComplete: "off", autoCorrect: "off", type: "text", placeholder: "0.00", minLength: 1, maxLength: 30, spellCheck: "false", className: "font-neue-montreal-medium placeholder:text-b3-foreground-muted w-full rounded-lg border border-[#d1d1d6] bg-white px-3 py-2 text-base text-[#18181b] outline-none focus:border-[#0c68e9]", pattern: "^[0-9]*[.,]?[0-9]*$", disabled: isSending, value: sendAmount, allowNegative: false, onValueChange: values => setSendAmount(values.value) }), _jsx("div", { className: "grid grid-cols-4 gap-2", children: [25, 50, 75, 100].map(percentage => (_jsxs(Button, { variant: "outline", onClick: () => handlePercentageClick(percentage), className: "font-neue-montreal-medium border-[#d1d1d6] text-sm text-[#18181b] hover:bg-[#fafafa]", disabled: isSending, children: [percentage, "%"] }, percentage))) }), _jsxs("div", { className: "font-neue-montreal-medium text-sm text-[#70707b]", children: ["Available: ", formatTokenAmount(BigInt(selectedToken.amount), selectedToken.decimals), " ", selectedToken.symbol] })] }), _jsx(Button, { onClick: () => setStep("confirm"), disabled: !sendAmount || parseFloat(sendAmount) <= 0, className: "bg-b3-primary-blue hover:bg-b3-primary-blue/90 font-neue-montreal-semibold disabled:bg-b3-line disabled:text-b3-foreground-muted h-12 w-full rounded-xl text-white", children: "Continue" })] })), step === "confirm" && selectedToken && (_jsxs("div", { className: "flex min-h-full flex-col", children: [_jsxs("div", { className: "flex flex-col items-center gap-4 px-5 pb-0 pt-6", children: [_jsx("div", { className: "flex h-14 w-14 items-center justify-center rounded-full bg-[#d5e5fd]", children: _jsx(SendIcon, { className: "h-7 w-7 text-[#0c68e9]" }) }), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx("span", { className: "font-neue-montreal-semibold text-[30px] leading-[38px] text-[#18181b]", children: sendAmount }), _jsx("span", { className: "font-neue-montreal-semibold text-[30px] leading-[38px] text-[#70707b]", children: selectedToken.symbol })] })] }), _jsx("div", { className: "h-5" }), _jsx("div", { className: "flex flex-col gap-3 px-5", children: _jsx("div", { className: "rounded-xl border border-[#e4e4e7] bg-[#fafafa] p-4", children: _jsxs("div", { className: "flex flex-col gap-3", children: [_jsxs("div", { className: "flex items-center justify-between border-b border-[#e4e4e7] pb-3", children: [_jsx("span", { className: "font-inter text-sm font-normal leading-5 text-[#51525c]", children: "To" }), _jsxs("span", { className: "font-inter text-sm font-normal leading-5 text-[#18181b]", children: ["Wallet (", recipientAddress.slice(0, 6), "...", recipientAddress.slice(-4), ")"] })] }), _jsxs("div", { className: "flex items-center justify-between border-b border-[#e4e4e7] pb-3", children: [_jsx("span", { className: "font-inter text-sm font-normal leading-5 text-[#51525c]", children: "Network" }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "font-inter text-sm font-normal leading-5 text-[#51525c]", children: ALL_CHAINS[selectedToken.chain_id]?.name || "Unknown" }), ALL_CHAINS[selectedToken.chain_id]?.logoUrl && (_jsx("img", { src: ALL_CHAINS[selectedToken.chain_id].logoUrl, alt: ALL_CHAINS[selectedToken.chain_id]?.name, className: "h-4 w-4 rounded-full" }))] })] }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "font-inter text-sm font-normal leading-5 text-[#51525c]", children: "Network fee" }), _jsx("span", { className: "font-inter text-sm font-normal leading-5 text-[#18181b]", children: "$0.1" })] })] }) }) }), _jsx("div", { className: "flex-1" }), _jsxs("div", { className: "flex gap-4 border-t border-[#e4e4e7] bg-[#fafafa] p-4", children: [_jsx(Button, { onClick: handleBack, disabled: isSending, variant: "outline", className: "font-inter h-12 flex-1 rounded-xl border border-[#e4e4e7] bg-white text-base font-semibold text-[#3f3f46] shadow-[inset_0px_0px_0px_1px_rgba(10,13,18,0.18),inset_0px_-2px_0px_0px_rgba(10,13,18,0.05)] hover:bg-[#fafafa]", children: "Cancel" }), _jsx(Button, { onClick: handleSend, disabled: isSending, className: "font-inter border-white/12 h-12 flex-1 rounded-xl border-2 bg-[#0c68e9] text-base font-semibold text-white shadow-[inset_0px_0px_0px_1px_rgba(10,13,18,0.18),inset_0px_-2px_0px_0px_rgba(10,13,18,0.05)] hover:bg-[#0b5fd4]", children: isSending ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), "Sending..."] })) : ("Send") })] })] })), step === "success" && selectedToken && (_jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-6 p-5 text-center", children: [_jsx("div", { className: "flex h-14 w-14 items-center justify-center rounded-full bg-green-100", children: _jsx(SendIcon, { className: "h-7 w-7 text-green-600" }) }), _jsxs("div", { children: [_jsx("h3", { className: "font-neue-montreal-semibold mb-2 text-xl text-[#18181b]", children: "Sent!" }), _jsxs("p", { className: "font-neue-montreal-medium text-sm text-[#70707b]", children: [sendAmount, " ", selectedToken.symbol, " was sent to ", recipientAddress.slice(0, 6), "...", recipientAddress.slice(-4)] })] }), _jsx(Button, { onClick: () => setB3ModalOpen(false), className: "bg-b3-primary-blue hover:bg-b3-primary-blue/90 font-neue-montreal-semibold h-12 w-full rounded-xl text-white", children: "Done" })] }))] })] }));
|
|
181
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
const BellIcon = (props) => (_jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: _jsx("path", { d: "M7.5 17.5H12.5M4.16667 7.5C4.16667 4.27834 6.77834 1.66667 10 1.66667C13.2217 1.66667 15.8333 4.27834 15.8333 7.5V8.33333C15.8333 9.61667 16.2167 10.8583 16.9167 11.9167L17.5 12.75C17.9417 13.3917 17.4833 14.1667 16.7333 14.1667H3.26667C2.51667 14.1667 2.05834 13.3917 2.5 12.75L3.08334 11.9167C3.78334 10.8583 4.16667 9.61667 4.16667 8.33333V7.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
3
|
-
export default BellIcon;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
export function ChevronDownIcon({ className, ...props }) {
|
|
3
|
-
return (_jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, ...props, children: _jsx("path", { d: "M6 9L12 15L18 9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
4
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
export function CopyIcon({ className, ...props }) {
|
|
3
|
-
return (_jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, ...props, children: _jsx("path", { d: "M3.33333 3.33333V2C3.33333 1.63181 3.63181 1.33333 4 1.33333H10C10.3682 1.33333 10.6667 1.63181 10.6667 2V8C10.6667 8.36819 10.3682 8.66667 10 8.66667H8.66667M2 3.33333H8C8.36819 3.33333 8.66667 3.63181 8.66667 4V10C8.66667 10.3682 8.36819 10.6667 8 10.6667H2C1.63181 10.6667 1.33333 10.3682 1.33333 10V4C1.33333 3.63181 1.63181 3.33333 2 3.33333Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
4
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
const LinkIcon = (props) => (_jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: _jsx("path", { d: "M10.8333 9.16667L15.8333 4.16667M17.5 2.5L15.8333 4.16667L17.5 2.5ZM11.6667 4.16667H15.8333V8.33333L11.6667 4.16667ZM9.16667 10.8333L4.16667 15.8333L9.16667 10.8333ZM8.33333 15.8333H4.16667V11.6667L8.33333 15.8333ZM15.8333 10V15.8333H10L15.8333 10ZM4.16667 4.16667V10L10 4.16667H4.16667Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
3
|
-
export default LinkIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
const LockIcon = (props) => (_jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: _jsx("path", { d: "M14.1667 9.16667V6.66667C14.1667 4.36548 12.3012 2.5 10 2.5C7.69881 2.5 5.83333 4.36548 5.83333 6.66667V9.16667M7.5 14.1667C7.5 15.0871 8.24619 15.8333 9.16667 15.8333H10.8333C11.7538 15.8333 12.5 15.0871 12.5 14.1667C12.5 13.2462 11.7538 12.5 10.8333 12.5H9.16667C8.24619 12.5 7.5 11.7538 7.5 10.8333C7.5 9.91286 8.24619 9.16667 9.16667 9.16667H10.8333C11.7538 9.16667 12.5 9.91286 12.5 10.8333", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
3
|
-
export default LockIcon;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export function WalletIcon({ className, ...props }) {
|
|
3
|
-
return (_jsxs("svg", { width: "40", height: "40", viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, ...props, children: [_jsx("rect", { width: "40", height: "40", rx: "20", fill: "#F4F4F5" }), _jsx("path", { d: "M28 16H27V14C27 13.4696 26.7893 12.9609 26.4142 12.5858C26.0391 12.2107 25.5304 12 25 12H15C14.4696 12 13.9609 12.2107 13.5858 12.5858C13.2107 12.9609 13 13.4696 13 14V26C13 26.5304 13.2107 27.0391 13.5858 27.4142C13.9609 27.7893 14.4696 28 15 28H27C27.5304 28 28.0391 27.7893 28.4142 27.4142C28.7893 27.0391 29 26.5304 29 26V18C29 17.4696 28.7893 16.9609 28.4142 16.5858C28.0391 16.2107 27.5304 16 27 16ZM15 14H25V16H15V14ZM27 22H25C24.7348 22 24.4804 21.8946 24.2929 21.7071C24.1054 21.5196 24 21.2652 24 21C24 20.7348 24.1054 20.4804 24.2929 20.2929C24.4804 20.1054 24.7348 20 25 20H27V22Z", fill: "#71717A" })] }));
|
|
4
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
interface RecentAddress {
|
|
2
|
-
address: string;
|
|
3
|
-
timestamp: number;
|
|
4
|
-
}
|
|
5
|
-
interface RecentAddressesStore {
|
|
6
|
-
recentAddresses: RecentAddress[];
|
|
7
|
-
addRecentAddress: (address: string) => void;
|
|
8
|
-
clearRecentAddresses: () => void;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Store for managing recently used addresses in the Send flow
|
|
12
|
-
* Persists to localStorage and keeps the last 6 unique addresses
|
|
13
|
-
*/
|
|
14
|
-
export declare const useRecentAddressesStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<RecentAddressesStore>, "persist"> & {
|
|
15
|
-
persist: {
|
|
16
|
-
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<RecentAddressesStore, RecentAddressesStore>>) => void;
|
|
17
|
-
clearStorage: () => void;
|
|
18
|
-
rehydrate: () => Promise<void> | void;
|
|
19
|
-
hasHydrated: () => boolean;
|
|
20
|
-
onHydrate: (fn: (state: RecentAddressesStore) => void) => () => void;
|
|
21
|
-
onFinishHydration: (fn: (state: RecentAddressesStore) => void) => () => void;
|
|
22
|
-
getOptions: () => Partial<import("zustand/middleware").PersistOptions<RecentAddressesStore, RecentAddressesStore>>;
|
|
23
|
-
};
|
|
24
|
-
}>;
|
|
25
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { create } from "zustand";
|
|
2
|
-
import { persist } from "zustand/middleware";
|
|
3
|
-
/**
|
|
4
|
-
* Store for managing recently used addresses in the Send flow
|
|
5
|
-
* Persists to localStorage and keeps the last 6 unique addresses
|
|
6
|
-
*/
|
|
7
|
-
export const useRecentAddressesStore = create()(persist(set => ({
|
|
8
|
-
recentAddresses: [],
|
|
9
|
-
/**
|
|
10
|
-
* Add a new address to the recent addresses list
|
|
11
|
-
* Deduplicates and maintains a maximum of 6 addresses
|
|
12
|
-
*/
|
|
13
|
-
addRecentAddress: (address) => {
|
|
14
|
-
set(state => {
|
|
15
|
-
// Remove any existing entry with the same address
|
|
16
|
-
const filtered = state.recentAddresses.filter(item => item.address.toLowerCase() !== address.toLowerCase());
|
|
17
|
-
// Add the new address at the beginning
|
|
18
|
-
const updated = [{ address, timestamp: Date.now() }, ...filtered];
|
|
19
|
-
// Keep only the last 6 addresses
|
|
20
|
-
return {
|
|
21
|
-
recentAddresses: updated.slice(0, 6),
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
},
|
|
25
|
-
/**
|
|
26
|
-
* Clear all recent addresses
|
|
27
|
-
*/
|
|
28
|
-
clearRecentAddresses: () => {
|
|
29
|
-
set({ recentAddresses: [] });
|
|
30
|
-
},
|
|
31
|
-
}), {
|
|
32
|
-
name: "b3-recent-addresses-storage",
|
|
33
|
-
}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function Deposit(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { ThirdwebClient } from "thirdweb";
|
|
2
|
-
interface IPFSMediaRendererProps {
|
|
3
|
-
/** The source URL - can be IPFS URL (ipfs://...) or HTTP URL */
|
|
4
|
-
src: string | null | undefined;
|
|
5
|
-
/** Alt text for the media */
|
|
6
|
-
alt?: string;
|
|
7
|
-
/** CSS class name */
|
|
8
|
-
className?: string;
|
|
9
|
-
/** Thirdweb client instance (optional, uses default if not provided) */
|
|
10
|
-
client?: ThirdwebClient;
|
|
11
|
-
/** Width of the media */
|
|
12
|
-
width?: string | number;
|
|
13
|
-
/** Height of the media */
|
|
14
|
-
height?: string | number;
|
|
15
|
-
/** Controls property for video/audio */
|
|
16
|
-
controls?: boolean;
|
|
17
|
-
/** Style object */
|
|
18
|
-
style?: React.CSSProperties;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* IPFSMediaRenderer - A wrapper around Thirdweb's MediaRenderer that configures
|
|
22
|
-
* the IPFS gateway URL to use our validated gateway.
|
|
23
|
-
*
|
|
24
|
-
* Features:
|
|
25
|
-
* - Configures MediaRenderer to use cloudflare-ipfs.com gateway
|
|
26
|
-
* - Gateway matches our allowed list in profileDisplay.ts
|
|
27
|
-
* - Provides fallback for missing sources
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```tsx
|
|
31
|
-
* <IPFSMediaRenderer
|
|
32
|
-
* src="ipfs://QmX..."
|
|
33
|
-
* alt="Profile Avatar"
|
|
34
|
-
* className="size-14 rounded-full"
|
|
35
|
-
* />
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
export declare function IPFSMediaRenderer({ src, alt, className, client, width, height, controls, style, }: IPFSMediaRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { LinkNewAccountModalProps } from "../../stores/useModalStore";
|
|
2
|
-
export declare function LinkNewAccount({ onSuccess: onSuccessCallback, onError, onClose, chain, partnerId, className, }: LinkNewAccountModalProps & {
|
|
3
|
-
className?: string;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
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;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
declare const ModalHeader: ({ showBackButton, handleBack, handleClose, title, children, showCloseButton, className, showBackWord, }: {
|
|
2
|
-
showBackButton?: boolean;
|
|
3
|
-
handleBack?: () => void;
|
|
4
|
-
handleClose?: () => void;
|
|
5
|
-
title: string;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
showCloseButton?: boolean;
|
|
8
|
-
className?: string;
|
|
9
|
-
showBackWord?: boolean;
|
|
10
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default ModalHeader;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
interface RecentAddress {
|
|
2
|
-
address: string;
|
|
3
|
-
timestamp: number;
|
|
4
|
-
}
|
|
5
|
-
interface RecentAddressesStore {
|
|
6
|
-
recentAddresses: RecentAddress[];
|
|
7
|
-
addRecentAddress: (address: string) => void;
|
|
8
|
-
clearRecentAddresses: () => void;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Store for managing recently used addresses in the Send flow
|
|
12
|
-
* Persists to localStorage and keeps the last 6 unique addresses
|
|
13
|
-
*/
|
|
14
|
-
export declare const useRecentAddressesStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<RecentAddressesStore>, "persist"> & {
|
|
15
|
-
persist: {
|
|
16
|
-
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<RecentAddressesStore, RecentAddressesStore>>) => void;
|
|
17
|
-
clearStorage: () => void;
|
|
18
|
-
rehydrate: () => Promise<void> | void;
|
|
19
|
-
hasHydrated: () => boolean;
|
|
20
|
-
onHydrate: (fn: (state: RecentAddressesStore) => void) => () => void;
|
|
21
|
-
onFinishHydration: (fn: (state: RecentAddressesStore) => void) => () => void;
|
|
22
|
-
getOptions: () => Partial<import("zustand/middleware").PersistOptions<RecentAddressesStore, RecentAddressesStore>>;
|
|
23
|
-
};
|
|
24
|
-
}>;
|
|
25
|
-
export {};
|