Commit 7098b5cf authored by tom goriunov's avatar tom goriunov Committed by GitHub

Merge pull request #968 from blockscout/tom2drum/up-web3modal

up packages versions
parents 82507012 a92f9379
...@@ -94,7 +94,7 @@ jobs: ...@@ -94,7 +94,7 @@ jobs:
needs: [ code_quality ] needs: [ code_quality ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: mcr.microsoft.com/playwright:v1.32.0-focal image: mcr.microsoft.com/playwright:v1.35.1-focal
strategy: strategy:
fail-fast: false fail-fast: false
......
...@@ -11,6 +11,7 @@ export function walletConnect(): CspDev.DirectiveDescriptor { ...@@ -11,6 +11,7 @@ export function walletConnect(): CspDev.DirectiveDescriptor {
'connect-src': [ 'connect-src': [
'*.walletconnect.com', '*.walletconnect.com',
'wss://relay.walletconnect.com', 'wss://relay.walletconnect.com',
'wss://www.walletlink.org',
], ],
'img-src': [ 'img-src': [
'*.walletconnect.com', '*.walletconnect.com',
......
...@@ -27,14 +27,14 @@ ...@@ -27,14 +27,14 @@
"format-svg": "./node_modules/.bin/svgo -r ./icons", "format-svg": "./node_modules/.bin/svgo -r ./icons",
"test:pw": "./playwright/make-envs-script.sh && NODE_OPTIONS=\"--max-old-space-size=4096\" ./node_modules/.bin/dotenv -e ./configs/envs/.env.pw -- playwright test -c playwright-ct.config.ts", "test:pw": "./playwright/make-envs-script.sh && NODE_OPTIONS=\"--max-old-space-size=4096\" ./node_modules/.bin/dotenv -e ./configs/envs/.env.pw -- playwright test -c playwright-ct.config.ts",
"test:pw:local": "export NODE_PATH=$(pwd)/node_modules && rm -rf ./playwright/.cache && yarn test:pw", "test:pw:local": "export NODE_PATH=$(pwd)/node_modules && rm -rf ./playwright/.cache && yarn test:pw",
"test:pw:docker": "docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.32.0-focal ./playwright/run-tests.sh", "test:pw:docker": "docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.35.1-focal ./playwright/run-tests.sh",
"test:pw:ci": "yarn test:pw --project=$PW_PROJECT", "test:pw:ci": "yarn test:pw --project=$PW_PROJECT",
"test:jest": "jest", "test:jest": "jest",
"test:jest:watch": "jest --watch" "test:jest:watch": "jest --watch"
}, },
"dependencies": { "dependencies": {
"@chakra-ui/react": "2.5.1", "@chakra-ui/react": "2.7.1",
"@chakra-ui/theme-tools": "^2.0.14", "@chakra-ui/theme-tools": "^2.0.18",
"@emotion/react": "^11.10.4", "@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4", "@emotion/styled": "^11.10.4",
"@metamask/providers": "^10.2.1", "@metamask/providers": "^10.2.1",
...@@ -47,8 +47,8 @@ ...@@ -47,8 +47,8 @@
"@tanstack/react-query-devtools": "^4.0.10", "@tanstack/react-query-devtools": "^4.0.10",
"@types/papaparse": "^5.3.5", "@types/papaparse": "^5.3.5",
"@types/react-scroll": "^1.8.4", "@types/react-scroll": "^1.8.4",
"@web3modal/ethereum": "^2.4.1", "@web3modal/ethereum": "^2.6.2",
"@web3modal/react": "^2.4.1", "@web3modal/react": "^2.6.2",
"bignumber.js": "^9.1.0", "bignumber.js": "^9.1.0",
"chakra-react-select": "^4.4.3", "chakra-react-select": "^4.4.3",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
"lodash": "^4.0.0", "lodash": "^4.0.0",
"mixpanel-browser": "^2.47.0", "mixpanel-browser": "^2.47.0",
"monaco-editor": "^0.34.1", "monaco-editor": "^0.34.1",
"next": "13.3.0", "next": "13.4.7",
"nextjs-routes": "^1.0.8", "nextjs-routes": "^1.0.8",
"node-fetch": "^3.2.9", "node-fetch": "^3.2.9",
"papaparse": "^5.3.2", "papaparse": "^5.3.2",
...@@ -80,16 +80,17 @@ ...@@ -80,16 +80,17 @@
"react-identicons": "^1.2.5", "react-identicons": "^1.2.5",
"react-jazzicon": "^1.0.4", "react-jazzicon": "^1.0.4",
"react-scroll": "^1.8.7", "react-scroll": "^1.8.7",
"swagger-ui-react": "^4.15.5", "swagger-ui-react": "^5.1.0",
"use-font-face-observer": "^1.2.1", "use-font-face-observer": "^1.2.1",
"viem": "^0.3.39", "viem": "^1.1.8",
"wagmi": "^1.0.9" "wagmi": "^1.3.3"
}, },
"devDependencies": { "devDependencies": {
"@playwright/experimental-ct-react": "1.32.3", "@playwright/experimental-ct-react": "1.35.1",
"@playwright/test": "^1.35.1",
"@svgr/webpack": "^6.5.1", "@svgr/webpack": "^6.5.1",
"@testing-library/react": "^14.0.0", "@testing-library/react": "^14.0.0",
"@total-typescript/ts-reset": "^0.3.7", "@total-typescript/ts-reset": "^0.4.0",
"@types/crypto-js": "^4.1.1", "@types/crypto-js": "^4.1.1",
"@types/csp-dev": "^1.0.0", "@types/csp-dev": "^1.0.0",
"@types/d3": "^7.4.0", "@types/d3": "^7.4.0",
...@@ -105,7 +106,7 @@ ...@@ -105,7 +106,7 @@
"@types/react-google-recaptcha": "^2.1.5", "@types/react-google-recaptcha": "^2.1.5",
"@types/swagger-ui-react": "^4.11.0", "@types/swagger-ui-react": "^4.11.0",
"@types/ws": "^8.5.3", "@types/ws": "^8.5.3",
"@typescript-eslint/eslint-plugin": "^5.53.0", "@typescript-eslint/eslint-plugin": "^5.60.0",
"@vitejs/plugin-react": "^4.0.0", "@vitejs/plugin-react": "^4.0.0",
"css-loader": "^6.7.3", "css-loader": "^6.7.3",
"dotenv-cli": "^6.0.0", "dotenv-cli": "^6.0.0",
...@@ -124,12 +125,11 @@ ...@@ -124,12 +125,11 @@
"lint-staged": ">=10", "lint-staged": ">=10",
"mockdate": "^3.0.5", "mockdate": "^3.0.5",
"next-transpile-modules": "^10.0.0", "next-transpile-modules": "^10.0.0",
"playwright": "1.32.3",
"style-loader": "^3.3.1", "style-loader": "^3.3.1",
"svgo": "^2.8.0", "svgo": "^2.8.0",
"ts-jest": "^29.0.3", "ts-jest": "^29.0.3",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "4.9.5", "typescript": "^5.1.0",
"vite-plugin-svgr": "^2.2.2", "vite-plugin-svgr": "^2.2.2",
"vite-tsconfig-paths": "^3.5.2", "vite-tsconfig-paths": "^3.5.2",
"ws": "^8.11.0" "ws": "^8.11.0"
......
...@@ -20,7 +20,7 @@ interface ResultComponentProps<T extends SmartContractMethod> { ...@@ -20,7 +20,7 @@ interface ResultComponentProps<T extends SmartContractMethod> {
interface Props<T extends SmartContractMethod> { interface Props<T extends SmartContractMethod> {
data: T; data: T;
onSubmit: (data: T, args: Array<string | Array<unknown>>) => Promise<ContractMethodCallResult<T>>; onSubmit: (data: T, args: Array<string | Array<unknown>>) => Promise<ContractMethodCallResult<T>>;
ResultComponent: (props: ResultComponentProps<T>) => JSX.Element | null; resultComponent: (props: ResultComponentProps<T>) => JSX.Element | null;
isWrite?: boolean; isWrite?: boolean;
} }
...@@ -61,7 +61,7 @@ const parseArrayValue = (value: string) => { ...@@ -61,7 +61,7 @@ const parseArrayValue = (value: string) => {
} }
}; };
const ContractMethodCallable = <T extends SmartContractMethod>({ data, onSubmit, ResultComponent, isWrite }: Props<T>) => { const ContractMethodCallable = <T extends SmartContractMethod>({ data, onSubmit, resultComponent: ResultComponent, isWrite }: Props<T>) => {
const [ result, setResult ] = React.useState<ContractMethodCallResult<T>>(); const [ result, setResult ] = React.useState<ContractMethodCallResult<T>>();
const [ isLoading, setLoading ] = React.useState(false); const [ isLoading, setLoading ] = React.useState(false);
......
...@@ -74,7 +74,7 @@ const ContractRead = ({ addressHash, isProxy, isCustomAbi }: Props) => { ...@@ -74,7 +74,7 @@ const ContractRead = ({ addressHash, isProxy, isCustomAbi }: Props) => {
key={ id + '_' + index } key={ id + '_' + index }
data={ item } data={ item }
onSubmit={ handleMethodFormSubmit } onSubmit={ handleMethodFormSubmit }
ResultComponent={ ContractReadResult } resultComponent={ ContractReadResult }
/> />
); );
}, [ handleMethodFormSubmit ]); }, [ handleMethodFormSubmit ]);
......
...@@ -88,7 +88,7 @@ const ContractWrite = ({ addressHash, isProxy, isCustomAbi }: Props) => { ...@@ -88,7 +88,7 @@ const ContractWrite = ({ addressHash, isProxy, isCustomAbi }: Props) => {
key={ id + '_' + index } key={ id + '_' + index }
data={ item } data={ item }
onSubmit={ handleMethodFormSubmit } onSubmit={ handleMethodFormSubmit }
ResultComponent={ ContractWriteResult } resultComponent={ ContractWriteResult }
isWrite isWrite
/> />
); );
......
...@@ -63,6 +63,7 @@ const AddressFavoriteButton = ({ className, hash, watchListId }: Props) => { ...@@ -63,6 +63,7 @@ const AddressFavoriteButton = ({ className, hash, watchListId }: Props) => {
size="sm" size="sm"
pl="6px" pl="6px"
pr="6px" pr="6px"
flexShrink={ 0 }
onClick={ handleClick } onClick={ handleClick }
icon={ <Icon as={ watchListId ? starFilledIcon : starOutlineIcon } boxSize={ 5 }/> } icon={ <Icon as={ watchListId ? starFilledIcon : starOutlineIcon } boxSize={ 5 }/> }
onFocusCapture={ usePreventFocusAfterModalClosing() } onFocusCapture={ usePreventFocusAfterModalClosing() }
......
...@@ -45,7 +45,7 @@ const getConfig = () => { ...@@ -45,7 +45,7 @@ const getConfig = () => {
]); ]);
const wagmiConfig = createConfig({ const wagmiConfig = createConfig({
autoConnect: true, autoConnect: true,
connectors: w3mConnectors({ projectId: appConfig.walletConnect.projectId, chains, version: 2 }), connectors: w3mConnectors({ projectId: appConfig.walletConnect.projectId, chains }),
publicClient, publicClient,
}); });
const ethereumClient = new EthereumClient(wagmiConfig, chains); const ethereumClient = new EthereumClient(wagmiConfig, chains);
......
...@@ -96,7 +96,6 @@ const TxsContent = ({ ...@@ -96,7 +96,6 @@ const TxsContent = ({
<AddressCsvExportLink <AddressCsvExportLink
address={ currentAddress } address={ currentAddress }
params={{ type: 'transactions', filterType: 'address', filterValue }} params={{ type: 'transactions', filterType: 'address', filterValue }}
ml={ 2 }
isLoading={ query.pagination.isLoading } isLoading={ query.pagination.isLoading }
/> />
) : null ) : null
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment