From 1314b2a3d35847e1b83aebd8c8fe1ea1dc45e7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rui=20Sim=C3=A3o?= Date: Wed, 4 Dec 2024 17:34:55 +0000 Subject: [PATCH] wip: continue --- apps/evm/package.json | 2 + .../src/components/Layout/ConnectButton.tsx | 46 +++-- .../ProfileDrawer/AddornedAsset.tsx | 31 ++++ .../ProfileDrawer/ProfileDrawer.tsx | 157 ++++++++++++++++++ .../components/ProfileDrawer/ProfileTag.tsx | 47 ++++++ .../ProfileTokenList.style.tsx | 55 ++++++ .../ProfileTokenList/ProfileTokenList.tsx | 47 ++++++ .../ProfileDrawer/ProfileTokenList/index.tsx | 1 + .../TransactionList/BridgeTransactionItem.tsx | 48 ++++++ .../GatewayTransactionItem.tsx | 38 +++++ .../TransactionList/TransactionDetails.tsx | 84 ++++++++++ .../TransactionList/TransactionItem.tsx | 19 +++ .../TransactionList/TransactionList.style.tsx | 55 ++++++ .../TransactionList/TransactionList.tsx | 73 ++++++++ .../ProfileDrawer/TransactionList/index.tsx | 1 + .../evm/src/components/ProfileDrawer/index.ts | 1 + apps/evm/src/hooks/index.ts | 1 + apps/evm/src/hooks/useGetTransactions.ts | 68 ++++++++ apps/evm/src/lib/wagmi/config.ts | 29 ++-- .../ui/src/components/Drawer/Drawer.style.tsx | 8 +- .../ui/src/components/Icon/Icon.style.tsx | 16 +- packages/ui/src/icons/CreditCard.tsx | 17 ++ packages/ui/src/icons/SolidCreditCard.tsx | 18 ++ packages/ui/src/icons/index.ts | 2 + pnpm-lock.yaml | 49 +++--- 25 files changed, 858 insertions(+), 55 deletions(-) create mode 100644 apps/evm/src/components/ProfileDrawer/AddornedAsset.tsx create mode 100644 apps/evm/src/components/ProfileDrawer/ProfileDrawer.tsx create mode 100644 apps/evm/src/components/ProfileDrawer/ProfileTag.tsx create mode 100644 apps/evm/src/components/ProfileDrawer/ProfileTokenList/ProfileTokenList.style.tsx create mode 100644 apps/evm/src/components/ProfileDrawer/ProfileTokenList/ProfileTokenList.tsx create mode 100644 apps/evm/src/components/ProfileDrawer/ProfileTokenList/index.tsx create mode 100644 apps/evm/src/components/ProfileDrawer/TransactionList/BridgeTransactionItem.tsx create mode 100644 apps/evm/src/components/ProfileDrawer/TransactionList/GatewayTransactionItem.tsx create mode 100644 apps/evm/src/components/ProfileDrawer/TransactionList/TransactionDetails.tsx create mode 100644 apps/evm/src/components/ProfileDrawer/TransactionList/TransactionItem.tsx create mode 100644 apps/evm/src/components/ProfileDrawer/TransactionList/TransactionList.style.tsx create mode 100644 apps/evm/src/components/ProfileDrawer/TransactionList/TransactionList.tsx create mode 100644 apps/evm/src/components/ProfileDrawer/TransactionList/index.tsx create mode 100644 apps/evm/src/components/ProfileDrawer/index.ts create mode 100644 apps/evm/src/hooks/useGetTransactions.ts create mode 100644 packages/ui/src/icons/CreditCard.tsx create mode 100644 packages/ui/src/icons/SolidCreditCard.tsx diff --git a/apps/evm/package.json b/apps/evm/package.json index 38dcddd70..ed54f8120 100644 --- a/apps/evm/package.json +++ b/apps/evm/package.json @@ -22,6 +22,7 @@ "@dynamic-labs/iconic": "^3.6.2", "@dynamic-labs/sdk-react-core": "^3.6.2", "@dynamic-labs/wagmi-connector": "^3.6.2", + "@dynamic-labs/wallet-book": "^3.8.5", "@gobob/bob-sdk": "^3.1.0", "@gobob/chains": "workspace:^", "@gobob/currency": "workspace:^", @@ -46,6 +47,7 @@ "@wagmi/core": "catalog:", "big.js": "catalog:", "bitcoin-address-validation": "catalog:", + "boring-avatars": "^1.11.2", "date-fns": "catalog:", "graphql-request": "catalog:", "lottie-react": "^2.4.0", diff --git a/apps/evm/src/components/Layout/ConnectButton.tsx b/apps/evm/src/components/Layout/ConnectButton.tsx index 361e55a6a..499f8366a 100644 --- a/apps/evm/src/components/Layout/ConnectButton.tsx +++ b/apps/evm/src/components/Layout/ConnectButton.tsx @@ -1,17 +1,43 @@ 'use client'; -import { Button, Drawer } from '@gobob/ui'; +import { useDynamicContext, UserProfile } from '@dynamic-labs/sdk-react-core'; +import { Button, Flex, Span } from '@gobob/ui'; import { truncateBtcAddress, truncateEthAddress } from '@gobob/utils'; import { Trans } from '@lingui/macro'; -import { useAccount } from 'wagmi'; -import { useDynamicContext } from '@dynamic-labs/sdk-react-core'; +import ProfileAvatar from 'boring-avatars'; import { useState } from 'react'; +import { Address } from 'viem'; +import { useAccount } from 'wagmi'; + +import { ProfileDrawer } from '../ProfileDrawer'; import { useBtcAccount } from '@/hooks'; -const ConnectButton = (): JSX.Element => { - const { setShowAuthFlow } = useDynamicContext(); +const Profile = ({ + evmAddress, + btcAddress, + user +}: { + btcAddress?: string; + evmAddress?: Address; + user?: UserProfile; +}) => { + const displayedAddress = evmAddress + ? truncateEthAddress(evmAddress) + : btcAddress + ? truncateBtcAddress(btcAddress) + : undefined; + return ( + + {user?.userId ? : undefined} + {displayedAddress} + + ); +}; + +const ConnectButton = (): JSX.Element => { + const { setShowAuthFlow, user } = useDynamicContext(); const { address: evmAddress } = useAccount(); const { address: btcAddress } = useBtcAccount(); @@ -25,7 +51,7 @@ const ConnectButton = (): JSX.Element => { }; return ( - ); @@ -37,12 +63,10 @@ const ConnectButton = (): JSX.Element => { return ( <> - - - Here - + ); }; diff --git a/apps/evm/src/components/ProfileDrawer/AddornedAsset.tsx b/apps/evm/src/components/ProfileDrawer/AddornedAsset.tsx new file mode 100644 index 000000000..c4016658b --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/AddornedAsset.tsx @@ -0,0 +1,31 @@ +'use client'; + +import { Flex } from '@gobob/ui'; +import { ReactNode } from 'react'; + +const AddornedAsset = ({ addornment, asset }: { asset: ReactNode; addornment: ReactNode }) => { + return ( + + {asset} + + {addornment} + + + ); +}; + +export { AddornedAsset }; diff --git a/apps/evm/src/components/ProfileDrawer/ProfileDrawer.tsx b/apps/evm/src/components/ProfileDrawer/ProfileDrawer.tsx new file mode 100644 index 000000000..e244a5fb5 --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/ProfileDrawer.tsx @@ -0,0 +1,157 @@ +'use client'; + +import { + Button, + Card, + ChevronRight, + Cog, + Drawer, + Flex, + P, + Power, + QrCode, + SolidCreditCard, + Span, + Tabs, + TabsItem +} from '@gobob/ui'; +import { Trans } from '@lingui/macro'; +import { useAccount } from 'wagmi'; +import { useDynamicContext } from '@dynamic-labs/sdk-react-core'; +import { ETH } from '@gobob/icons'; +import { WalletIcon } from '@dynamic-labs/wallet-book'; +import { truncateEthAddress } from '@gobob/utils'; + +import { ChainLogo } from '../ChainLogo'; + +import { ProfileTag } from './ProfileTag'; +import { TransactionList } from './TransactionList'; +import { ProfileTokenList } from './ProfileTokenList'; +import { AddornedAsset } from './AddornedAsset'; + +import { useBalances, useBtcAccount, useTotalBalance } from '@/hooks'; +import { chainL1, L1_CHAIN } from '@/constants'; +import { useGetTransactions } from '@/hooks/useGetTransactions'; + +enum ProfileDrawerTabs { + Tokens = 'tokens', + Activity = 'activity' +} + +type ProfileDrawerProps = { + isOpen: boolean; + onClose: () => void; +}; + +const ProfileDrawer = ({ isOpen, onClose }: ProfileDrawerProps): JSX.Element => { + const { setShowAuthFlow, user, handleLogOut } = useDynamicContext(); + const { address: evmAddress, chain } = useAccount(); + const { address: btcAddress } = useBtcAccount(); + + const chainId = chain?.id || L1_CHAIN; + const chainName = chain?.name || chainL1.name; + + const { formatted } = useTotalBalance(chainId); + + const { getBalance } = useBalances(chainId); + const { primaryWallet } = useDynamicContext(); + + const { + data: transactions, + isInitialLoading: isTransactionsInitialLoading, + refetch: refetchTransaction + } = useGetTransactions(); + + const isAuthenticated = evmAddress || btcAddress; + + if (!isAuthenticated) { + const handleConnect = () => { + setShowAuthFlow(true); + }; + + return ( + + ); + } + + const handleLogout = () => { + handleLogOut(); + onClose(); + }; + + return ( + + + + + + + + + + {primaryWallet && ( + + + } asset={} /> + + {getBalance('ETH')?.toSignificant()} ETH + + + {truncateEthAddress(primaryWallet.address)}{' '} + + + + + + + + )} +

+ {formatted} +

+ + + +

+ Buy +

+
+ + +

+ Receive +

+
+
+ + Tokens}> + + + Activity}> + + + +
+
+ ); +}; + +export { ProfileDrawer }; diff --git a/apps/evm/src/components/ProfileDrawer/ProfileTag.tsx b/apps/evm/src/components/ProfileDrawer/ProfileTag.tsx new file mode 100644 index 000000000..3accfcdd7 --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/ProfileTag.tsx @@ -0,0 +1,47 @@ +'use client'; + +import { UserProfile } from '@dynamic-labs/sdk-react-core'; +import { Flex, Span } from '@gobob/ui'; +import { truncateBtcAddress, truncateEthAddress } from '@gobob/utils'; +import ProfileAvatar from 'boring-avatars'; +import { Address } from 'viem'; + +const sizeMap = { + s: { + icon: '1.5rem', + text: 's' + }, + md: { + icon: '2rem', + text: 'md' + } +} as const; + +const ProfileTag = ({ + evmAddress, + btcAddress, + user, + size = 's' +}: { + btcAddress?: string; + evmAddress?: Address; + user?: UserProfile; + size?: 's' | 'md'; +}) => { + const displayedAddress = evmAddress + ? truncateEthAddress(evmAddress) + : btcAddress + ? truncateBtcAddress(btcAddress) + : undefined; + + return ( + + {user?.userId ? : undefined} + + {displayedAddress} + + + ); +}; + +export { ProfileTag }; diff --git a/apps/evm/src/components/ProfileDrawer/ProfileTokenList/ProfileTokenList.style.tsx b/apps/evm/src/components/ProfileDrawer/ProfileTokenList/ProfileTokenList.style.tsx new file mode 100644 index 000000000..3d035daa5 --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/ProfileTokenList/ProfileTokenList.style.tsx @@ -0,0 +1,55 @@ +import { Flex, Span, ArrowDownCircle } from '@gobob/ui'; +import styled from 'styled-components'; + +type StyledExpandIconProps = { + $isExpanded?: boolean; +}; + +const StyledSpan = styled(Span)` + display: inline-flex; + align-items: center; + position: relative; + margin-left: ${({ theme }) => theme.spacing('md')}; + padding: 0 ${({ theme }) => theme.spacing('s')}; + height: 24px; + border-radius: ${({ theme }) => theme.rounded('full')}; +`; + +const StyledSpinnerWrapper = styled.span` + position: absolute; + top: 0; + left: 50%; + transform: translateX(-50%); +`; + +const StyledTransactionList = styled(Flex)` + overflow-y: auto; + flex: 1 1 auto; +`; + +const StyledTransactionListWrapper = styled(Flex)` + overflow: hidden; +`; + +const StyledDetailsButton = styled(Flex)` + font: inherit; + display: flex; + width: 100%; + flex-direction: column; + gap: ${({ theme }) => theme.spacing('md')}; + padding: ${({ theme }) => `${theme.spacing('md')} 0`}; +`; + +const StyledExpandIcon = styled(ArrowDownCircle)` + ${({ theme }) => theme.transition('common', 'normal')}; + transform: ${({ $isExpanded }) => ($isExpanded ? 'rotate(-180deg)' : 'rotate(0deg)')}; +`; + +export { + StyledDetailsButton, + StyledExpandIcon, + StyledSpan, + StyledSpinnerWrapper, + StyledTransactionList, + StyledTransactionListWrapper +}; diff --git a/apps/evm/src/components/ProfileDrawer/ProfileTokenList/ProfileTokenList.tsx b/apps/evm/src/components/ProfileDrawer/ProfileTokenList/ProfileTokenList.tsx new file mode 100644 index 000000000..265adaed8 --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/ProfileTokenList/ProfileTokenList.tsx @@ -0,0 +1,47 @@ +import { Avatar, Flex, P, useCurrencyFormatter } from '@gobob/ui'; +import { usePrices } from '@gobob/hooks'; +import { BOBLogo } from '@gobob/icons'; + +import { StyledTransactionList, StyledTransactionListWrapper } from './ProfileTokenList.style'; + +import { useBalances, useTokens } from '@/hooks'; +import { L2_CHAIN } from '@/constants'; +import { calculateAmountUSD } from '@/utils'; + +const ProfileTokenList = (): JSX.Element => { + const { data: tokens } = useTokens(L2_CHAIN); + const { getBalance } = useBalances(L2_CHAIN); + const format = useCurrencyFormatter(); + + const { getPrice } = usePrices(); + + const list = tokens + ?.map((token) => ({ token, balance: getBalance(token.currency.symbol) })) + .filter((item) => item.balance?.greaterThan(0)); + + return ( + + + {list?.map((item) => ( + + +
+ + +
+ +

{item.token.raw.name}

+

+ {item.balance?.toSignificant()} {item.token.currency.symbol} ( + {format(calculateAmountUSD(item.balance!, getPrice(item.balance!.currency.symbol)))}) +

+
+
+
+ ))} +
+
+ ); +}; + +export { ProfileTokenList }; diff --git a/apps/evm/src/components/ProfileDrawer/ProfileTokenList/index.tsx b/apps/evm/src/components/ProfileDrawer/ProfileTokenList/index.tsx new file mode 100644 index 000000000..83a9e600b --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/ProfileTokenList/index.tsx @@ -0,0 +1 @@ +export { ProfileTokenList } from './ProfileTokenList'; diff --git a/apps/evm/src/components/ProfileDrawer/TransactionList/BridgeTransactionItem.tsx b/apps/evm/src/components/ProfileDrawer/TransactionList/BridgeTransactionItem.tsx new file mode 100644 index 000000000..9d71c6b16 --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/TransactionList/BridgeTransactionItem.tsx @@ -0,0 +1,48 @@ +import { Flex, FlexProps } from '@gobob/ui'; +import { useState } from 'react'; + +import { TransactionDetails } from './TransactionDetails'; + +import { L1_CHAIN, L2_CHAIN } from '@/constants'; +import { BridgeTransaction, TransactionDirection } from '@/types'; +import { BridgeStatus } from '@/app/[lang]/(bridge)/components/BridgeStatus'; + +type Props = { data: BridgeTransaction; onProveSuccess?: () => void; onRelaySuccess?: () => void }; + +type InheritAttrs = Omit; + +type BridgeTransactionItemProps = Props & InheritAttrs; + +const BridgeTransactionItem = ({ + data, + onProveSuccess, + onRelaySuccess, + ...props +}: BridgeTransactionItemProps): JSX.Element => { + const [isExpanded, setExpanded] = useState(false); + + const fromChaindId = data.direction === TransactionDirection.L1_TO_L2 ? L1_CHAIN : L2_CHAIN; + const toChaindId = data.direction === TransactionDirection.L1_TO_L2 ? L2_CHAIN : L1_CHAIN; + + return ( + + setExpanded((isExpanded) => !isExpanded)} + /> + + + ); +}; + +export { BridgeTransactionItem }; diff --git a/apps/evm/src/components/ProfileDrawer/TransactionList/GatewayTransactionItem.tsx b/apps/evm/src/components/ProfileDrawer/TransactionList/GatewayTransactionItem.tsx new file mode 100644 index 000000000..89228b519 --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/TransactionList/GatewayTransactionItem.tsx @@ -0,0 +1,38 @@ +import { Flex, FlexProps } from '@gobob/ui'; +import { useState } from 'react'; + +import { TransactionDetails } from './TransactionDetails'; + +import { L2_CHAIN } from '@/constants'; +import { GatewayTransaction, TransactionDirection } from '@/types'; +import { GatewayStatus } from '@/app/[lang]/(bridge)/components/GatewayStatus'; + +type Props = { data: GatewayTransaction }; + +type InheritAttrs = Omit; + +type GatewayTransactionItemProps = Props & InheritAttrs; + +const GatewayTransactionItem = ({ data, ...props }: GatewayTransactionItemProps): JSX.Element => { + const [isExpanded, setExpanded] = useState(false); + + const fromChaindId = 'BTC'; + const toChaindId = L2_CHAIN; + + return ( + + setExpanded((isExpanded) => !isExpanded)} + /> + + + ); +}; + +export { GatewayTransactionItem }; diff --git a/apps/evm/src/components/ProfileDrawer/TransactionList/TransactionDetails.tsx b/apps/evm/src/components/ProfileDrawer/TransactionList/TransactionDetails.tsx new file mode 100644 index 000000000..17ade1610 --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/TransactionList/TransactionDetails.tsx @@ -0,0 +1,84 @@ +import { ChainId } from '@gobob/chains'; +import { Currency, CurrencyAmount } from '@gobob/currency'; +import { ArrowLongRight, Flex, FlexProps, P, UnstyledButton } from '@gobob/ui'; +import { Trans } from '@lingui/macro'; +import { formatDistanceToNow } from 'date-fns'; + +import { StyledDetailsButton, StyledExpandIcon } from './TransactionList.style'; + +import { ChainLogo } from '@/components'; +import { TransactionDirection } from '@/types'; + +type Props = { + direction: TransactionDirection; + date: Date; + fromChainId: ChainId | 'BTC'; + toChainId: ChainId | 'BTC'; + amount?: CurrencyAmount; + isPending?: boolean; + isExpanded?: boolean; + onExpand?: () => void; +}; + +type InheritAttrs = Omit; + +type TransactionDetailsProps = Props & InheritAttrs; + +const TransactionDetails = ({ + direction, + date, + fromChainId, + toChainId, + amount, + isPending, + isExpanded, + onExpand, + ...props +}: TransactionDetailsProps): JSX.Element => { + const directionLabel = direction === TransactionDirection.L1_TO_L2 ? Deposit : Withdraw; + + const isExpandable = !!onExpand; + + return ( + + + + + + + + +

+ {directionLabel} +

+
+

+ {formatDistanceToNow(date)} ago +

+
+ + + + {(isPending && ( +

+ Pending +

+ )) || + (amount && ( +

+ {amount.toExact()} {amount.currency.symbol} +

+ )) || ( +

+ Unknown +

+ )} + {isExpandable && } +
+
+
+
+ ); +}; + +export { TransactionDetails }; diff --git a/apps/evm/src/components/ProfileDrawer/TransactionList/TransactionItem.tsx b/apps/evm/src/components/ProfileDrawer/TransactionList/TransactionItem.tsx new file mode 100644 index 000000000..d48c43da9 --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/TransactionList/TransactionItem.tsx @@ -0,0 +1,19 @@ +import { BridgeTransactionItem } from './BridgeTransactionItem'; +import { GatewayTransactionItem } from './GatewayTransactionItem'; + +import { Transaction, TransactionType } from '@/types'; + +type TransactionItemProps = { data: Transaction; onProveSuccess?: () => void; onRelaySuccess?: () => void }; + +const TransactionItem = ({ data, onProveSuccess, onRelaySuccess }: TransactionItemProps): JSX.Element | null => { + switch (data.type) { + case TransactionType.Bridge: + return ; + case TransactionType.Gateway: + return ; + default: + return null; + } +}; + +export { TransactionItem }; diff --git a/apps/evm/src/components/ProfileDrawer/TransactionList/TransactionList.style.tsx b/apps/evm/src/components/ProfileDrawer/TransactionList/TransactionList.style.tsx new file mode 100644 index 000000000..3d035daa5 --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/TransactionList/TransactionList.style.tsx @@ -0,0 +1,55 @@ +import { Flex, Span, ArrowDownCircle } from '@gobob/ui'; +import styled from 'styled-components'; + +type StyledExpandIconProps = { + $isExpanded?: boolean; +}; + +const StyledSpan = styled(Span)` + display: inline-flex; + align-items: center; + position: relative; + margin-left: ${({ theme }) => theme.spacing('md')}; + padding: 0 ${({ theme }) => theme.spacing('s')}; + height: 24px; + border-radius: ${({ theme }) => theme.rounded('full')}; +`; + +const StyledSpinnerWrapper = styled.span` + position: absolute; + top: 0; + left: 50%; + transform: translateX(-50%); +`; + +const StyledTransactionList = styled(Flex)` + overflow-y: auto; + flex: 1 1 auto; +`; + +const StyledTransactionListWrapper = styled(Flex)` + overflow: hidden; +`; + +const StyledDetailsButton = styled(Flex)` + font: inherit; + display: flex; + width: 100%; + flex-direction: column; + gap: ${({ theme }) => theme.spacing('md')}; + padding: ${({ theme }) => `${theme.spacing('md')} 0`}; +`; + +const StyledExpandIcon = styled(ArrowDownCircle)` + ${({ theme }) => theme.transition('common', 'normal')}; + transform: ${({ $isExpanded }) => ($isExpanded ? 'rotate(-180deg)' : 'rotate(0deg)')}; +`; + +export { + StyledDetailsButton, + StyledExpandIcon, + StyledSpan, + StyledSpinnerWrapper, + StyledTransactionList, + StyledTransactionListWrapper +}; diff --git a/apps/evm/src/components/ProfileDrawer/TransactionList/TransactionList.tsx b/apps/evm/src/components/ProfileDrawer/TransactionList/TransactionList.tsx new file mode 100644 index 000000000..0174cb00e --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/TransactionList/TransactionList.tsx @@ -0,0 +1,73 @@ +import { Divider, Flex, FlexProps, P, Spinner } from '@gobob/ui'; +import { Trans } from '@lingui/macro'; +import { Fragment } from 'react'; +import { useIsClient } from 'usehooks-ts'; + +import { TransactionItem } from './TransactionItem'; +import { StyledTransactionList, StyledTransactionListWrapper } from './TransactionList.style'; + +import { Transaction } from '@/types'; + +type Props = { + isInitialLoading?: boolean; + data?: Transaction[]; + onProveSuccess?: () => void; + onRelaySuccess?: () => void; +}; + +type InheritAttrs = Omit; + +type TransactionListProps = Props & InheritAttrs; + +const TransactionList = ({ + isInitialLoading, + data, + onProveSuccess, + onRelaySuccess, + ...props +}: TransactionListProps): JSX.Element => { + const isClient = useIsClient(); + + const hasData = !!data?.length; + + return ( + + + {!isClient || isInitialLoading ? ( + + +

+ Fetching bridging operations... +

+
+ ) : ( + <> + {hasData ? ( + data.map((transaction, idx) => ( + + + {idx < data.length - 1 && } + + )) + ) : ( + +

+ No bridging operations found +

+
+ )} + + )} +
+ +
+ ); +}; + +export { TransactionList }; diff --git a/apps/evm/src/components/ProfileDrawer/TransactionList/index.tsx b/apps/evm/src/components/ProfileDrawer/TransactionList/index.tsx new file mode 100644 index 000000000..30e9c699e --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/TransactionList/index.tsx @@ -0,0 +1 @@ +export { TransactionList } from './TransactionList'; diff --git a/apps/evm/src/components/ProfileDrawer/index.ts b/apps/evm/src/components/ProfileDrawer/index.ts new file mode 100644 index 000000000..bb784747a --- /dev/null +++ b/apps/evm/src/components/ProfileDrawer/index.ts @@ -0,0 +1 @@ +export { ProfileDrawer } from './ProfileDrawer'; diff --git a/apps/evm/src/hooks/index.ts b/apps/evm/src/hooks/index.ts index 83dbf2dac..bebbe19a0 100644 --- a/apps/evm/src/hooks/index.ts +++ b/apps/evm/src/hooks/index.ts @@ -18,5 +18,6 @@ export * from './useSignUp'; export * from './useTokens'; export * from './useTotalBalance'; export * from './useWalletClient'; +export * from './useGetTransactions'; export * from './btc'; diff --git a/apps/evm/src/hooks/useGetTransactions.ts b/apps/evm/src/hooks/useGetTransactions.ts new file mode 100644 index 000000000..261d99440 --- /dev/null +++ b/apps/evm/src/hooks/useGetTransactions.ts @@ -0,0 +1,68 @@ +'use client'; + +import { useStore } from '@tanstack/react-store'; +import { watchAccount } from '@wagmi/core'; +import { useEffect, useMemo, useRef } from 'react'; +import { useConfig } from 'wagmi'; + +import { useGetBridgeTransactions, useGetGatewayTransactions } from '@/app/[lang]/(bridge)/hooks'; +import { store } from '@/lib/store'; + +const useGetTransactions = () => { + const config = useConfig(); + const gateway = useGetGatewayTransactions(); + const bridge = useGetBridgeTransactions(); + + const isInitialLoading = useStore(store, (state) => state.bridge.transactions.isInitialLoading); + + const isLoading = gateway.isLoading || bridge.isLoading; + + const watchAccountRef = useRef<() => void>(); + + useEffect(() => { + watchAccountRef.current = watchAccount(config, { + onChange: (account) => { + if (account.address) { + store.setState((state) => ({ + ...state, + bridge: { ...state.bridge, transactions: { ...state.bridge.transactions, isInitialLoading: true } } + })); + } + } + }); + + // Cleanup by calling unwatch to unsubscribe from the account change event + return () => watchAccountRef.current?.(); + }, [config]); + + useEffect(() => { + if (isInitialLoading && !isLoading) { + store.setState((state) => ({ + ...state, + bridge: { ...state.bridge, transactions: { ...state.bridge.transactions, isInitialLoading: false } } + })); + } + }, [isInitialLoading, isLoading]); + + const data = useMemo(() => { + const data = [...(gateway.data || []), ...bridge.data]; + + return data?.sort((a, b) => b.date.getTime() - a.date.getTime()); + }, [bridge.data, gateway.data]); + + return { + data, + refetch: { + gateway: gateway.refetch, + bridge: bridge.refetch + }, + addPlaceholderTransaction: { + bridge: bridge.addPlaceholderTransaction + }, + txPendingUserAction: bridge.txPendingUserAction, + isInitialLoading, + isLoading + }; +}; + +export { useGetTransactions }; diff --git a/apps/evm/src/lib/wagmi/config.ts b/apps/evm/src/lib/wagmi/config.ts index b158f450c..855421fd2 100644 --- a/apps/evm/src/lib/wagmi/config.ts +++ b/apps/evm/src/lib/wagmi/config.ts @@ -1,13 +1,12 @@ import { cookieStorage, createConfig, createStorage, http } from 'wagmi'; -import { coinbaseWallet, injected, walletConnect } from 'wagmi/connectors'; -import { getWagmiConnectorV2 } from '@binance/w3w-wagmi-connector-v2'; +import { coinbaseWallet, injected } from 'wagmi/connectors'; import { Config } from './types'; import { bob, bobSepolia } from './bob'; import { mainnet } from './mainnet'; import { sepolia } from './sepolia'; -const binanceConnector = getWagmiConnectorV2(); +// const binanceConnector = getWagmiConnectorV2(); const testnetChains = [bobSepolia, sepolia]; @@ -24,21 +23,21 @@ const getConfig = ({ isProd, multiInjectedProviderDiscovery }: Config) => { }) ] : []), - walletConnect({ - showQrModal: true, - projectId: 'd9a2f927549acc3da9e4893729772641', - metadata: { - name: 'BOB', - description: 'BOB is a hybrid L2 that combines the security of Bitcoin with the versatility of Ethereum', - url: 'https://www.app.gobob.xyz', - icons: ['https://uploads-ssl.webflow.com/64e85c2f3609488b3ed725f4/64ecae53ef4b561482f1c49f_bob1.jpg'] - } - }), + // walletConnect({ + // showQrModal: true, + // projectId: 'd9a2f927549acc3da9e4893729772641', + // metadata: { + // name: 'BOB', + // description: 'BOB is a hybrid L2 that combines the security of Bitcoin with the versatility of Ethereum', + // url: 'https://www.app.gobob.xyz', + // icons: ['https://uploads-ssl.webflow.com/64e85c2f3609488b3ed725f4/64ecae53ef4b561482f1c49f_bob1.jpg'] + // } + // }), coinbaseWallet({ appName: 'BOB', appLogoUrl: 'https://uploads-ssl.webflow.com/64e85c2f3609488b3ed725f4/64ecae53ef4b561482f1c49f_bob1.jpg' - }), - binanceConnector() + }) + // binanceConnector() ]; return createConfig({ diff --git a/packages/ui/src/components/Drawer/Drawer.style.tsx b/packages/ui/src/components/Drawer/Drawer.style.tsx index eaf1f2c40..cc7ded1e8 100644 --- a/packages/ui/src/components/Drawer/Drawer.style.tsx +++ b/packages/ui/src/components/Drawer/Drawer.style.tsx @@ -12,7 +12,7 @@ type StyledDialogProps = { }; const StyledModal = styled.div` - transform: ${({ $isOpen }) => ($isOpen ? 'translateX(100%)' : 'translateX(0%)')}; + transform: ${({ $isOpen }) => ($isOpen ? 'translateX(-100%)' : 'translateX(0%)')}; ${({ $isOpen }) => overlayCSS(!!$isOpen)} visibility: visible; @@ -26,11 +26,11 @@ const StyledModal = styled.div` position: fixed; top: 0; bottom: 0; - left: auto; - right: 100%; + right: auto; + left: 100%; height: 100%; - max-width: 300px; + max-width: 320px; width: 100%; transition: transform ${({ $isOpen }) => ($isOpen ? '250ms' : '100ms')} ease-in-out; diff --git a/packages/ui/src/components/Icon/Icon.style.tsx b/packages/ui/src/components/Icon/Icon.style.tsx index d25749ae7..9af1ba859 100644 --- a/packages/ui/src/components/Icon/Icon.style.tsx +++ b/packages/ui/src/components/Icon/Icon.style.tsx @@ -28,12 +28,16 @@ const StyledIcon = styled.svg` overflow: hidden; ${({ theme, $size, $color, $width, $height }) => css` ${getResponsiveCSS(theme, $size, $color)} - width: ${$width && typeof $width === 'string' && ($width.includes('em') || $width.includes('rem')) - ? $width - : `${$width}px`}; - height: ${$height && typeof $height === 'string' && ($height.includes('em') || $height.includes('rem')) - ? $height - : `${$height}px`}; + width: ${$width + ? typeof $width === 'string' && ($width.includes('em') || $width.includes('rem')) + ? $width + : `${$width}px` + : undefined}; + height: ${$height + ? typeof $height === 'string' && ($height.includes('em') || $height.includes('rem')) + ? $height + : `${$height}px` + : undefined}; `} `; diff --git a/packages/ui/src/icons/CreditCard.tsx b/packages/ui/src/icons/CreditCard.tsx new file mode 100644 index 000000000..812fa23c4 --- /dev/null +++ b/packages/ui/src/icons/CreditCard.tsx @@ -0,0 +1,17 @@ +import { forwardRef } from 'react'; + +import { Icon, IconProps } from '../components'; + +const CreditCard = forwardRef((props, ref) => ( + + + +)); + +CreditCard.displayName = 'CreditCard'; + +export { CreditCard }; diff --git a/packages/ui/src/icons/SolidCreditCard.tsx b/packages/ui/src/icons/SolidCreditCard.tsx new file mode 100644 index 000000000..75f3dc325 --- /dev/null +++ b/packages/ui/src/icons/SolidCreditCard.tsx @@ -0,0 +1,18 @@ +import { forwardRef } from 'react'; + +import { Icon, IconProps } from '../components'; + +const SolidCreditCard = forwardRef((props, ref) => ( + + + + +)); + +SolidCreditCard.displayName = 'SolidCreditCard'; + +export { SolidCreditCard }; diff --git a/packages/ui/src/icons/index.ts b/packages/ui/src/icons/index.ts index c271d3641..2e4eae5a1 100644 --- a/packages/ui/src/icons/index.ts +++ b/packages/ui/src/icons/index.ts @@ -22,6 +22,7 @@ export { ChevronLeft } from './ChevronLeft'; export { ChevronRight } from './ChevronRight'; export { Clock } from './Clock'; export { Cog } from './Cog'; +export { CreditCard } from './CreditCard'; export { DocumentDuplicate } from './DocumentDuplicate'; export { EllipsisHorizontal } from './EllipsisHorizontal'; export { EllipsisVertical } from './EllipsisVertical'; @@ -37,6 +38,7 @@ export { PuzzlePiece } from './PuzzlePiece'; export { QrCode } from './QrCode'; export { QuestionMarkCircle } from './QuestionMarkCircle'; export { SolidClock } from './SolidClock'; +export { SolidCreditCard } from './SolidCreditCard'; export { SolidDocumentDuplicate } from './SolidDocumentDuplicate'; export { SolidGift } from './SolidGift'; export { SolidInformationCircle } from './SolidInformationCircle'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c7123f391..6ba8d3404 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -278,10 +278,10 @@ importers: version: 3.4.6(@dynamic-labs/rpc-providers@3.4.6(eventemitter3@5.0.1))(@zerodev/webauthn-key@5.3.3(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)))(eventemitter3@5.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) '@dynamic-labs/sdk-react-core': specifier: ^v3.0.0-alpha.29 - version: 3.4.6(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + version: 3.4.6(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) '@dynamic-labs/wagmi-connector': specifier: ^v3.0.0-alpha.29 - version: 3.4.6(svit3uz54pwx2nnmcxp7dz3jee) + version: 3.4.6(jacem5rvdc6vjxfcms3lds4squ) '@gobob/chains': specifier: workspace:^ version: link:../../packages/chains @@ -377,7 +377,7 @@ importers: version: 2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) wagmi: specifier: 'catalog:' - version: 2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + version: 2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) yup: specifier: 'catalog:' version: 0.32.11 @@ -447,7 +447,7 @@ importers: dependencies: '@binance/w3w-wagmi-connector-v2': specifier: 1.2.4-alpha.0 - version: 1.2.4-alpha.0(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.4.5))(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(wagmi@2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)) + version: 1.2.4-alpha.0(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.4.5))(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(wagmi@2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)) '@dynamic-labs/bitcoin': specifier: ^3.6.2 version: 3.8.5(@dynamic-labs/logger@3.8.5(eventemitter3@5.0.1))(@dynamic-labs/rpc-providers@3.8.5(eventemitter3@5.0.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.4.5) @@ -459,10 +459,13 @@ importers: version: 3.8.5(eventemitter3@5.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@dynamic-labs/sdk-react-core': specifier: ^3.6.2 - version: 3.8.5(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + version: 3.8.5(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) '@dynamic-labs/wagmi-connector': specifier: ^3.6.2 - version: 3.8.5(2yyrhe52wlsv7lkpd5ylcgbkjm) + version: 3.8.5(v2rmvkuqnx3yukimu7o4nopegu) + '@dynamic-labs/wallet-book': + specifier: ^3.8.5 + version: 3.8.5(eventemitter3@5.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@gobob/bob-sdk': specifier: ^3.1.0 version: 3.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -535,6 +538,9 @@ importers: bitcoin-address-validation: specifier: 'catalog:' version: 2.2.3 + boring-avatars: + specifier: ^1.11.2 + version: 1.11.2 date-fns: specifier: 'catalog:' version: 3.6.0 @@ -582,7 +588,7 @@ importers: version: 2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) wagmi: specifier: 'catalog:' - version: 2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + version: 2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) yup: specifier: 'catalog:' version: 0.32.11 @@ -6595,6 +6601,9 @@ packages: boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + boring-avatars@1.11.2: + resolution: {integrity: sha512-3+wkwPeObwS4R37FGXMYViqc4iTrIRj5yzfX9Qy4mnpZ26sX41dGMhsAgmKks1r/uufY1pl4vpgzMWHYfJRb2A==} + bowser@2.11.0: resolution: {integrity: sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==} @@ -14287,12 +14296,12 @@ snapshots: hash.js: 1.1.7 js-base64: 3.7.7 - '@binance/w3w-wagmi-connector-v2@1.2.4-alpha.0(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.4.5))(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(wagmi@2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))': + '@binance/w3w-wagmi-connector-v2@1.2.4-alpha.0(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.4.5))(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(wagmi@2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))': dependencies: '@binance/w3w-ethereum-provider': 1.1.8-alpha.0(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.4.5))(utf-8-validate@5.0.10) '@binance/w3w-utils': 1.1.4 viem: 2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) - wagmi: 2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + wagmi: 2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) transitivePeerDependencies: - bufferutil - debug @@ -14938,7 +14947,7 @@ snapshots: '@dynamic-labs/sdk-api-core@0.0.570': {} - '@dynamic-labs/sdk-react-core@3.4.6(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': + '@dynamic-labs/sdk-react-core@3.4.6(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': dependencies: '@dynamic-labs/assert-package-version': 3.4.6(eventemitter3@5.0.1) '@dynamic-labs/iconic': 3.4.6(eventemitter3@5.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -14960,14 +14969,14 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) react-focus-lock: 2.9.2(@types/react@18.3.3)(react@18.3.1) - react-i18next: 13.5.0(i18next@23.4.6)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + react-i18next: 13.5.0(i18next@23.4.6)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) react-international-phone: 4.2.5(react@18.3.1) yup: 0.32.11 transitivePeerDependencies: - '@types/react' - react-native - '@dynamic-labs/sdk-react-core@3.8.5(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': + '@dynamic-labs/sdk-react-core@3.8.5(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': dependencies: '@dynamic-labs/assert-package-version': 3.8.5(eventemitter3@5.0.1) '@dynamic-labs/iconic': 3.8.5(eventemitter3@5.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -14990,7 +14999,7 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) react-focus-lock: 2.9.2(@types/react@18.3.3)(react@18.3.1) - react-i18next: 13.5.0(i18next@23.4.6)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + react-i18next: 13.5.0(i18next@23.4.6)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) react-international-phone: 4.2.5(react@18.3.1) yup: 0.32.11 transitivePeerDependencies: @@ -15045,35 +15054,35 @@ snapshots: eventemitter3: 5.0.1 tldts: 6.0.16 - '@dynamic-labs/wagmi-connector@3.4.6(svit3uz54pwx2nnmcxp7dz3jee)': + '@dynamic-labs/wagmi-connector@3.4.6(jacem5rvdc6vjxfcms3lds4squ)': dependencies: '@dynamic-labs/assert-package-version': 3.4.6(eventemitter3@5.0.1) '@dynamic-labs/ethereum-core': 3.8.5(@dynamic-labs/assert-package-version@3.4.6(eventemitter3@5.0.1))(@dynamic-labs/logger@3.4.6(eventemitter3@5.0.1))(@dynamic-labs/rpc-providers@3.4.6(eventemitter3@5.0.1))(@dynamic-labs/types@3.4.6(eventemitter3@5.0.1))(@dynamic-labs/utils@3.4.6)(@dynamic-labs/wallet-book@3.4.6(eventemitter3@5.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@dynamic-labs/wallet-connector-core@3.4.6(@dynamic-labs/assert-package-version@3.4.6(eventemitter3@5.0.1))(@dynamic-labs/logger@3.4.6(eventemitter3@5.0.1))(@dynamic-labs/rpc-providers@3.4.6(eventemitter3@5.0.1))(@dynamic-labs/types@3.4.6(eventemitter3@5.0.1))(@dynamic-labs/utils@3.4.6)(@dynamic-labs/wallet-book@3.4.6(eventemitter3@5.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(eventemitter3@5.0.1))(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) '@dynamic-labs/logger': 3.4.6(eventemitter3@5.0.1) '@dynamic-labs/rpc-providers': 3.4.6(eventemitter3@5.0.1) - '@dynamic-labs/sdk-react-core': 3.4.6(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + '@dynamic-labs/sdk-react-core': 3.4.6(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) '@dynamic-labs/types': 3.4.6(eventemitter3@5.0.1) '@dynamic-labs/wallet-connector-core': 3.4.6(@dynamic-labs/assert-package-version@3.4.6(eventemitter3@5.0.1))(@dynamic-labs/logger@3.4.6(eventemitter3@5.0.1))(@dynamic-labs/rpc-providers@3.4.6(eventemitter3@5.0.1))(@dynamic-labs/types@3.4.6(eventemitter3@5.0.1))(@dynamic-labs/utils@3.4.6)(@dynamic-labs/wallet-book@3.4.6(eventemitter3@5.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(eventemitter3@5.0.1) '@wagmi/core': 2.14.5(@tanstack/query-core@5.44.0)(@types/react@18.3.3)(react@18.3.1)(typescript@5.4.5)(use-sync-external-store@1.2.2(react@18.3.1))(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) eventemitter3: 5.0.1 react: 18.3.1 viem: 2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) - wagmi: 2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + wagmi: 2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) - '@dynamic-labs/wagmi-connector@3.8.5(2yyrhe52wlsv7lkpd5ylcgbkjm)': + '@dynamic-labs/wagmi-connector@3.8.5(v2rmvkuqnx3yukimu7o4nopegu)': dependencies: '@dynamic-labs/assert-package-version': 3.8.5(eventemitter3@5.0.1) '@dynamic-labs/ethereum-core': 3.8.5(@dynamic-labs/assert-package-version@3.8.5(eventemitter3@5.0.1))(@dynamic-labs/logger@3.8.5(eventemitter3@5.0.1))(@dynamic-labs/rpc-providers@3.8.5(eventemitter3@5.0.1))(@dynamic-labs/types@3.8.5(eventemitter3@5.0.1))(@dynamic-labs/utils@3.8.5)(@dynamic-labs/wallet-book@3.8.5(eventemitter3@5.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@dynamic-labs/wallet-connector-core@3.8.5(@dynamic-labs/assert-package-version@3.8.5(eventemitter3@5.0.1))(@dynamic-labs/logger@3.8.5(eventemitter3@5.0.1))(@dynamic-labs/rpc-providers@3.8.5(eventemitter3@5.0.1))(@dynamic-labs/types@3.8.5(eventemitter3@5.0.1))(@dynamic-labs/utils@3.8.5)(@dynamic-labs/wallet-book@3.8.5(eventemitter3@5.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(eventemitter3@5.0.1))(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) '@dynamic-labs/logger': 3.8.5(eventemitter3@5.0.1) '@dynamic-labs/rpc-providers': 3.8.5(eventemitter3@5.0.1) - '@dynamic-labs/sdk-react-core': 3.8.5(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + '@dynamic-labs/sdk-react-core': 3.8.5(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) '@dynamic-labs/types': 3.8.5(eventemitter3@5.0.1) '@dynamic-labs/wallet-connector-core': 3.8.5(@dynamic-labs/assert-package-version@3.8.5(eventemitter3@5.0.1))(@dynamic-labs/logger@3.8.5(eventemitter3@5.0.1))(@dynamic-labs/rpc-providers@3.8.5(eventemitter3@5.0.1))(@dynamic-labs/types@3.8.5(eventemitter3@5.0.1))(@dynamic-labs/utils@3.8.5)(@dynamic-labs/wallet-book@3.8.5(eventemitter3@5.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(eventemitter3@5.0.1) '@wagmi/core': 2.14.5(@tanstack/query-core@5.44.0)(@types/react@18.3.3)(react@18.3.1)(typescript@5.4.5)(use-sync-external-store@1.2.2(react@18.3.1))(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) eventemitter3: 5.0.1 react: 18.3.1 viem: 2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) - wagmi: 2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.2(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + wagmi: 2.12.30(@tanstack/query-core@5.44.0)(@tanstack/react-query@5.44.0(react@18.3.1))(@types/node@20.14.2)(@types/react@18.3.3)(@upstash/redis@1.34.3)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.7)(@babel/preset-env@7.24.7(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(terser@5.31.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) '@dynamic-labs/wallet-book@3.4.6(eventemitter3@5.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -21919,6 +21928,8 @@ snapshots: boolbase@1.0.0: {} + boring-avatars@1.11.2: {} + bowser@2.11.0: {} bplist-parser@0.2.0: