Skip to content

Commit fa09235

Browse files
authored
Merge pull request #273 from lidofinance/deps-update
Update dependencies
2 parents 63e9e9c + eb026f0 commit fa09235

File tree

68 files changed

+4321
-3134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+4321
-3134
lines changed

.eslintrc.base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"parserOptions": {
1010
"sourceType": "module"
1111
},
12-
"plugins": ["@typescript-eslint", "react"],
12+
"plugins": ["@typescript-eslint", "react", "react-hooks"],
1313
"rules": {
1414
"@typescript-eslint/require-await": "off",
1515
"react/display-name": "off",

.yarn/releases/yarn-3.6.3.cjs

Lines changed: 0 additions & 874 deletions
This file was deleted.

.yarn/releases/yarn-3.8.7.cjs

Lines changed: 875 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
nodeLinker: node-modules
1+
cacheFolder: .yarn/cache
22

3-
yarnPath: .yarn/releases/yarn-3.6.3.cjs
3+
nodeLinker: node-modules
44

55
plugins:
66
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
7-
spec: '@yarnpkg/plugin-workspace-tools'
7+
spec: "@yarnpkg/plugin-workspace-tools"
88
- path: .yarn/plugins/@yarnpkg/plugin-echo-execute.cjs
9-
spec: 'https://yarnplugins.com/echo-execute'
9+
spec: "https://yarnplugins.com/echo-execute"
1010

11-
cacheFolder: .yarn/cache
11+
yarnPath: .yarn/releases/yarn-3.8.7.cjs

apps/demo-react/.eslintrc.cjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,13 @@ module.exports = {
1212
'import/no-unresolved': 'off',
1313
'react-hooks/exhaustive-deps': 'error',
1414
},
15+
// This tells ESLint not to apply the TypeScript type checking to cjs files
16+
overrides: [
17+
{
18+
files: ['*.cjs', '.eslintrc.cjs'],
19+
parserOptions: {
20+
project: null,
21+
},
22+
},
23+
],
1524
};

apps/demo-react/components/layout/header/headerWallet.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { FC } from 'react';
2-
import { useAccount } from 'wagmi';
2+
import { useConnection } from 'wagmi';
33
import { ThemeToggler } from '@lidofinance/lido-ui';
44

55
import WalletButton from 'components/layout/header/walletButton';
@@ -11,7 +11,7 @@ import { getChainColor } from 'utils/getChainColor';
1111
import { HeaderWalletChainStyle } from './headerWalletStyles';
1212

1313
const HeaderWallet: FC = () => {
14-
const { chain, chainId, isConnected } = useAccount();
14+
const { chain, chainId, isConnected } = useConnection();
1515

1616
return (
1717
<>

apps/demo-react/components/wallet-fallback/useErrorMessage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import {
33
getUnsupportedChainError,
44
} from 'reef-knot/core-react';
55
import { helpers, useSupportedChains, useWeb3 } from 'reef-knot/web3-react';
6-
import { useAccount, useConfig } from 'wagmi';
6+
import { useConnection, useConfig } from 'wagmi';
77

88
export const useErrorMessage = (): string | undefined => {
99
const { error } = useWeb3();
1010
const { chains } = useConfig();
11-
const { isConnected } = useAccount();
11+
const { isConnected } = useConnection();
1212
const { isUnsupported } = useSupportedChains();
1313
const { isLedger } = useConnectorInfo();
1414

apps/demo-react/components/wallet-info/wallet-info-content.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react';
2-
import { useAccount } from 'wagmi';
3-
import { useCapabilities } from 'wagmi/experimental';
2+
import { useConnection, useCapabilities } from 'wagmi';
43
import { Close } from '@lidofinance/lido-ui';
54
import { useWeb3, useSupportedChains } from 'reef-knot/web3-react';
65
import { useConnectorInfo } from 'reef-knot/core-react';
@@ -39,7 +38,7 @@ export const WalletInfoContent = ({
3938
isConnected: wagmiIsConnected,
4039
connector,
4140
chain,
42-
} = useAccount();
41+
} = useConnection();
4342

4443
return (
4544
<div>

apps/demo-react/components/walletModal/walletModal.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { FC, useCallback } from 'react';
12
import {
23
Address,
34
ButtonIcon,
@@ -9,10 +10,17 @@ import {
910
Select,
1011
Option,
1112
} from '@lidofinance/lido-ui';
13+
import {
14+
usePublicClient,
15+
useConnection,
16+
useChainId,
17+
useChains,
18+
useSwitchChain,
19+
useConnections
20+
} from 'wagmi';
1221

1322
import { useForceDisconnect, useConnectorInfo } from 'reef-knot/core-react';
1423
import { useCopyToClipboard } from 'hooks/useCopyToClipboard';
15-
import { FC, useCallback } from 'react';
1624
import {
1725
WalletModalContentStyle,
1826
WalletModalConnectedStyle,
@@ -22,18 +30,14 @@ import {
2230
WalletModalAddressStyle,
2331
WalletModalActionsStyle,
2432
} from './walletModalStyles';
25-
import { usePublicClient } from 'wagmi';
26-
import { useAccount } from 'wagmi';
27-
import { useChainId } from 'wagmi';
28-
import { useSwitchChain } from 'wagmi';
29-
import { useConnections } from 'wagmi';
3033

3134
const WalletModal: FC<ModalProps> = (props) => {
3235
const { onClose } = props;
3336
const chainId = useChainId();
3437
const [connection] = useConnections();
35-
const { chains, switchChain } = useSwitchChain();
36-
const { address } = useAccount();
38+
const chains = useChains();
39+
const { mutate: switchChain } = useSwitchChain();
40+
const { address } = useConnection();
3741
const client = usePublicClient();
3842
const { connectorName } = useConnectorInfo();
3943
const { forceDisconnect } = useForceDisconnect();

apps/demo-react/hooks/ethBalance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import useSWR from 'swr';
2-
import { useAccount } from 'wagmi';
2+
import { useConnection } from 'wagmi';
33

44
import { useLidoSDK } from 'providers/sdk';
55

66
export const useETHBalance = () => {
77
const { core } = useLidoSDK();
8-
const { address: account, isConnected, chain } = useAccount();
8+
const { address: account, isConnected, chain } = useConnection();
99

1010
return useSWR(
1111
['swr:eth_balance', chain?.id],

0 commit comments

Comments
 (0)