Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace web3-react with wagmi and add seif, tailwind and compass wallet connectors #1239

Merged
merged 85 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
6a6f3e8
Add seif, tailwind and compass wallet connectors
tiagofilipenunes May 29, 2024
5389446
Adjust wallet icon width and height to 100%
tiagofilipenunes May 29, 2024
b7cbc9a
Fix build issues
tiagofilipenunes May 29, 2024
359b46e
Refactor injected wallet check
tiagofilipenunes May 29, 2024
096f5fc
Add tailwind wallet svg logo
tiagofilipenunes May 29, 2024
700cdaf
Add noConnector placeholder connector and use in tailwind, seif, and …
tiagofilipenunes May 29, 2024
5971637
Check injected wallet is not metamask for getInjectedProvider, remove…
tiagofilipenunes May 29, 2024
621cbdd
Check injected connector exists on window.ethereum. If not, redirect …
tiagofilipenunes May 29, 2024
2fec028
Update tailwind logo
tiagofilipenunes May 29, 2024
df93103
Merge branch 'main' into add-sei-wallets
tiagofilipenunes May 29, 2024
9bc4ed3
Remove eslint disable comment
tiagofilipenunes May 29, 2024
2b993ae
Replace multicall3 address by the official deployment one
tiagofilipenunes May 29, 2024
b92cd93
Update tailwind wallet connector
tiagofilipenunes Jun 3, 2024
7d367d6
Rename selectableConnection to selectedConnection to avoid confusion
tiagofilipenunes Jun 3, 2024
45120c1
Changes to web3-react
tiagofilipenunes Jun 3, 2024
18fb479
Update type in web3.constants
tiagofilipenunes Jun 3, 2024
6e0caf0
Fix config types
tiagofilipenunes Jun 4, 2024
dd70409
Replace web3-react by wagmi
tiagofilipenunes Jun 5, 2024
61c9f69
Improve useWagmi connector use
tiagofilipenunes Jun 6, 2024
f0f55e5
Fix GTM events for manual/auto connect/disconnect and swap wallet
tiagofilipenunes Jun 6, 2024
d131323
Remove walletConnect from Sei
tiagofilipenunes Jun 6, 2024
7d1729a
Use async connect and disconnect to prevent race conditions
tiagofilipenunes Jun 6, 2024
64756f6
Update tanstack query to v5
tiagofilipenunes Jun 7, 2024
2f85f07
Replace throwing error with console.error in connect and disconnect w…
tiagofilipenunes Jun 7, 2024
a64cdda
Replace default rpc url in Ethereum config
tiagofilipenunes Jun 7, 2024
5ff19f3
Throw error for wallet not connected instead of success and redirecti…
tiagofilipenunes Jun 7, 2024
14aeddf
Remove console log debug
tiagofilipenunes Jun 7, 2024
4f4a3ba
Add ens registry and universal resolver to config and populate wagmiC…
tiagofilipenunes Jun 7, 2024
3c79d2f
Move tenderly faucet params to config and add sei tenderly faucet
tiagofilipenunes Jun 7, 2024
7fb4f09
Merge branch 'main' into add-sei-wallets
tiagofilipenunes Jun 7, 2024
f76d9d1
Update connector error message
tiagofilipenunes Jun 7, 2024
b2a13a2
Rename wagmi library files
tiagofilipenunes Jun 7, 2024
545420d
Remove unused dependencies and add stream-browserify
tiagofilipenunes Jun 10, 2024
28bb7c8
Rename web3 to wagmi and removed deprecated comments
tiagofilipenunes Jun 10, 2024
94dc77e
Improve wallet connect and disconnect error handling
tiagofilipenunes Jun 10, 2024
044e11e
Add back button to restart wallet connection
tiagofilipenunes Jun 10, 2024
b9d4da8
Rename function to return on wallet connect error and move gtm specif…
tiagofilipenunes Jun 10, 2024
2450eda
Refactor and update wagmi library
tiagofilipenunes Jun 10, 2024
f2b6391
Change e2e workflow to install using lockfile
tiagofilipenunes Jun 10, 2024
b7641ce
Update e2e playwright docker version
tiagofilipenunes Jun 10, 2024
b7385f9
Revert e2e changes
tiagofilipenunes Jun 10, 2024
d6b39a3
Try installing build-essentials on e2e workflow
tiagofilipenunes Jun 10, 2024
79bb2de
Revert changes to e2e workflow
tiagofilipenunes Jun 10, 2024
0f94f08
Add allowed domains to Gnosis Safe
tiagofilipenunes Jun 10, 2024
7dae6ae
Remove use-async-effect package
tiagofilipenunes Jun 10, 2024
4f89291
Update free RPCs for Ethereum and Sei
tiagofilipenunes Jun 10, 2024
f0ee866
Remove unused exports
tiagofilipenunes Jun 10, 2024
0ad275a
Document wagmi functions
tiagofilipenunes Jun 10, 2024
9a56295
Refactor wagmi library
tiagofilipenunes Jun 10, 2024
5eef201
Fix dev mode safe connector error
tiagofilipenunes Jun 11, 2024
37a3dbc
Update node type and force vite plugin rewrite version as next one br…
tiagofilipenunes Jun 11, 2024
848f57d
Hide safe connector if not in an iframe
tiagofilipenunes Jun 11, 2024
ccf0572
Update yarn lock
tiagofilipenunes Jun 11, 2024
8fc79e9
Clean-up code
tiagofilipenunes Jun 11, 2024
511a5d1
Add install build-essential to e2e workflow
tiagofilipenunes Jun 11, 2024
888d459
Merge branch 'main' into add-sei-wallets
tiagofilipenunes Jun 11, 2024
f1301b6
[CI] Update Screenshots
tiagofilipenunes Jun 11, 2024
da0c3f8
Add check to remove placeholder connectors
tiagofilipenunes Jun 12, 2024
4d5ecf7
Merge branch 'main' into add-sei-wallets
tiagofilipenunes Jun 12, 2024
cd66fbe
[CI] Update Screenshots
tiagofilipenunes Jun 12, 2024
868bb69
Merge branch 'main' into add-sei-wallets
tiagofilipenunes Jun 13, 2024
36bac6b
[CI] Update Screenshots
tiagofilipenunes Jun 13, 2024
f83c847
Remove stream-browserify
tiagofilipenunes Jun 14, 2024
3b7a592
Use output tag
tiagofilipenunes Jun 14, 2024
03fdb26
Remove SupportedChainId and remove EnumConnectionType
tiagofilipenunes Jun 14, 2024
1d3b19f
Change WalletIcon props
tiagofilipenunes Jun 14, 2024
daad90d
Remove isImposter and pass imposterAccount
tiagofilipenunes Jun 14, 2024
6f9af5a
Remove void from useEffect in wagmi lib
tiagofilipenunes Jun 14, 2024
d308ece
Add comment to iFrame check for safe wallet
tiagofilipenunes Jun 14, 2024
b7bdb30
Change getAccount to use hook instead and get chainId directly from c…
tiagofilipenunes Jun 14, 2024
7bb56df
Return icon directly in walletIcon
tiagofilipenunes Jun 14, 2024
72f6f6b
Change utils config type
tiagofilipenunes Jun 14, 2024
5f553e7
[CI] Update Screenshots
tiagofilipenunes Jun 14, 2024
53a3ccb
Add blockedConnectors to config and use rdns instead of name to check…
tiagofilipenunes Jun 17, 2024
82f609b
Add instructions to readme for selectedConnectors and blockedConnectors
tiagofilipenunes Jun 17, 2024
92f0c8a
Fix typo in comment
tiagofilipenunes Jun 17, 2024
3bebc9d
Fix connection on error clean-up and attempt to disconnect connector
tiagofilipenunes Jun 17, 2024
8e62723
Merge branch 'main' into add-sei-wallets
tiagofilipenunes Jun 17, 2024
9989a48
Fix merge changes:
tiagofilipenunes Jun 17, 2024
4d690a1
Set lazy loading and change alt text
tiagofilipenunes Jun 18, 2024
59df230
Remove unnecessary useMemo and useCallback, replace imposter useCallb…
tiagofilipenunes Jun 18, 2024
f1224bb
Merge branch 'main' into add-sei-wallets
tiagofilipenunes Jun 18, 2024
dc5d87d
[CI] Update Screenshots
tiagofilipenunes Jun 18, 2024
ccf265d
Merge branch 'main' into add-sei-wallets
tiagofilipenunes Jun 18, 2024
f38be59
[CI] Update Screenshots
tiagofilipenunes Jun 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install build-essential
run: apt-get update && apt-get install -y build-essential
- name: Install dependencies
run: yarn
- name: Install Playwright browsers and run Playwright tests
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 8 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
"@babel/core": "^7.0.0-0",
"@bancor/carbon-sdk": "^0.0.97-DEV",
"@cloudflare/workers-types": "^4.20230717.0",
"@coinbase/wallet-sdk": "^3.6.3",
"@ethersproject/abi": "^5.0.0",
"@ethersproject/bytes": "^5.0.0",
"@ethersproject/providers": "^5.7.1",
"@floating-ui/react": "^0.25.4",
"@playwright/test": "^1.43.1",
"@sentry/react": "^7.48.0",
"@sentry/vite-plugin": "^0.7.2",
"@tanstack/react-query": "^4.14.5",
"@tanstack/react-query-devtools": "^4.14.5",
"@tanstack/react-query": "^5.40.1",
"@tanstack/react-query-devtools": "^5.40.1",
"@tanstack/react-router": "^1.4.9",
"@tanstack/react-table": "^8.9.3",
"@tanstack/react-virtual": "^3.0.0-beta.30",
Expand All @@ -28,22 +27,14 @@
"@typechain/ethers-v5": "^10.1.0",
"@types/body-scroll-lock": "^3.1.0",
"@types/lodash": "4.14.191",
"@types/node": "^16.7.13",
"@types/node": "^20.0.0",
"@types/numeral": "^2.0.2",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/ua-parser-js": "^0.7.36",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"@vitejs/plugin-react": "^3.1.0",
"@walletconnect/ethereum-provider": "^2.9.2",
"@web3-react/coinbase-wallet": "8.2.2",
"@web3-react/core": "8.2.2",
"@web3-react/gnosis-safe": "8.2.3",
"@web3-react/metamask": "8.2.3",
"@web3-react/network": "8.2.2",
"@web3-react/types": "8.2.2",
"@web3-react/walletconnect-v2": "^8.5.0",
"autoprefixer": "^10.4.12",
"body-scroll-lock": "^4.0.0-beta.0",
"buffer": "^6.0.3",
Expand Down Expand Up @@ -74,6 +65,7 @@
"lint-staged": "^14.0.1",
"lodash": "^4.17.21",
"lz-string": "^1.5.0",
"mipd": "^0.0.7",
"numbro": "^2.3.6",
"numeral": "^2.0.6",
"postcss": "^8.4.31",
Expand All @@ -83,18 +75,20 @@
"react-day-picker": "^8.10.0",
"react-dom": "^18.2.0",
"source-map-explorer": "^2.5.3",
"stream-browserify": "^3.0.0",
tiagofilipenunes marked this conversation as resolved.
Show resolved Hide resolved
"tailwind-merge": "^2.2.2",
"tailwindcss": "3.4.3",
"typechain": "^8.1.0",
"typescript": "^5.3.3",
"ua-parser-js": "^1.0.35",
"use-async-effect": "^2.2.7",
"valibot": "^0.28.1",
"viem": "2.x",
"vite": "5.0.13",
"vite-plugin-rewrite-all": "^1.0.1",
"vite-plugin-rewrite-all": "1.0.1",
"vite-plugin-svgr": "^2.4.0",
"vite-tsconfig-paths": "^4.2.1",
"vitest": "^0.29.8",
"wagmi": "2.9.10",
"web-vitals": "^2.1.0"
},
"scripts": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/logos/compassWallet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/logos/seifWallet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/assets/logos/tailwindWallet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/activity/ActivityProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const ActivityProvider: FC<Props> = ({ children, params, empty }) => {
user: params.ownerId,
});

if (activityQuery.isLoading || userStrategiesQuery.isLoading) {
if (activityQuery.isPending || userStrategiesQuery.isPending) {
return <CarbonLogoLoading className="w-[100px] flex-1 self-center" />;
}
const activities = activityQuery.data ?? [];
Expand Down
8 changes: 4 additions & 4 deletions src/components/activity/useActivityNotifiction.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useWeb3 } from 'libs/web3';
import { useWagmi } from 'libs/wagmi';
import { useActivityQuery } from './useActivityQuery';
import { useEffect, useState } from 'react';
import { useNotifications } from 'hooks/useNotifications';

export const useActivityNotifications = () => {
const { user } = useWeb3();
const { user } = useWagmi();
const [previousUser, setPreviousUser] = useState<string | null>(null);
const [previous, setPrevious] = useState<number | null>(null);
const query = useActivityQuery({ ownerId: user });
Expand All @@ -15,7 +15,7 @@ export const useActivityNotifications = () => {
const { dispatchNotification } = useNotifications();

useEffect(() => {
if (query.isLoading) return;
if (query.isPending) return;
// We need to keep this in the same useEffect to force re-evaluate previous in next render
if (user && user !== previousUser) {
setPreviousUser(user);
Expand All @@ -35,7 +35,7 @@ export const useActivityNotifications = () => {
buyOrSell,
dispatchNotification,
previous,
query.isLoading,
query.isPending,
previousUser,
user,
]);
Expand Down
16 changes: 7 additions & 9 deletions src/components/activity/useActivityQuery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,17 @@ const isValidParams = (params: QueryActivityParams) => {
};

export const useActivityQuery = (params: QueryActivityParams = {}) => {
const { tokensMap, isLoading } = useTokens();
const { tokensMap, isPending } = useTokens();
const validParams = isValidParams(params);
return useQuery(
QueryKey.activities(params),
async () => {
return useQuery({
queryKey: QueryKey.activities(params),
queryFn: async () => {
const activities = await carbonApi.getActivity(params);
return toActivities(activities, tokensMap).sort((a, b) => {
return b.date.getTime() - a.date.getTime();
});
},
{
enabled: !isLoading && validParams,
refetchInterval: THIRTY_SEC_IN_MS,
}
);
enabled: !isPending && validParams,
refetchInterval: THIRTY_SEC_IN_MS,
});
};
4 changes: 2 additions & 2 deletions src/components/common/TokenInputField/TokenInputField.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ChangeEvent, FC, FocusEvent, useRef } from 'react';
import { SafeDecimal } from 'libs/safedecimal';
import { Token } from 'libs/tokens';
import { useWeb3 } from 'libs/web3';
import { useWagmi } from 'libs/wagmi';
import { useFiatCurrency } from 'hooks/useFiatCurrency';
import { LogoImager } from 'components/common/imager/Imager';
import { Slippage } from './Slippage';
Expand Down Expand Up @@ -49,7 +49,7 @@ export const TokenInputField: FC<Props> = (props) => {
withoutWallet,
'data-testid': testid,
} = props;
const { user } = useWeb3();
const { user } = useWagmi();
const inputRef = useRef<HTMLInputElement>(null);
const { getFiatValue, getFiatAsString } = useFiatCurrency(token);
const fiatValueUsd = getFiatValue(value, true);
Expand Down
48 changes: 48 additions & 0 deletions src/components/common/WalletIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { ReactComponent as IconCoinbaseLogo } from 'assets/logos/coinbase.svg';
import { ReactComponent as IconCompassWalletLogo } from 'assets/logos/compassWallet.svg';
import { ReactComponent as IconTailwindWalletLogo } from 'assets/logos/tailwindWallet.svg';
import { ReactComponent as IconSeifWalletLogo } from 'assets/logos/seifWallet.svg';
import { ReactComponent as IconGnosisLogo } from 'assets/logos/gnosis.svg';
import { ReactComponent as IconImposterLogo } from 'assets/logos/imposter.svg';
import { ReactComponent as IconMetaMaskLogo } from 'assets/logos/metamask.svg';
import { ReactComponent as IconWalletConnectLogo } from 'assets/logos/walletConnect.svg';
import { ReactComponent as IconWallet } from 'assets/icons/wallet.svg';

type Props = JSX.IntrinsicElements['img'] &
tiagofilipenunes marked this conversation as resolved.
Show resolved Hide resolved
JSX.IntrinsicElements['svg'] & {
isImposter?: boolean;
selectedWallet?: string;
icon?: string;
};
export const WalletIcon = ({
isImposter,
selectedWallet,
icon,
...attr
}: Props) => {
if (isImposter) {
return <IconImposterLogo {...attr} />;
}

// For EIP6963 injected wallets
if (icon) return <img alt="Wallet Logo" src={icon} {...attr} />;

switch (selectedWallet) {
case 'MetaMask':
return <IconMetaMaskLogo {...attr} />;
case 'WalletConnect':
return <IconWalletConnectLogo {...attr} />;
case 'Coinbase Wallet':
return <IconCoinbaseLogo {...attr} />;
case 'Safe':
return <IconGnosisLogo {...attr} />;
case 'Tailwind Wallet':
return <IconTailwindWalletLogo {...attr} />;
case 'Compass Wallet':
return <IconCompassWalletLogo {...attr} />;
case 'Seif Wallet':
return <IconSeifWalletLogo {...attr} />;
default:
return <IconWallet {...attr} />;
}
};
10 changes: 5 additions & 5 deletions src/components/common/approval/ApproveToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Switch } from 'components/common/switch';
import { ApprovalTokenResult } from 'hooks/useApproval';
import { LogoImager } from 'components/common/imager/Imager';
import { QueryKey, useQueryClient } from 'libs/queries';
import { useWeb3 } from 'libs/web3';
import { useWagmi } from 'libs/wagmi';
import { useNotifications } from 'hooks/useNotifications';
import { useTokens } from 'hooks/useTokens';
import { carbonEvents } from 'services/events';
Expand All @@ -19,21 +19,21 @@ import { ReactComponent as IconWarning } from 'assets/icons/warning.svg';

type Props = {
data?: ApprovalTokenResult;
isLoading: boolean;
isPending: boolean;
error: unknown;
eventData?: StrategyEventOrTradeEvent & TokenApprovalType;
context?: 'depositStrategyFunds' | 'createStrategy' | 'trade';
};

export const ApproveToken: FC<Props> = ({
data,
isLoading,
isPending,
error,
eventData,
context,
}) => {
const { dispatchNotification } = useNotifications();
const { user } = useWeb3();
const { user } = useWagmi();
const { getTokenById } = useTokens();
const token = getTokenById(data?.address || '');
const mutation = useSetUserApproval();
Expand Down Expand Up @@ -157,7 +157,7 @@ export const ApproveToken: FC<Props> = ({
};

if (!data || !token) {
if (isLoading) {
if (isPending) {
return <div>is loading</div>;
}
return <div>Unknown Error</div>;
Expand Down
10 changes: 5 additions & 5 deletions src/components/core/MainContent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FC, useEffect, useRef } from 'react';
import { useWeb3 } from 'libs/web3';
import { useWagmi } from 'libs/wagmi';
import { ErrorUnsupportedNetwork } from 'components/core/error/ErrorUnsupportedNetwork';
import { ErrorNetworkConnection } from 'components/core/error/ErrorNetworkConnection';
import { useTokens } from 'hooks/useTokens';
Expand All @@ -23,7 +23,7 @@ const paths: Record<string, Pathnames> = {
};

export const MainContent: FC = () => {
const web3 = useWeb3();
const wagmi = useWagmi();
const { location } = useRouterState();
const prevPathnameRef = useRef('');
const tokens = useTokens();
Expand All @@ -47,11 +47,11 @@ export const MainContent: FC = () => {
return <Outlet />;
}

if (!web3.isSupportedNetwork) {
if (!wagmi.isSupportedNetwork) {
return <ErrorUnsupportedNetwork />;
}

if (web3.networkError) {
if (wagmi.networkError) {
return <ErrorNetworkConnection />;
}

Expand All @@ -63,7 +63,7 @@ export const MainContent: FC = () => {
return <ErrorTokenList />;
}

if (web3.isUserBlocked) {
if (wagmi.isUserBlocked) {
return <ErrorUserBlocked />;
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/core/error/ErrorUnsupportedNetwork.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ReactComponent as IconWarning } from 'assets/icons/warning.svg';
import { Button } from 'components/common/button';
import { useWeb3 } from 'libs/web3';
import { useWagmi } from 'libs/wagmi';
import { ErrorWrapper } from 'components/core/error/ErrorWrapper';
import config from 'config';

export const ErrorUnsupportedNetwork = () => {
const { disconnect, switchNetwork } = useWeb3();
const { disconnect, switchNetwork } = useWagmi();

const networkName = config.network.name;

Expand Down
4 changes: 2 additions & 2 deletions src/components/core/error/ErrorUserBlocked.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useWeb3 } from 'libs/web3';
import { useWagmi } from 'libs/wagmi';
import { NewTabLink, externalLinks } from 'libs/routing';
import { ErrorWrapper } from 'components/core/error/ErrorWrapper';
import { Button } from 'components/common/button';
import { ReactComponent as IconWarning } from 'assets/icons/warning.svg';

export const ErrorUserBlocked = () => {
const { disconnect } = useWeb3();
const { disconnect } = useWagmi();

return (
<ErrorWrapper
Expand Down
2 changes: 1 addition & 1 deletion src/components/core/menu/mainMenu/MainMenuRight.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FC } from 'react';
import { IS_TENDERLY_FORK } from 'libs/web3';
import { IS_TENDERLY_FORK } from 'libs/wagmi';
import { useBreakpoints } from 'hooks/useBreakpoints';
import { MainMenuRightWallet } from 'components/core/menu/mainMenu/MainMenuRightWallet';
import { MainMenuRightNotifications } from 'components/core/menu/mainMenu/MainMenuRightNotifications';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { FC } from 'react';
import { useModal } from 'hooks/useModal';
import { ReactComponent as IconBell } from 'assets/icons/bell.svg';
import { useNotifications } from 'hooks/useNotifications';
import { useWeb3 } from 'libs/web3';
import { useWagmi } from 'libs/wagmi';
import { Button } from 'components/common/button';
import { carbonEvents } from 'services/events';

export const MainMenuRightNotifications: FC = () => {
const { user } = useWeb3();
const { user } = useWagmi();
const { openModal } = useModal();
const { hasPendingTx, notifications } = useNotifications();

Expand Down
Loading