@b3dotfun/sdk 0.0.73 → 0.0.74-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/anyspend/react/components/AnySpend.js +75 -50
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +9 -10
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +41 -41
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +1 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +17 -9
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +7 -8
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +7 -8
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.d.ts +0 -6
- package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +18 -14
- 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/InsufficientDepositPayment.js +6 -6
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +35 -35
- package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +1 -2
- package/dist/cjs/anyspend/react/components/common/OrderHistory.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderHistory.js +7 -3
- package/dist/cjs/anyspend/react/components/common/OrderHistoryItem.js +1 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +4 -4
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +8 -9
- 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/common/TransferCryptoDetails.js +2 -3
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +1 -2
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +12 -12
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +4 -5
- package/dist/cjs/anyspend/react/hooks/useConnectedWalletDisplay.js +3 -2
- package/dist/cjs/anyspend/react/hooks/usePhantomTransfer.js +17 -17
- package/dist/cjs/anyspend/react/utils/toast.d.ts +6 -0
- package/dist/cjs/anyspend/react/utils/toast.js +9 -0
- package/dist/cjs/global-account/react/components/AccountAssets/AccountAssets.js +38 -2
- package/dist/cjs/global-account/react/components/AvatarCreator/AvatarCreator.js +2 -3
- package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.d.ts +1 -0
- package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.js +275 -39
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +40 -13
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +19 -3
- package/dist/cjs/global-account/react/components/Deposit/Deposit.d.ts +1 -0
- package/dist/cjs/global-account/react/components/Deposit/Deposit.js +61 -0
- package/dist/cjs/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +39 -0
- package/dist/cjs/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.js +34 -0
- package/dist/cjs/global-account/react/components/LinkAccount/LinkAccount.d.ts +6 -4
- package/dist/cjs/global-account/react/components/LinkAccount/LinkAccount.js +104 -283
- package/dist/cjs/global-account/react/components/LinkAccount/LinkNewAccount.d.ts +4 -0
- package/dist/cjs/global-account/react/components/LinkAccount/LinkNewAccount.js +320 -0
- package/dist/cjs/global-account/react/components/LinkAccount/LinkedAccountItem.d.ts +16 -0
- package/dist/cjs/global-account/react/components/LinkAccount/LinkedAccountItem.js +44 -0
- package/dist/cjs/global-account/react/components/ManageAccount/BottomNavigation.d.ts +2 -0
- package/dist/cjs/global-account/react/components/ManageAccount/BottomNavigation.js +23 -0
- package/dist/cjs/global-account/react/components/ManageAccount/ContentTokens.js +1 -2
- package/dist/cjs/global-account/react/components/ManageAccount/Header.d.ts +3 -0
- package/dist/cjs/global-account/react/components/ManageAccount/Header.js +120 -0
- package/dist/cjs/global-account/react/components/ManageAccount/HomeActions.d.ts +5 -0
- package/dist/cjs/global-account/react/components/ManageAccount/HomeActions.js +43 -0
- package/dist/cjs/global-account/react/components/ManageAccount/HomeContent.d.ts +6 -0
- package/dist/cjs/global-account/react/components/ManageAccount/HomeContent.js +16 -0
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +16 -194
- package/dist/cjs/global-account/react/components/ManageAccount/NFTContent.d.ts +2 -0
- package/dist/cjs/global-account/react/components/ManageAccount/NFTContent.js +15 -0
- package/dist/cjs/global-account/react/components/ManageAccount/NotificationChannel.d.ts +16 -0
- package/dist/cjs/global-account/react/components/ManageAccount/NotificationChannel.js +13 -0
- package/dist/cjs/global-account/react/components/ManageAccount/NotificationsContent.d.ts +8 -0
- package/dist/cjs/global-account/react/components/ManageAccount/NotificationsContent.js +152 -0
- package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.d.ts +2 -0
- package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +47 -0
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsContent.d.ts +7 -0
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsContent.js +60 -0
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsMenuItem.d.ts +9 -0
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsMenuItem.js +8 -0
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.d.ts +2 -0
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.js +116 -0
- package/dist/cjs/global-account/react/components/ManageAccount/TokenBalanceRow.d.ts +3 -3
- package/dist/cjs/global-account/react/components/ManageAccount/TokenBalanceRow.js +2 -2
- package/dist/cjs/global-account/react/components/ManageAccount/TokenContent.d.ts +2 -0
- package/dist/cjs/global-account/react/components/ManageAccount/TokenContent.js +44 -0
- package/dist/cjs/global-account/react/components/ManageAccount/channels/DiscordChannel.d.ts +11 -0
- package/dist/cjs/global-account/react/components/ManageAccount/channels/DiscordChannel.js +48 -0
- package/dist/cjs/global-account/react/components/ManageAccount/channels/EmailChannel.d.ts +11 -0
- package/dist/cjs/global-account/react/components/ManageAccount/channels/EmailChannel.js +68 -0
- package/dist/cjs/global-account/react/components/ManageAccount/channels/PhoneChannel.d.ts +14 -0
- package/dist/cjs/global-account/react/components/ManageAccount/channels/PhoneChannel.js +79 -0
- package/dist/cjs/global-account/react/components/ManageAccount/channels/TelegramChannel.d.ts +11 -0
- package/dist/cjs/global-account/react/components/ManageAccount/channels/TelegramChannel.js +79 -0
- package/dist/cjs/global-account/react/components/ManageAccount/channels/index.d.ts +4 -0
- package/dist/cjs/global-account/react/components/ManageAccount/channels/index.js +11 -0
- package/dist/cjs/global-account/react/components/ModalHeader/ModalHeader.d.ts +11 -0
- package/dist/cjs/global-account/react/components/ModalHeader/ModalHeader.js +12 -0
- package/dist/cjs/global-account/react/components/Send/Send.d.ts +5 -0
- package/dist/cjs/global-account/react/components/Send/Send.js +195 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +5 -4
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +1 -1
- package/dist/cjs/global-account/react/components/Toast/ToastComponents.d.ts +15 -0
- package/dist/cjs/global-account/react/components/Toast/ToastComponents.js +54 -0
- package/dist/cjs/global-account/react/components/Toast/ToastContext.d.ts +19 -0
- package/dist/cjs/global-account/react/components/Toast/ToastContext.js +59 -0
- package/dist/cjs/global-account/react/components/Toast/index.d.ts +4 -0
- package/dist/cjs/global-account/react/components/Toast/index.js +12 -0
- package/dist/cjs/global-account/react/components/Toast/toastApi.d.ts +21 -0
- package/dist/cjs/global-account/react/components/Toast/toastApi.js +93 -0
- package/dist/cjs/global-account/react/components/WalletImage/WalletImage.d.ts +4 -0
- package/dist/cjs/global-account/react/components/WalletImage/WalletImage.js +13 -0
- package/dist/cjs/global-account/react/components/icons/BellIcon.d.ts +3 -0
- package/dist/cjs/global-account/react/components/icons/BellIcon.js +5 -0
- package/dist/cjs/global-account/react/components/icons/ChevronDownIcon.d.ts +2 -0
- package/dist/cjs/global-account/react/components/icons/ChevronDownIcon.js +7 -0
- package/dist/cjs/global-account/react/components/icons/CopyIcon.d.ts +2 -0
- package/dist/cjs/global-account/react/components/icons/CopyIcon.js +7 -0
- package/dist/cjs/global-account/react/components/icons/LinkIcon.d.ts +3 -0
- package/dist/cjs/global-account/react/components/icons/LinkIcon.js +5 -0
- package/dist/cjs/global-account/react/components/icons/LockIcon.d.ts +3 -0
- package/dist/cjs/global-account/react/components/icons/LockIcon.js +5 -0
- package/dist/cjs/global-account/react/components/icons/WalletIcon.d.ts +2 -0
- package/dist/cjs/global-account/react/components/icons/WalletIcon.js +7 -0
- package/dist/cjs/global-account/react/components/index.d.ts +10 -4
- package/dist/cjs/global-account/react/components/index.js +29 -9
- 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 +3 -2
- package/dist/cjs/global-account/react/hooks/index.js +7 -3
- package/dist/cjs/global-account/react/hooks/useAccountWallet.d.ts +1 -0
- package/dist/cjs/global-account/react/hooks/useAccountWallet.js +18 -0
- package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.js +1 -0
- package/dist/cjs/global-account/react/hooks/useChainSwitchWithAction.js +11 -11
- package/dist/cjs/global-account/react/hooks/useNativeBalance.js +2 -2
- package/dist/cjs/global-account/react/hooks/useNotifications.d.ts +48 -0
- package/dist/cjs/global-account/react/hooks/useNotifications.js +189 -0
- package/dist/cjs/global-account/react/hooks/useSimBalance.js +3 -3
- package/dist/cjs/global-account/react/hooks/useTokenBalanceDirect.d.ts +1 -0
- package/dist/cjs/global-account/react/hooks/useTokenBalanceDirect.js +1 -0
- package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +17 -17
- package/dist/cjs/global-account/react/stores/index.d.ts +1 -0
- package/dist/cjs/global-account/react/stores/index.js +3 -1
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +47 -6
- package/dist/cjs/global-account/react/stores/useRecentAddressesStore.d.ts +25 -0
- package/dist/cjs/global-account/react/stores/useRecentAddressesStore.js +36 -0
- package/dist/cjs/global-account/react/utils/index.d.ts +4 -0
- package/dist/cjs/global-account/react/utils/index.js +20 -0
- package/dist/cjs/global-account/react/utils/notificationsAPI.d.ts +80 -0
- package/dist/cjs/global-account/react/utils/notificationsAPI.js +257 -0
- package/dist/cjs/global-account/react/utils/profileDisplay.d.ts +3 -0
- package/dist/cjs/global-account/react/utils/profileDisplay.js +8 -4
- package/dist/cjs/global-account/react/utils/toast.d.ts +6 -0
- package/dist/cjs/global-account/react/utils/toast.js +9 -0
- package/dist/cjs/shared/constants/chains/supported.d.ts +3 -2
- package/dist/cjs/shared/constants/chains/supported.js +4 -0
- package/dist/cjs/shared/utils/ipfs.js +10 -3
- package/dist/esm/anyspend/react/components/AnySpend.js +67 -42
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +1 -2
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +10 -10
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +1 -0
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +12 -4
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +1 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +1 -2
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.d.ts +0 -6
- package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +9 -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/InsufficientDepositPayment.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +2 -2
- package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +1 -2
- package/dist/esm/anyspend/react/components/common/OrderHistory.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/OrderHistory.js +6 -5
- package/dist/esm/anyspend/react/components/common/OrderHistoryItem.js +2 -2
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +4 -4
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +2 -3
- 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/common/TransferCryptoDetails.js +1 -2
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +1 -2
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +1 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +1 -2
- package/dist/esm/anyspend/react/hooks/useConnectedWalletDisplay.js +3 -2
- package/dist/esm/anyspend/react/hooks/usePhantomTransfer.js +1 -1
- package/dist/esm/anyspend/react/utils/toast.d.ts +6 -0
- package/dist/esm/anyspend/react/utils/toast.js +5 -0
- package/dist/esm/global-account/react/components/AccountAssets/AccountAssets.js +38 -2
- package/dist/esm/global-account/react/components/AvatarCreator/AvatarCreator.js +1 -2
- package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.d.ts +1 -0
- package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.js +276 -40
- package/dist/esm/global-account/react/components/B3DynamicModal.js +37 -13
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +19 -3
- package/dist/esm/global-account/react/components/Deposit/Deposit.d.ts +1 -0
- package/dist/esm/global-account/react/components/Deposit/Deposit.js +55 -0
- package/dist/esm/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +39 -0
- package/dist/esm/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.js +31 -0
- package/dist/esm/global-account/react/components/LinkAccount/LinkAccount.d.ts +6 -4
- package/dist/esm/global-account/react/components/LinkAccount/LinkAccount.js +103 -283
- package/dist/esm/global-account/react/components/LinkAccount/LinkNewAccount.d.ts +4 -0
- package/dist/esm/global-account/react/components/LinkAccount/LinkNewAccount.js +314 -0
- package/dist/esm/global-account/react/components/LinkAccount/LinkedAccountItem.d.ts +16 -0
- package/dist/esm/global-account/react/components/LinkAccount/LinkedAccountItem.js +42 -0
- package/dist/esm/global-account/react/components/ManageAccount/BottomNavigation.d.ts +2 -0
- package/dist/esm/global-account/react/components/ManageAccount/BottomNavigation.js +21 -0
- package/dist/esm/global-account/react/components/ManageAccount/ContentTokens.js +1 -2
- package/dist/esm/global-account/react/components/ManageAccount/Header.d.ts +3 -0
- package/dist/esm/global-account/react/components/ManageAccount/Header.js +81 -0
- package/dist/esm/global-account/react/components/ManageAccount/HomeActions.d.ts +5 -0
- package/dist/esm/global-account/react/components/ManageAccount/HomeActions.js +41 -0
- package/dist/esm/global-account/react/components/ManageAccount/HomeContent.d.ts +6 -0
- package/dist/esm/global-account/react/components/ManageAccount/HomeContent.js +10 -0
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +18 -196
- package/dist/esm/global-account/react/components/ManageAccount/NFTContent.d.ts +2 -0
- package/dist/esm/global-account/react/components/ManageAccount/NFTContent.js +13 -0
- package/dist/esm/global-account/react/components/ManageAccount/NotificationChannel.d.ts +16 -0
- package/dist/esm/global-account/react/components/ManageAccount/NotificationChannel.js +9 -0
- package/dist/esm/global-account/react/components/ManageAccount/NotificationsContent.d.ts +8 -0
- package/dist/esm/global-account/react/components/ManageAccount/NotificationsContent.js +147 -0
- package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.d.ts +2 -0
- package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +45 -0
- package/dist/esm/global-account/react/components/ManageAccount/SettingsContent.d.ts +7 -0
- package/dist/esm/global-account/react/components/ManageAccount/SettingsContent.js +55 -0
- package/dist/esm/global-account/react/components/ManageAccount/SettingsMenuItem.d.ts +9 -0
- package/dist/esm/global-account/react/components/ManageAccount/SettingsMenuItem.js +6 -0
- package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.d.ts +2 -0
- package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.js +111 -0
- package/dist/esm/global-account/react/components/ManageAccount/TokenBalanceRow.d.ts +3 -3
- package/dist/esm/global-account/react/components/ManageAccount/TokenBalanceRow.js +3 -3
- package/dist/esm/global-account/react/components/ManageAccount/TokenContent.d.ts +2 -0
- package/dist/esm/global-account/react/components/ManageAccount/TokenContent.js +42 -0
- package/dist/esm/global-account/react/components/ManageAccount/channels/DiscordChannel.d.ts +11 -0
- package/dist/esm/global-account/react/components/ManageAccount/channels/DiscordChannel.js +44 -0
- package/dist/esm/global-account/react/components/ManageAccount/channels/EmailChannel.d.ts +11 -0
- package/dist/esm/global-account/react/components/ManageAccount/channels/EmailChannel.js +64 -0
- package/dist/esm/global-account/react/components/ManageAccount/channels/PhoneChannel.d.ts +14 -0
- package/dist/esm/global-account/react/components/ManageAccount/channels/PhoneChannel.js +75 -0
- package/dist/esm/global-account/react/components/ManageAccount/channels/TelegramChannel.d.ts +11 -0
- package/dist/esm/global-account/react/components/ManageAccount/channels/TelegramChannel.js +75 -0
- package/dist/esm/global-account/react/components/ManageAccount/channels/index.d.ts +4 -0
- package/dist/esm/global-account/react/components/ManageAccount/channels/index.js +4 -0
- package/dist/esm/global-account/react/components/ModalHeader/ModalHeader.d.ts +11 -0
- package/dist/esm/global-account/react/components/ModalHeader/ModalHeader.js +10 -0
- package/dist/esm/global-account/react/components/Send/Send.d.ts +5 -0
- package/dist/esm/global-account/react/components/Send/Send.js +189 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +7 -6
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +1 -1
- package/dist/esm/global-account/react/components/Toast/ToastComponents.d.ts +15 -0
- package/dist/esm/global-account/react/components/Toast/ToastComponents.js +50 -0
- package/dist/esm/global-account/react/components/Toast/ToastContext.d.ts +19 -0
- package/dist/esm/global-account/react/components/Toast/ToastContext.js +55 -0
- package/dist/esm/global-account/react/components/Toast/index.d.ts +4 -0
- package/dist/esm/global-account/react/components/Toast/index.js +3 -0
- package/dist/esm/global-account/react/components/Toast/toastApi.d.ts +21 -0
- package/dist/esm/global-account/react/components/Toast/toastApi.js +89 -0
- package/dist/esm/global-account/react/components/WalletImage/WalletImage.d.ts +4 -0
- package/dist/esm/global-account/react/components/WalletImage/WalletImage.js +11 -0
- package/dist/esm/global-account/react/components/icons/BellIcon.d.ts +3 -0
- package/dist/esm/global-account/react/components/icons/BellIcon.js +3 -0
- package/dist/esm/global-account/react/components/icons/ChevronDownIcon.d.ts +2 -0
- package/dist/esm/global-account/react/components/icons/ChevronDownIcon.js +4 -0
- package/dist/esm/global-account/react/components/icons/CopyIcon.d.ts +2 -0
- package/dist/esm/global-account/react/components/icons/CopyIcon.js +4 -0
- package/dist/esm/global-account/react/components/icons/LinkIcon.d.ts +3 -0
- package/dist/esm/global-account/react/components/icons/LinkIcon.js +3 -0
- package/dist/esm/global-account/react/components/icons/LockIcon.d.ts +3 -0
- package/dist/esm/global-account/react/components/icons/LockIcon.js +3 -0
- package/dist/esm/global-account/react/components/icons/WalletIcon.d.ts +2 -0
- package/dist/esm/global-account/react/components/icons/WalletIcon.js +4 -0
- package/dist/esm/global-account/react/components/index.d.ts +10 -4
- package/dist/esm/global-account/react/components/index.js +14 -5
- 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 +3 -2
- package/dist/esm/global-account/react/hooks/index.js +3 -2
- package/dist/esm/global-account/react/hooks/useAccountWallet.d.ts +1 -0
- package/dist/esm/global-account/react/hooks/useAccountWallet.js +17 -0
- package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.js +1 -0
- package/dist/esm/global-account/react/hooks/useChainSwitchWithAction.js +2 -2
- package/dist/esm/global-account/react/hooks/useNativeBalance.js +1 -1
- package/dist/esm/global-account/react/hooks/useNotifications.d.ts +48 -0
- package/dist/esm/global-account/react/hooks/useNotifications.js +186 -0
- package/dist/esm/global-account/react/hooks/useSimBalance.js +3 -3
- package/dist/esm/global-account/react/hooks/useTokenBalanceDirect.d.ts +1 -0
- package/dist/esm/global-account/react/hooks/useTokenBalanceDirect.js +1 -0
- package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +2 -2
- package/dist/esm/global-account/react/stores/index.d.ts +1 -0
- package/dist/esm/global-account/react/stores/index.js +1 -0
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +47 -6
- package/dist/esm/global-account/react/stores/useRecentAddressesStore.d.ts +25 -0
- package/dist/esm/global-account/react/stores/useRecentAddressesStore.js +33 -0
- package/dist/esm/global-account/react/utils/index.d.ts +4 -0
- package/dist/esm/global-account/react/utils/index.js +4 -0
- package/dist/esm/global-account/react/utils/notificationsAPI.d.ts +80 -0
- package/dist/esm/global-account/react/utils/notificationsAPI.js +254 -0
- package/dist/esm/global-account/react/utils/profileDisplay.d.ts +3 -0
- package/dist/esm/global-account/react/utils/profileDisplay.js +8 -4
- package/dist/esm/global-account/react/utils/toast.d.ts +6 -0
- package/dist/esm/global-account/react/utils/toast.js +5 -0
- package/dist/esm/shared/constants/chains/supported.d.ts +3 -2
- package/dist/esm/shared/constants/chains/supported.js +3 -0
- package/dist/esm/shared/utils/ipfs.js +10 -3
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +1 -0
- package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/types/anyspend/react/components/common/CryptoPaymentMethod.d.ts +0 -6
- package/dist/types/anyspend/react/components/common/OrderHistory.d.ts +1 -1
- package/dist/types/anyspend/react/utils/toast.d.ts +6 -0
- package/dist/types/global-account/react/components/AvatarEditor/AvatarEditor.d.ts +1 -0
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
- package/dist/types/global-account/react/components/Deposit/Deposit.d.ts +1 -0
- package/dist/types/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +39 -0
- package/dist/types/global-account/react/components/LinkAccount/LinkAccount.d.ts +6 -4
- package/dist/types/global-account/react/components/LinkAccount/LinkNewAccount.d.ts +4 -0
- package/dist/types/global-account/react/components/LinkAccount/LinkedAccountItem.d.ts +16 -0
- package/dist/types/global-account/react/components/ManageAccount/BottomNavigation.d.ts +2 -0
- package/dist/types/global-account/react/components/ManageAccount/Header.d.ts +3 -0
- package/dist/types/global-account/react/components/ManageAccount/HomeActions.d.ts +5 -0
- package/dist/types/global-account/react/components/ManageAccount/HomeContent.d.ts +6 -0
- package/dist/types/global-account/react/components/ManageAccount/NFTContent.d.ts +2 -0
- package/dist/types/global-account/react/components/ManageAccount/NotificationChannel.d.ts +16 -0
- package/dist/types/global-account/react/components/ManageAccount/NotificationsContent.d.ts +8 -0
- package/dist/types/global-account/react/components/ManageAccount/ProfileSection.d.ts +2 -0
- package/dist/types/global-account/react/components/ManageAccount/SettingsContent.d.ts +7 -0
- package/dist/types/global-account/react/components/ManageAccount/SettingsMenuItem.d.ts +9 -0
- package/dist/types/global-account/react/components/ManageAccount/SettingsProfileCard.d.ts +2 -0
- package/dist/types/global-account/react/components/ManageAccount/TokenBalanceRow.d.ts +3 -3
- package/dist/types/global-account/react/components/ManageAccount/TokenContent.d.ts +2 -0
- package/dist/types/global-account/react/components/ManageAccount/channels/DiscordChannel.d.ts +11 -0
- package/dist/types/global-account/react/components/ManageAccount/channels/EmailChannel.d.ts +11 -0
- package/dist/types/global-account/react/components/ManageAccount/channels/PhoneChannel.d.ts +14 -0
- package/dist/types/global-account/react/components/ManageAccount/channels/TelegramChannel.d.ts +11 -0
- package/dist/types/global-account/react/components/ManageAccount/channels/index.d.ts +4 -0
- package/dist/types/global-account/react/components/ModalHeader/ModalHeader.d.ts +11 -0
- package/dist/types/global-account/react/components/Send/Send.d.ts +5 -0
- package/dist/types/global-account/react/components/Toast/ToastComponents.d.ts +15 -0
- package/dist/types/global-account/react/components/Toast/ToastContext.d.ts +19 -0
- package/dist/types/global-account/react/components/Toast/index.d.ts +4 -0
- package/dist/types/global-account/react/components/Toast/toastApi.d.ts +21 -0
- package/dist/types/global-account/react/components/WalletImage/WalletImage.d.ts +4 -0
- package/dist/types/global-account/react/components/icons/BellIcon.d.ts +3 -0
- package/dist/types/global-account/react/components/icons/ChevronDownIcon.d.ts +2 -0
- package/dist/types/global-account/react/components/icons/CopyIcon.d.ts +2 -0
- package/dist/types/global-account/react/components/icons/LinkIcon.d.ts +3 -0
- package/dist/types/global-account/react/components/icons/LockIcon.d.ts +3 -0
- package/dist/types/global-account/react/components/icons/WalletIcon.d.ts +2 -0
- package/dist/types/global-account/react/components/index.d.ts +10 -4
- package/dist/types/global-account/react/hooks/index.d.ts +3 -2
- package/dist/types/global-account/react/hooks/useAccountWallet.d.ts +1 -0
- package/dist/types/global-account/react/hooks/useNotifications.d.ts +48 -0
- package/dist/types/global-account/react/hooks/useTokenBalanceDirect.d.ts +1 -0
- package/dist/types/global-account/react/stores/index.d.ts +1 -0
- package/dist/types/global-account/react/stores/useModalStore.d.ts +47 -6
- package/dist/types/global-account/react/stores/useRecentAddressesStore.d.ts +25 -0
- package/dist/types/global-account/react/utils/index.d.ts +4 -0
- package/dist/types/global-account/react/utils/notificationsAPI.d.ts +80 -0
- package/dist/types/global-account/react/utils/profileDisplay.d.ts +3 -0
- package/dist/types/global-account/react/utils/toast.d.ts +6 -0
- package/dist/types/shared/constants/chains/supported.d.ts +3 -2
- package/package.json +2 -1
- package/src/anyspend/react/components/AnySpend.tsx +213 -173
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +2 -1
- package/src/anyspend/react/components/AnySpendCustom.tsx +80 -77
- package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +20 -4
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +2 -1
- package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +2 -1
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +3 -0
- package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +56 -22
- 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/InsufficientDepositPayment.tsx +1 -1
- package/src/anyspend/react/components/common/OrderDetails.tsx +6 -2
- package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +2 -2
- package/src/anyspend/react/components/common/OrderHistory.tsx +8 -13
- package/src/anyspend/react/components/common/OrderHistoryItem.tsx +69 -25
- package/src/anyspend/react/components/common/PanelOnramp.tsx +6 -4
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +3 -3
- 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/common/TransferCryptoDetails.tsx +2 -2
- package/src/anyspend/react/components/webview/WebviewOnrampOrderStatus.tsx +3 -3
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +2 -1
- package/src/anyspend/react/hooks/useAnyspendFlow.ts +2 -1
- package/src/anyspend/react/hooks/useConnectedWalletDisplay.ts +3 -2
- package/src/anyspend/react/hooks/usePhantomTransfer.ts +1 -1
- package/src/anyspend/react/utils/toast.ts +6 -0
- package/src/global-account/react/components/AccountAssets/AccountAssets.tsx +115 -25
- package/src/global-account/react/components/AvatarCreator/AvatarCreator.tsx +2 -2
- package/src/global-account/react/components/AvatarEditor/AvatarEditor.tsx +491 -130
- package/src/global-account/react/components/B3DynamicModal.tsx +76 -17
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +40 -20
- package/src/global-account/react/components/Deposit/Deposit.tsx +208 -0
- package/src/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.tsx +84 -0
- package/src/global-account/react/components/LinkAccount/LinkAccount.tsx +269 -434
- package/src/global-account/react/components/LinkAccount/LinkNewAccount.tsx +480 -0
- package/src/global-account/react/components/LinkAccount/LinkedAccountItem.tsx +135 -0
- package/src/global-account/react/components/ManageAccount/BottomNavigation.tsx +83 -0
- package/src/global-account/react/components/ManageAccount/ContentTokens.tsx +2 -1
- package/src/global-account/react/components/ManageAccount/Header.tsx +230 -0
- package/src/global-account/react/components/ManageAccount/HomeActions.tsx +118 -0
- package/src/global-account/react/components/ManageAccount/HomeContent.tsx +42 -0
- package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +74 -597
- package/src/global-account/react/components/ManageAccount/NFTContent.tsx +24 -0
- package/src/global-account/react/components/ManageAccount/NotificationChannel.tsx +94 -0
- package/src/global-account/react/components/ManageAccount/NotificationsContent.tsx +268 -0
- package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +79 -0
- package/src/global-account/react/components/ManageAccount/SettingsContent.tsx +106 -0
- package/src/global-account/react/components/ManageAccount/SettingsMenuItem.tsx +31 -0
- package/src/global-account/react/components/ManageAccount/SettingsProfileCard.tsx +197 -0
- package/src/global-account/react/components/ManageAccount/TokenBalanceRow.tsx +20 -5
- package/src/global-account/react/components/ManageAccount/TokenContent.tsx +66 -0
- package/src/global-account/react/components/ManageAccount/channels/DiscordChannel.tsx +119 -0
- package/src/global-account/react/components/ManageAccount/channels/EmailChannel.tsx +168 -0
- package/src/global-account/react/components/ManageAccount/channels/PhoneChannel.tsx +227 -0
- package/src/global-account/react/components/ManageAccount/channels/TelegramChannel.tsx +150 -0
- package/src/global-account/react/components/ManageAccount/channels/index.ts +4 -0
- package/src/global-account/react/components/ModalHeader/ModalHeader.tsx +61 -0
- package/src/global-account/react/components/Send/Send.tsx +621 -0
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +13 -12
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +1 -1
- package/src/global-account/react/components/Toast/README.md +350 -0
- package/src/global-account/react/components/Toast/ToastComponents.tsx +159 -0
- package/src/global-account/react/components/Toast/ToastContext.tsx +86 -0
- package/src/global-account/react/components/Toast/index.ts +4 -0
- package/src/global-account/react/components/Toast/toastApi.ts +98 -0
- package/src/global-account/react/components/WalletImage/WalletImage.tsx +12 -0
- package/src/global-account/react/components/icons/BellIcon.tsx +15 -0
- package/src/global-account/react/components/icons/ChevronDownIcon.tsx +17 -0
- package/src/global-account/react/components/icons/CopyIcon.tsx +22 -0
- package/src/global-account/react/components/icons/LinkIcon.tsx +15 -0
- package/src/global-account/react/components/icons/LockIcon.tsx +15 -0
- package/src/global-account/react/components/icons/WalletIcon.tsx +21 -0
- package/src/global-account/react/components/index.ts +19 -5
- package/src/global-account/react/components/ui/Tabs.tsx +5 -13
- package/src/global-account/react/components/ui/dialog.tsx +23 -14
- package/src/global-account/react/components/ui/drawer.tsx +1 -1
- package/src/global-account/react/hooks/index.ts +5 -1
- package/src/global-account/react/hooks/useAccountWallet.tsx +26 -0
- package/src/global-account/react/hooks/useB3BalanceFromAddresses.ts +1 -0
- package/src/global-account/react/hooks/useChainSwitchWithAction.ts +3 -2
- package/src/global-account/react/hooks/useNativeBalance.tsx +2 -1
- package/src/global-account/react/hooks/useNotifications.ts +229 -0
- package/src/global-account/react/hooks/useSimBalance.ts +3 -3
- package/src/global-account/react/hooks/useTokenBalanceDirect.tsx +2 -0
- package/src/global-account/react/hooks/useUnifiedChainSwitchAndExecute.ts +3 -2
- package/src/global-account/react/stores/index.ts +1 -0
- package/src/global-account/react/stores/useModalStore.ts +53 -6
- package/src/global-account/react/stores/useRecentAddressesStore.ts +54 -0
- package/src/global-account/react/utils/index.ts +4 -0
- package/src/global-account/react/utils/notificationsAPI.ts +305 -0
- package/src/global-account/react/utils/profileDisplay.ts +12 -4
- package/src/global-account/react/utils/toast.ts +6 -0
- package/src/shared/constants/chains/supported.ts +4 -0
- package/src/shared/utils/ipfs.ts +10 -3
- package/src/styles/index.css +12 -1
- package/dist/cjs/global-account/react/components/ManageAccount/BalanceContent.d.ts +0 -7
- package/dist/cjs/global-account/react/components/ManageAccount/BalanceContent.js +0 -107
- package/dist/cjs/global-account/react/components/ProfileEditor/ProfileEditor.d.ts +0 -6
- package/dist/cjs/global-account/react/components/ProfileEditor/ProfileEditor.js +0 -151
- package/dist/esm/global-account/react/components/ManageAccount/BalanceContent.d.ts +0 -7
- package/dist/esm/global-account/react/components/ManageAccount/BalanceContent.js +0 -104
- package/dist/esm/global-account/react/components/ProfileEditor/ProfileEditor.d.ts +0 -6
- package/dist/esm/global-account/react/components/ProfileEditor/ProfileEditor.js +0 -145
- package/dist/types/global-account/react/components/ManageAccount/BalanceContent.d.ts +0 -7
- package/dist/types/global-account/react/components/ProfileEditor/ProfileEditor.d.ts +0 -6
- package/src/global-account/react/components/ManageAccount/BalanceContent.tsx +0 -258
- package/src/global-account/react/components/ProfileEditor/ProfileEditor.tsx +0 -279
|
@@ -0,0 +1,189 @@
|
|
|
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 { toast, useAccountWallet, useAnalytics, useModalStore, useProfile, 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 { encodeFunctionData, erc20Abi, isAddress, parseUnits } from "viem";
|
|
11
|
+
import { useRecentAddressesStore } from "../../stores/useRecentAddressesStore.js";
|
|
12
|
+
import ModalHeader from "../ModalHeader/ModalHeader.js";
|
|
13
|
+
import { Button } from "../ui/button.js";
|
|
14
|
+
// Component for displaying a recent address with profile data
|
|
15
|
+
function RecentAddressItem({ address, onClick }) {
|
|
16
|
+
const { data: profileData } = useProfile({ address });
|
|
17
|
+
return (_jsxs("button", { onClick: onClick, className: "flex items-center gap-2 rounded-xl px-3 py-2 transition-colors hover:bg-[#fafafa]", children: [profileData?.avatar ? (_jsx("img", { src: profileData.avatar, alt: profileData.name || address, className: "h-10 w-10 rounded-full" })) : (_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]" }) })), _jsx("div", { className: "flex flex-col items-start", children: _jsxs("span", { className: "font-neue-montreal-medium text-base tracking-[-0.32px] text-[#70707b]", children: [address.slice(0, 6), "...", address.slice(-4), profileData?.name && ` (${profileData.name})`] }) })] }));
|
|
18
|
+
}
|
|
19
|
+
export function Send({ recipientAddress: initialRecipient, onSuccess }) {
|
|
20
|
+
const { address } = useAccountWallet();
|
|
21
|
+
const navigateBack = useModalStore(state => state.navigateBack);
|
|
22
|
+
const setB3ModalOpen = useModalStore(state => state.setB3ModalOpen);
|
|
23
|
+
// Wizard state
|
|
24
|
+
const [step, setStep] = useState("recipient");
|
|
25
|
+
const [selectedToken, setSelectedToken] = useState(null);
|
|
26
|
+
const [recipientAddress, setRecipientAddress] = useState(initialRecipient || "");
|
|
27
|
+
const [sendAmount, setSendAmount] = useState("");
|
|
28
|
+
const [isSending, setIsSending] = useState(false);
|
|
29
|
+
const [addressError, setAddressError] = useState("");
|
|
30
|
+
const [showValidatedResult, setShowValidatedResult] = useState(false);
|
|
31
|
+
// Hooks
|
|
32
|
+
const { data: simBalance, refetch: refetchSimBalance, isLoading: isLoadingBalance } = useSimBalance(address);
|
|
33
|
+
const { switchChainAndExecute } = useUnifiedChainSwitchAndExecute();
|
|
34
|
+
const { sendAnalyticsEvent } = useAnalytics();
|
|
35
|
+
// Recent addresses store
|
|
36
|
+
const recentAddresses = useRecentAddressesStore(state => state.recentAddresses);
|
|
37
|
+
const addRecentAddress = useRecentAddressesStore(state => state.addRecentAddress);
|
|
38
|
+
// Fetch profile data for validated address
|
|
39
|
+
const { data: validatedProfileData } = useProfile({
|
|
40
|
+
address: showValidatedResult && recipientAddress && isAddress(recipientAddress) ? recipientAddress : undefined,
|
|
41
|
+
});
|
|
42
|
+
// Address validation
|
|
43
|
+
const handleRecipientAddressChange = (value) => {
|
|
44
|
+
setRecipientAddress(value);
|
|
45
|
+
setShowValidatedResult(false);
|
|
46
|
+
if (value && !isAddress(value)) {
|
|
47
|
+
setAddressError("Please enter a valid EVM address (0x...)");
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
setAddressError("");
|
|
51
|
+
if (value && isAddress(value)) {
|
|
52
|
+
setShowValidatedResult(true);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
// Paste from clipboard
|
|
57
|
+
const handlePaste = async () => {
|
|
58
|
+
try {
|
|
59
|
+
const text = await navigator.clipboard.readText();
|
|
60
|
+
const trimmedText = text.trim();
|
|
61
|
+
setRecipientAddress(trimmedText);
|
|
62
|
+
if (trimmedText && isAddress(trimmedText)) {
|
|
63
|
+
setAddressError("");
|
|
64
|
+
setShowValidatedResult(true);
|
|
65
|
+
}
|
|
66
|
+
else if (trimmedText) {
|
|
67
|
+
setAddressError("Please enter a valid EVM address (0x...)");
|
|
68
|
+
setShowValidatedResult(false);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
toast.error("Failed to read clipboard");
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
// Handle clicking on the validated result to proceed
|
|
76
|
+
const handleSelectValidatedAddress = () => {
|
|
77
|
+
if (recipientAddress && isAddress(recipientAddress)) {
|
|
78
|
+
addRecentAddress(recipientAddress);
|
|
79
|
+
setStep("token");
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
// Go to previous step
|
|
83
|
+
const handleBack = () => {
|
|
84
|
+
if (step === "token")
|
|
85
|
+
setStep("recipient");
|
|
86
|
+
else if (step === "amount")
|
|
87
|
+
setStep("token");
|
|
88
|
+
else if (step === "confirm")
|
|
89
|
+
setStep("amount");
|
|
90
|
+
else
|
|
91
|
+
navigateBack();
|
|
92
|
+
};
|
|
93
|
+
// Get current selected token from fresh balance
|
|
94
|
+
const getCurrentSelectedToken = () => {
|
|
95
|
+
if (!selectedToken || !simBalance?.balances) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
const found = simBalance.balances.find(token => token.chain_id === selectedToken.chain_id && token.address === selectedToken.address);
|
|
99
|
+
return found || null;
|
|
100
|
+
};
|
|
101
|
+
// Percentage button handler
|
|
102
|
+
const handlePercentageClick = (percentage) => {
|
|
103
|
+
const currentToken = getCurrentSelectedToken();
|
|
104
|
+
if (currentToken) {
|
|
105
|
+
const tokenBalance = (BigInt(currentToken.amount) * BigInt(percentage)) / BigInt(100);
|
|
106
|
+
const amount = formatTokenAmount(tokenBalance, currentToken.decimals, 30, false);
|
|
107
|
+
setSendAmount(amount);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
// Send transaction
|
|
111
|
+
const handleSend = async () => {
|
|
112
|
+
const sendAmountWithoutCommas = sendAmount.replace(/,/g, "");
|
|
113
|
+
const currentToken = getCurrentSelectedToken();
|
|
114
|
+
if (!currentToken || !recipientAddress || !sendAmount || parseFloat(sendAmountWithoutCommas) <= 0) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
setIsSending(true);
|
|
118
|
+
const amountInWei = parseUnits(sendAmountWithoutCommas, currentToken.decimals);
|
|
119
|
+
const analyticsData = {
|
|
120
|
+
amount: sendAmount,
|
|
121
|
+
symbol: currentToken.symbol,
|
|
122
|
+
chain_id: currentToken.chain_id,
|
|
123
|
+
address: currentToken.address,
|
|
124
|
+
};
|
|
125
|
+
try {
|
|
126
|
+
invariant(isAddress(recipientAddress), "Recipient address is not a valid address");
|
|
127
|
+
const sendTokenData = encodeFunctionData({
|
|
128
|
+
abi: erc20Abi,
|
|
129
|
+
functionName: "transfer",
|
|
130
|
+
args: [recipientAddress, amountInWei],
|
|
131
|
+
});
|
|
132
|
+
const tx = await switchChainAndExecute(currentToken.chain_id, {
|
|
133
|
+
to: currentToken.address === "native" ? recipientAddress : currentToken.address,
|
|
134
|
+
data: sendTokenData,
|
|
135
|
+
value: currentToken.address === "native" ? amountInWei : BigInt(0),
|
|
136
|
+
});
|
|
137
|
+
if (tx) {
|
|
138
|
+
sendAnalyticsEvent("send_token_button_click", {
|
|
139
|
+
...analyticsData,
|
|
140
|
+
success: true,
|
|
141
|
+
tx: getExplorerTxUrl(currentToken.chain_id, tx),
|
|
142
|
+
});
|
|
143
|
+
setStep("success");
|
|
144
|
+
toast.success(`Successfully sent ${sendAmount} ${currentToken.symbol}`);
|
|
145
|
+
if (onSuccess) {
|
|
146
|
+
onSuccess(tx);
|
|
147
|
+
}
|
|
148
|
+
setTimeout(async () => {
|
|
149
|
+
await refetchSimBalance();
|
|
150
|
+
}, 1000);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
sendAnalyticsEvent("send_token_button_click", {
|
|
155
|
+
...analyticsData,
|
|
156
|
+
success: false,
|
|
157
|
+
reason: error.message || "Unknown error",
|
|
158
|
+
});
|
|
159
|
+
toast.error(`Failed to send ${currentToken.symbol}: ${error.message || "Unknown error"}`);
|
|
160
|
+
}
|
|
161
|
+
finally {
|
|
162
|
+
setIsSending(false);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
// Get step title
|
|
166
|
+
const getStepTitle = () => {
|
|
167
|
+
switch (step) {
|
|
168
|
+
case "recipient":
|
|
169
|
+
return "Select Recipient";
|
|
170
|
+
case "token":
|
|
171
|
+
return "Select Token";
|
|
172
|
+
case "amount":
|
|
173
|
+
return "Enter Amount";
|
|
174
|
+
case "confirm":
|
|
175
|
+
return "Confirm";
|
|
176
|
+
case "success":
|
|
177
|
+
return "Sent!";
|
|
178
|
+
default:
|
|
179
|
+
return "Send";
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
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: [validatedProfileData?.avatar ? (_jsx("img", { src: validatedProfileData.avatar, alt: validatedProfileData.name || recipientAddress, className: "h-10 w-10 rounded-full" })) : (_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), validatedProfileData?.name && ` (${validatedProfileData.name})`] })] })] })), 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) => (_jsx(RecentAddressItem, { address: recent.address, onClick: () => {
|
|
183
|
+
// Just fill the input and show validation - don't auto-proceed
|
|
184
|
+
handleRecipientAddressChange(recent.address);
|
|
185
|
+
} }, 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: () => {
|
|
186
|
+
setSelectedToken(token);
|
|
187
|
+
setStep("amount");
|
|
188
|
+
}, 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" })] }))] })] }));
|
|
189
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { SignInWithB3, StyleRoot, useAccountWallet, useAuthentication, useB3, useIsMobile, } from "../../../../global-account/react/index.js";
|
|
2
|
+
import { IPFSMediaRenderer, SignInWithB3, StyleRoot, useAccountWallet, useAuthentication, useB3, useIsMobile, } from "../../../../global-account/react/index.js";
|
|
3
3
|
import Icon from "../../../../global-account/react/components/custom/Icon.js";
|
|
4
4
|
import { ecosystemWalletId } from "../../../../shared/constants/index.js";
|
|
5
5
|
import { cn, truncateAddress } from "../../../../shared/utils/index.js";
|
|
6
6
|
import { Menu, MenuButton, MenuItems, Transition } from "@headlessui/react";
|
|
7
7
|
import { useEffect } from "react";
|
|
8
|
-
import { useConnectedWallets, useSetActiveWallet
|
|
8
|
+
import { useConnectedWallets, useSetActiveWallet } from "thirdweb/react";
|
|
9
|
+
import { useAccountWalletImage } from "../../hooks/useAccountWallet.js";
|
|
9
10
|
import { ManageAccountButton } from "../custom/ManageAccountButton.js";
|
|
10
11
|
export function SignIn(props) {
|
|
11
12
|
const { className } = props;
|
|
12
13
|
const { automaticallySetFirstEoa, partnerId } = useB3();
|
|
13
|
-
const {
|
|
14
|
+
const { address: globalAddress, ensName, connectedSmartWallet, connectedEOAWallet, isActiveSmartWallet, isActiveEOAWallet, smartWalletIcon, eoaWalletIcon, } = useAccountWallet();
|
|
14
15
|
const isMobile = useIsMobile();
|
|
15
16
|
const { logout } = useAuthentication(partnerId);
|
|
16
17
|
const onDisconnect = async () => {
|
|
17
18
|
await logout();
|
|
18
19
|
};
|
|
19
20
|
const connectedWallets = useConnectedWallets();
|
|
20
|
-
const { data: walletInfo } = useWalletInfo(isActiveSmartWallet ? connectedSmartWallet?.id : connectedEOAWallet?.id);
|
|
21
21
|
const setActiveWallet = useSetActiveWallet();
|
|
22
22
|
const handleSetActiveAccount = (selectedWalletId) => {
|
|
23
23
|
if (!selectedWalletId ||
|
|
@@ -34,10 +34,11 @@ export function SignIn(props) {
|
|
|
34
34
|
setActiveWallet(connectedEOAWallet);
|
|
35
35
|
}
|
|
36
36
|
}, [connectedEOAWallet, isActiveEOAWallet, setActiveWallet, automaticallySetFirstEoa]);
|
|
37
|
+
const walletImage = useAccountWalletImage();
|
|
37
38
|
// Desktop version - original dropdown menu
|
|
38
|
-
return (_jsx(StyleRoot, { children: _jsx(Menu, { className: `relative flex items-center ${className || ""}`, as: "div", children: globalAddress ? (_jsxs(_Fragment, { children: [_jsxs(MenuButton, { className: "bg-b3-react-background group flex h-10 items-center gap-1 rounded-xl px-3", children: [!!
|
|
39
|
+
return (_jsx(StyleRoot, { children: _jsx(Menu, { className: `relative flex items-center ${className || ""}`, as: "div", children: globalAddress ? (_jsxs(_Fragment, { children: [_jsxs(MenuButton, { className: "bg-b3-react-background group flex h-10 items-center gap-1 rounded-xl px-3 focus:outline-none", children: [!!walletImage && (_jsx(IPFSMediaRenderer, { src: walletImage, alt: "Wallet Image", className: "bg-b3-react-primary h-6 w-6 rounded-full object-cover opacity-100" })), _jsx("div", { className: "text-as-primary", children: ensName ? ensName : truncateAddress(globalAddress) })] }), _jsx(Transition, { enter: "duration-200 ease-out", enterFrom: "scale-95 opacity-0", enterTo: "scale-100 opacity-100", leave: "duration-300 ease-out", leaveFrom: "scale-100 opacity-100", leaveTo: "scale-95 opacity-0", children: _jsx(MenuItems, { className: "b3-root absolute -right-4 top-full min-w-64 rounded-2xl border focus:outline-none lg:right-0", modal: false,
|
|
39
40
|
// TODO: Figure out why setting anchor on mobile causes z-index issues where it appears under elements
|
|
40
|
-
anchor: isMobile ? "top end" : undefined, children: _jsxs("div", { className: "bg-b3-react-background", children: [connectedEOAWallet ? (_jsxs("div", { className: cn("border-b3-react-subtle bg-b3-react-background flex cursor-pointer items-center justify-between rounded-xl p-3"), onClick: () => handleSetActiveAccount(connectedEOAWallet?.id), children: [_jsxs("div", { className: "flex items-center", children: [_jsx("img", { className: "bg-b3-react-primary h-16 w-16 rounded-full opacity-100", src: eoaWalletIcon, alt: connectedEOAWallet?.id }), _jsxs("div", { className: "ml-4 grow", children: [ensName && _jsx("div", { children: ensName }), _jsx("div", { children: truncateAddress(globalAddress) })
|
|
41
|
+
anchor: isMobile ? "top end" : undefined, children: _jsxs("div", { className: "bg-b3-react-background", children: [connectedEOAWallet ? (_jsxs("div", { className: cn("border-b3-react-subtle bg-b3-react-background flex cursor-pointer items-center justify-between rounded-xl p-3"), onClick: () => handleSetActiveAccount(connectedEOAWallet?.id), children: [_jsxs("div", { className: "flex items-center", children: [_jsx("img", { className: "bg-b3-react-primary h-16 w-16 rounded-full opacity-100", src: eoaWalletIcon, alt: connectedEOAWallet?.id }), _jsxs("div", { className: "ml-4 grow", children: [ensName && _jsx("div", { children: ensName }), _jsx("div", { children: truncateAddress(globalAddress) })] })] }), isActiveEOAWallet && _jsx(Icon, { className: "fill-b3-react-primary", name: "check" })] })) : (connectedSmartWallet && (_jsxs("div", { className: cn("mb-2 flex cursor-pointer items-center justify-between rounded-xl p-3", isActiveSmartWallet
|
|
41
42
|
? "bg-b3-react-background"
|
|
42
43
|
: "bg-b3-react-background hover:bg-b3-react-background"), onClick: () => handleSetActiveAccount(connectedSmartWallet?.id), children: [_jsxs("div", { className: "flex items-center", children: [_jsx("img", { className: "bg-b3-react-primary h-16 w-16 rounded-full opacity-100", src: smartWalletIcon, alt: connectedSmartWallet?.id }), _jsxs("div", { className: "grow pl-4", children: [ensName && _jsx("div", { children: ensName }), _jsx("div", { children: truncateAddress(globalAddress) }), _jsx("div", { children: "Smart wallet" })] })] }), isActiveSmartWallet && _jsx(Icon, { className: "fill-b3-react-primary", name: "check" })] }))), _jsx("div", { className: "ml-3", children: _jsx(ManageAccountButton, { ...props, className: "w-[calc(100%-12px)]" }) }), _jsx("button", { className: "mb-2 w-full space-y-1", onClick: onDisconnect, children: _jsxs("div", { className: "hover:bg-b3-react-background group flex h-12 items-center rounded-xl px-4 transition-colors", children: [_jsx(Icon, { className: "fill-b3-react-primary mr-4 shrink-0 transition-colors", name: "logout" }), _jsx("div", { className: "text-b3-react-primary mr-auto transition-colors", children: "Disconnect" })] }) })] }) }) })] })) : (_jsx(SignInWithB3, { closeAfterLogin: true, onLoginSuccess: async (globalAccount) => {
|
|
43
44
|
console.log("User authenticated with Global Account!", globalAccount);
|
|
@@ -173,7 +173,7 @@ export function SignInWithB3Flow({ strategies, onLoginSuccess, onSessionKeySucce
|
|
|
173
173
|
return (_jsx(LoginStepContainer, { partnerId: partnerId, children: _jsx("div", { className: "p-4 text-center text-red-500", children: refetchError }) }));
|
|
174
174
|
}
|
|
175
175
|
if (isAuthenticating || (isFetchingSigners && step === "login") || source === "requestPermissions") {
|
|
176
|
-
return (_jsx(LoginStepContainer, { partnerId: partnerId, children: _jsx("div", { className: "
|
|
176
|
+
return (_jsx(LoginStepContainer, { partnerId: partnerId, children: _jsx("div", { className: "my-8 flex min-h-[350px] items-center justify-center", children: _jsx(Loading, { variant: "white", size: "lg" }) }) }));
|
|
177
177
|
}
|
|
178
178
|
if (step === "login") {
|
|
179
179
|
// Custom strategy
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ToastItem } from "./ToastContext";
|
|
2
|
+
interface ToastProps {
|
|
3
|
+
toast: ToastItem;
|
|
4
|
+
onDismiss: (id: string) => void;
|
|
5
|
+
theme?: "light" | "dark";
|
|
6
|
+
}
|
|
7
|
+
export declare function Toast({ toast, onDismiss, theme }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
interface ToastContainerProps {
|
|
9
|
+
toasts: ToastItem[];
|
|
10
|
+
onDismiss: (id: string) => void;
|
|
11
|
+
theme?: "light" | "dark";
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function ToastContainer({ toasts, onDismiss, theme, className }: ToastContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../../shared/utils/cn.js";
|
|
3
|
+
import { AnimatePresence, motion } from "framer-motion";
|
|
4
|
+
const getToastIcon = (type) => {
|
|
5
|
+
switch (type) {
|
|
6
|
+
case "success":
|
|
7
|
+
return (_jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M16.6666 5L7.49998 14.1667L3.33331 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
8
|
+
case "error":
|
|
9
|
+
return (_jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M15 5L5 15M5 5L15 15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
10
|
+
case "info":
|
|
11
|
+
return (_jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M10 13.3333V10M10 6.66667H10.0083M18.3333 10C18.3333 14.6024 14.6024 18.3333 10 18.3333C5.39763 18.3333 1.66667 14.6024 1.66667 10C1.66667 5.39763 5.39763 1.66667 10 1.66667C14.6024 1.66667 18.3333 5.39763 18.3333 10Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
12
|
+
case "warning":
|
|
13
|
+
return (_jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M10 6.66667V10M10 13.3333H10.0083M18.3333 10C18.3333 14.6024 14.6024 18.3333 10 18.3333C5.39763 18.3333 1.66667 14.6024 1.66667 10C1.66667 5.39763 5.39763 1.66667 10 1.66667C14.6024 1.66667 18.3333 5.39763 18.3333 10Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const getToastStyles = (type, theme = "light") => {
|
|
17
|
+
const isDark = theme === "dark";
|
|
18
|
+
const baseStyles = "flex items-start gap-3 p-4 rounded-xl border shadow-sm";
|
|
19
|
+
switch (type) {
|
|
20
|
+
case "success":
|
|
21
|
+
return cn(baseStyles, isDark ? "bg-green-950/50 border-green-800/50 text-green-100" : "bg-green-50 border-green-200 text-green-900");
|
|
22
|
+
case "error":
|
|
23
|
+
return cn(baseStyles, isDark ? "bg-red-950/50 border-red-800/50 text-red-100" : "bg-red-50 border-red-200 text-red-900");
|
|
24
|
+
case "info":
|
|
25
|
+
return cn(baseStyles, isDark ? "bg-blue-950/50 border-blue-800/50 text-blue-100" : "bg-blue-50 border-blue-200 text-blue-900");
|
|
26
|
+
case "warning":
|
|
27
|
+
return cn(baseStyles, isDark
|
|
28
|
+
? "bg-yellow-950/50 border-yellow-800/50 text-yellow-100"
|
|
29
|
+
: "bg-yellow-50 border-yellow-200 text-yellow-900");
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const getIconColorClass = (type, theme = "light") => {
|
|
33
|
+
const isDark = theme === "dark";
|
|
34
|
+
switch (type) {
|
|
35
|
+
case "success":
|
|
36
|
+
return isDark ? "text-green-400" : "text-green-600";
|
|
37
|
+
case "error":
|
|
38
|
+
return isDark ? "text-red-400" : "text-red-600";
|
|
39
|
+
case "info":
|
|
40
|
+
return isDark ? "text-blue-400" : "text-blue-600";
|
|
41
|
+
case "warning":
|
|
42
|
+
return isDark ? "text-yellow-400" : "text-yellow-600";
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
export function Toast({ toast, onDismiss, theme = "light" }) {
|
|
46
|
+
return (_jsxs(motion.div, { initial: { opacity: 0, y: -20, scale: 0.95 }, animate: { opacity: 1, y: 0, scale: 1 }, exit: { opacity: 0, y: -10, scale: 0.95 }, transition: { duration: 0.2 }, className: getToastStyles(toast.type, theme), children: [_jsx("div", { className: cn("mt-0.5 shrink-0", getIconColorClass(toast.type, theme)), children: getToastIcon(toast.type) }), _jsx("p", { className: "font-inter flex-1 text-sm font-medium", children: toast.message }), _jsx("button", { onClick: () => onDismiss(toast.id), className: cn("shrink-0 transition-opacity hover:opacity-70", theme === "dark" ? "text-gray-400" : "text-gray-500"), children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M12 4L4 12M4 4L12 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] }));
|
|
47
|
+
}
|
|
48
|
+
export function ToastContainer({ toasts, onDismiss, theme = "light", className }) {
|
|
49
|
+
return (_jsx("div", { className: cn("w-full space-y-2", className), children: _jsx(AnimatePresence, { mode: "popLayout", children: toasts.map(toast => (_jsx(Toast, { toast: toast, onDismiss: onDismiss, theme: theme }, toast.id))) }) }));
|
|
50
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type ToastType = "success" | "error" | "info" | "warning";
|
|
2
|
+
export interface ToastItem {
|
|
3
|
+
id: string;
|
|
4
|
+
type: ToastType;
|
|
5
|
+
message: string;
|
|
6
|
+
duration?: number;
|
|
7
|
+
createdAt: number;
|
|
8
|
+
}
|
|
9
|
+
interface ToastContextType {
|
|
10
|
+
toasts: ToastItem[];
|
|
11
|
+
addToast: (type: ToastType, message: string, duration?: number) => string;
|
|
12
|
+
removeToast: (id: string) => void;
|
|
13
|
+
clearAll: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function ToastProvider({ children }: {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function useToastContext(): ToastContextType;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
3
|
+
const ToastContext = createContext(undefined);
|
|
4
|
+
let globalToastCounter = 0;
|
|
5
|
+
export function ToastProvider({ children }) {
|
|
6
|
+
const [toasts, setToasts] = useState([]);
|
|
7
|
+
const timeoutsRef = useRef(new Map());
|
|
8
|
+
const removeToast = useCallback((id) => {
|
|
9
|
+
setToasts(prev => prev.filter(toast => toast.id !== id));
|
|
10
|
+
const timeout = timeoutsRef.current.get(id);
|
|
11
|
+
if (timeout) {
|
|
12
|
+
clearTimeout(timeout);
|
|
13
|
+
timeoutsRef.current.delete(id);
|
|
14
|
+
}
|
|
15
|
+
}, []);
|
|
16
|
+
const addToast = useCallback((type, message, duration = 4000) => {
|
|
17
|
+
const id = `toast-${Date.now()}-${globalToastCounter++}`;
|
|
18
|
+
const newToast = {
|
|
19
|
+
id,
|
|
20
|
+
type,
|
|
21
|
+
message,
|
|
22
|
+
duration,
|
|
23
|
+
createdAt: Date.now(),
|
|
24
|
+
};
|
|
25
|
+
setToasts(prev => [...prev, newToast]);
|
|
26
|
+
if (duration > 0) {
|
|
27
|
+
const timeout = setTimeout(() => {
|
|
28
|
+
removeToast(id);
|
|
29
|
+
}, duration);
|
|
30
|
+
timeoutsRef.current.set(id, timeout);
|
|
31
|
+
}
|
|
32
|
+
return id;
|
|
33
|
+
}, [removeToast]);
|
|
34
|
+
const clearAll = useCallback(() => {
|
|
35
|
+
timeoutsRef.current.forEach(timeout => clearTimeout(timeout));
|
|
36
|
+
timeoutsRef.current.clear();
|
|
37
|
+
setToasts([]);
|
|
38
|
+
}, []);
|
|
39
|
+
// Cleanup on unmount
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
const timeouts = timeoutsRef.current;
|
|
42
|
+
return () => {
|
|
43
|
+
timeouts.forEach(timeout => clearTimeout(timeout));
|
|
44
|
+
timeouts.clear();
|
|
45
|
+
};
|
|
46
|
+
}, []);
|
|
47
|
+
return _jsx(ToastContext.Provider, { value: { toasts, addToast, removeToast, clearAll }, children: children });
|
|
48
|
+
}
|
|
49
|
+
export function useToastContext() {
|
|
50
|
+
const context = useContext(ToastContext);
|
|
51
|
+
if (!context) {
|
|
52
|
+
throw new Error("useToastContext must be used within ToastProvider");
|
|
53
|
+
}
|
|
54
|
+
return context;
|
|
55
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ToastType } from "./ToastContext";
|
|
2
|
+
export declare function setToastContext(context: {
|
|
3
|
+
addToast: (type: ToastType, message: string, duration?: number) => string;
|
|
4
|
+
removeToast: (id: string) => void;
|
|
5
|
+
clearAll: () => void;
|
|
6
|
+
}): void;
|
|
7
|
+
export declare const toast: {
|
|
8
|
+
success: (message: string, options?: {
|
|
9
|
+
duration?: number;
|
|
10
|
+
}) => any;
|
|
11
|
+
error: (message: string, options?: {
|
|
12
|
+
duration?: number;
|
|
13
|
+
}) => any;
|
|
14
|
+
info: (message: string, options?: {
|
|
15
|
+
duration?: number;
|
|
16
|
+
}) => any;
|
|
17
|
+
warning: (message: string, options?: {
|
|
18
|
+
duration?: number;
|
|
19
|
+
}) => any;
|
|
20
|
+
dismiss: (toastId?: string) => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// Global reference to the toast context functions
|
|
2
|
+
let toastContextRef = null;
|
|
3
|
+
export function setToastContext(context) {
|
|
4
|
+
toastContextRef = context;
|
|
5
|
+
}
|
|
6
|
+
// Sonner-compatible API
|
|
7
|
+
export const toast = {
|
|
8
|
+
success: (message, options) => {
|
|
9
|
+
if (toastContextRef) {
|
|
10
|
+
return toastContextRef.addToast("success", message, options?.duration);
|
|
11
|
+
}
|
|
12
|
+
console.warn("Toast context not initialized. Using fallback.");
|
|
13
|
+
// Fallback to sonner if context not available
|
|
14
|
+
try {
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
16
|
+
const sonner = require("sonner");
|
|
17
|
+
return sonner.toast.success(message, options);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
console.error("Failed to show toast:", message);
|
|
21
|
+
return "";
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
error: (message, options) => {
|
|
25
|
+
if (toastContextRef) {
|
|
26
|
+
return toastContextRef.addToast("error", message, options?.duration);
|
|
27
|
+
}
|
|
28
|
+
console.warn("Toast context not initialized. Using fallback.");
|
|
29
|
+
try {
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
31
|
+
const sonner = require("sonner");
|
|
32
|
+
return sonner.toast.error(message, options);
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
console.error("Failed to show toast:", message);
|
|
36
|
+
return "";
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
info: (message, options) => {
|
|
40
|
+
if (toastContextRef) {
|
|
41
|
+
return toastContextRef.addToast("info", message, options?.duration);
|
|
42
|
+
}
|
|
43
|
+
console.warn("Toast context not initialized. Using fallback.");
|
|
44
|
+
try {
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
46
|
+
const sonner = require("sonner");
|
|
47
|
+
return sonner.toast.info(message, options);
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
console.error("Failed to show toast:", message);
|
|
51
|
+
return "";
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
warning: (message, options) => {
|
|
55
|
+
if (toastContextRef) {
|
|
56
|
+
return toastContextRef.addToast("warning", message, options?.duration);
|
|
57
|
+
}
|
|
58
|
+
console.warn("Toast context not initialized. Using fallback.");
|
|
59
|
+
try {
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
61
|
+
const sonner = require("sonner");
|
|
62
|
+
return sonner.toast.warning(message, options);
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
console.error("Failed to show toast:", message);
|
|
66
|
+
return "";
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
dismiss: (toastId) => {
|
|
70
|
+
if (toastContextRef) {
|
|
71
|
+
if (toastId) {
|
|
72
|
+
toastContextRef.removeToast(toastId);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
toastContextRef.clearAll();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
try {
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
81
|
+
const sonner = require("sonner");
|
|
82
|
+
sonner.toast.dismiss(toastId);
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
console.error("Failed to dismiss toast");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const WalletImage: ({ fallback }: {
|
|
2
|
+
fallback?: React.ReactNode;
|
|
3
|
+
}) => string | number | bigint | true | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | null;
|
|
4
|
+
export default WalletImage;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useAccountWalletImage } from "../../hooks/useAccountWallet.js";
|
|
3
|
+
import { IPFSMediaRenderer } from "../IPFSMediaRenderer/IPFSMediaRenderer.js";
|
|
4
|
+
const WalletImage = ({ fallback }) => {
|
|
5
|
+
const walletImage = useAccountWalletImage();
|
|
6
|
+
if (walletImage) {
|
|
7
|
+
return _jsx(IPFSMediaRenderer, { src: walletImage, alt: "Profile", className: "h-6 w-6 rounded-full" });
|
|
8
|
+
}
|
|
9
|
+
return fallback || null;
|
|
10
|
+
};
|
|
11
|
+
export default WalletImage;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,4 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|