From 6c84a1957048537188ccde388d67c3d03a51dd75 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 6 Feb 2023 17:01:22 +0000 Subject: [PATCH] switch to ConnectKit --- package-lock.json | 797 ++++++++++++++++------- package.json | 5 +- src/@utils/wallet.ts | 39 +- src/components/Header/Wallet/Account.tsx | 9 +- src/components/Header/Wallet/Details.tsx | 11 +- src/pages/_app.tsx | 54 +- src/stylesGlobal/_web3modal.css | 151 ----- src/stylesGlobal/styles.css | 1 - 8 files changed, 626 insertions(+), 441 deletions(-) delete mode 100644 src/stylesGlobal/_web3modal.css diff --git a/package-lock.json b/package-lock.json index b0630ab21..be6bd9f85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,10 +18,9 @@ "@oceanprotocol/use-dark-mode": "^2.4.3", "@tippyjs/react": "^4.2.6", "@urql/exchange-refocus": "^1.0.0", - "@web3modal/ethereum": "^2.1.1", - "@web3modal/react": "^2.1.1", "axios": "^1.2.0", "classnames": "^2.3.2", + "connectkit": "^1.1.3", "date-fns": "^2.29.3", "decimal.js": "^10.4.2", "dom-confetti": "^0.2.2", @@ -55,7 +54,7 @@ "slugify": "^1.6.5", "swr": "^1.3.0", "urql": "^3.0.3", - "wagmi": "^0.11.4", + "wagmi": "^0.10.5", "yup": "^0.32.11" }, "devDependencies": { @@ -2213,7 +2212,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.0.tgz", "integrity": "sha512-3aDpDprjM0AwaxGE09bOPkNxHpBd+kA6jty3RnaEXdweX1DF1U3VQpPYb0g1IStAuK7SVQ1cy+bNBBKp4W3Fjg==", - "peer": true, "dependencies": { "@emotion/memoize": "^0.8.0" } @@ -2275,14 +2273,12 @@ "node_modules/@emotion/stylis": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.8.5.tgz", - "integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==", - "peer": true + "integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==" }, "node_modules/@emotion/unitless": { "version": "0.7.5", "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", - "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==", - "peer": true + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" }, "node_modules/@emotion/use-insertion-effect-with-fallbacks": { "version": "1.0.0", @@ -7391,32 +7387,6 @@ "loose-envify": "^1.1.0" } }, - "node_modules/@safe-global/safe-apps-provider": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@safe-global/safe-apps-provider/-/safe-apps-provider-0.15.2.tgz", - "integrity": "sha512-BaoGAuY7h6jLBL7P+M6b7hd+1QfTv8uMyNF3udhiNUwA0XwfzH2ePQB13IEV3Mn7wdcIMEEUDS5kHbtAsj60qQ==", - "dependencies": { - "@safe-global/safe-apps-sdk": "7.9.0", - "events": "^3.3.0" - } - }, - "node_modules/@safe-global/safe-apps-sdk": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@safe-global/safe-apps-sdk/-/safe-apps-sdk-7.9.0.tgz", - "integrity": "sha512-S2EI+JL8ocSgE3uGNaDZCzKmwfhtxXZFDUP76vN0FeaY35itFMyi8F0Vhxu0XnZm3yLzJE3tp5px6GhuQFLU6w==", - "dependencies": { - "@safe-global/safe-gateway-typescript-sdk": "^3.5.3", - "ethers": "^5.7.2" - } - }, - "node_modules/@safe-global/safe-gateway-typescript-sdk": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.7.0.tgz", - "integrity": "sha512-3BvlUgp0oZ1Zkn7nG3wY1jvCEE4t530BjKcaa3r0qsf0whf/ez/0gmQwk7DTOGmVmvOfjj6HHikxnrUCCX+/3Q==", - "dependencies": { - "cross-fetch": "^3.1.5" - } - }, "node_modules/@samverschueren/stream-to-observable": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz", @@ -22523,36 +22493,28 @@ } }, "node_modules/@wagmi/chains": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@wagmi/chains/-/chains-0.2.6.tgz", - "integrity": "sha512-YRvWZ6G5X25BgLB8jCAz7Je3yUh+CvmXujrWnL/1lbXslheEq1Ssf77zRfdQo+zfD4bwL/qHEUNREf8r6usKsA==", + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/@wagmi/chains/-/chains-0.1.14.tgz", + "integrity": "sha512-hSzb6Ni/PejVzliKkc5T3ehzRJxr5k4fZMGYuouqwArWQ8z7R4jrIlm2j2nNOD7Epz6ZucdiVluU1YH0d/EEyw==", "funding": [ { "type": "gitcoin", - "url": "https://wagmi.sh/gitcoin" + "url": "https://gitcoin.co/grants/4493/wagmi-react-hooks-library-for-ethereum" }, { "type": "github", "url": "https://github.com/sponsors/wagmi-dev" } - ], - "peerDependencies": { - "typescript": ">=4.9.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } + ] }, "node_modules/@wagmi/connectors": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@wagmi/connectors/-/connectors-0.2.4.tgz", - "integrity": "sha512-vHlAPm9xIPze1SsF7MzUHG8Hl4mAgYwhCw2uKkhQCpZoEksKn3J89AmINh4BaMVVBcDK2ZYkLZfN0D1VMVMZcQ==", + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/@wagmi/connectors/-/connectors-0.1.10.tgz", + "integrity": "sha512-kEFzqNlB+EEl4gcvTMYZOSGlWXn53YGIiAsvXnqo3MEim4ZfTqcNZ71NV+DVmQu+N+F09wvq2FkbLO4lLVB78g==", "funding": [ { "type": "gitcoin", - "url": "https://wagmi.sh/gitcoin" + "url": "https://gitcoin.co/grants/4493/wagmi-react-hooks-library-for-ethereum" }, { "type": "github", @@ -22562,36 +22524,29 @@ "dependencies": { "@coinbase/wallet-sdk": "^3.5.4", "@ledgerhq/connect-kit-loader": "^1.0.1", - "@safe-global/safe-apps-provider": "^0.15.2", - "@safe-global/safe-apps-sdk": "^7.9.0", "@walletconnect/ethereum-provider": "^1.8.0", - "@walletconnect/universal-provider": "^2.3.3", - "@web3modal/standalone": "^2.0.0", - "abitype": "^0.3.0", + "@walletconnect/universal-provider": "^2.2.1", + "@web3modal/standalone": "^2.0.0-rc.2", "eventemitter3": "^4.0.7" }, "peerDependencies": { - "@wagmi/core": ">=0.9.x", - "ethers": ">=5.5.1 <6", - "typescript": ">=4.9.4" + "@wagmi/core": "0.8.x", + "ethers": "^5.0.0" }, "peerDependenciesMeta": { "@wagmi/core": { "optional": true - }, - "typescript": { - "optional": true } } }, "node_modules/@wagmi/core": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/@wagmi/core/-/core-0.9.4.tgz", - "integrity": "sha512-YUOS1xn2PfKo0c90J708Vd+OPM5GoOouWExL/ZyuDP05f7y3PwDbN5ZfCyiqyTWsO53mMXcajMTFyjDqLxXACg==", + "version": "0.8.19", + "resolved": "https://registry.npmjs.org/@wagmi/core/-/core-0.8.19.tgz", + "integrity": "sha512-B1iXB4MRjxgoybZATRmBI7YEfUhpIl3aZGUjo5GXPU1SNtlXIA4/3wePlmLD64XzICXVBp99kynrrdlvJxc4gw==", "funding": [ { "type": "gitcoin", - "url": "https://wagmi.sh/gitcoin" + "url": "https://gitcoin.co/grants/4493/wagmi-react-hooks-library-for-ethereum" }, { "type": "github", @@ -22599,18 +22554,22 @@ } ], "dependencies": { - "@wagmi/chains": "0.2.6", - "@wagmi/connectors": "0.2.4", - "abitype": "^0.3.0", + "@wagmi/chains": "0.1.14", + "@wagmi/connectors": "0.1.10", + "abitype": "^0.2.5", "eventemitter3": "^4.0.7", "zustand": "^4.3.1" }, "peerDependencies": { - "ethers": ">=5.5.1 <6", - "typescript": ">=4.9.4" + "@coinbase/wallet-sdk": ">=3.6.0", + "@walletconnect/ethereum-provider": ">=1.7.5", + "ethers": ">=5.5.1" }, "peerDependenciesMeta": { - "typescript": { + "@coinbase/wallet-sdk": { + "optional": true + }, + "@walletconnect/ethereum-provider": { "optional": true } } @@ -23460,28 +23419,6 @@ "ieee754": "^1.2.1" } }, - "node_modules/@web3modal/ethereum": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@web3modal/ethereum/-/ethereum-2.1.1.tgz", - "integrity": "sha512-F5kqPtqOgYt+1S7lZd8nfD59x1+YUkqvhbJrnSMg1uxDPSBtOGnSX33XVTQ7m3Z2/3yeoFkeLipx4i4WVLdAFA==", - "peerDependencies": { - "@wagmi/core": ">=0.9", - "ethers": ">=5.7" - } - }, - "node_modules/@web3modal/react": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@web3modal/react/-/react-2.1.1.tgz", - "integrity": "sha512-lij4OxfL8jCmgjQIrqXzNwGXEfXHr6ext/2+MwA12+2TO4SOOtbvkBmmvicHmV7EEo43fCAqyrk6vDhsXZ00Ag==", - "dependencies": { - "@web3modal/core": "2.1.1", - "@web3modal/ui": "2.1.1" - }, - "peerDependencies": { - "react": ">=17", - "react-dom": ">=17" - } - }, "node_modules/@web3modal/standalone": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@web3modal/standalone/-/standalone-2.1.1.tgz", @@ -23942,9 +23879,9 @@ "dev": true }, "node_modules/abitype": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.3.0.tgz", - "integrity": "sha512-0YokyAV4hKMcy97Pl+6QgZBlBdZJN2llslOs7kiFY+cu7kMlVXDBpxMExfv0krzBCQt2t7hNovpQ3y/zvEm18A==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.2.5.tgz", + "integrity": "sha512-t1iiokWYpkrziu4WL2Gb6YdGvaP9ZKs7WnA39TI8TsW2E99GVRgDPW/xOKhzoCdyxOYt550CNYEFluCwGaFHaA==", "funding": [ { "type": "github", @@ -23955,7 +23892,7 @@ "pnpm": ">=7" }, "peerDependencies": { - "typescript": ">=4.9.4", + "typescript": ">=4.7.4", "zod": ">=3.19.1" }, "peerDependenciesMeta": { @@ -25885,7 +25822,6 @@ "version": "2.0.7", "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.7.tgz", "integrity": "sha512-i7YhvPgVqRKfoQ66toiZ06jPNA3p6ierpfUuEWxNF+fV27Uv5gxBkf8KZLHUCc1nFA9j6+80pYoIpqCeyW3/bA==", - "peer": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.16.0", "@babel/helper-module-imports": "^7.16.0", @@ -25900,8 +25836,7 @@ "node_modules/babel-plugin-syntax-jsx": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", - "integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==", - "peer": true + "integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==" }, "node_modules/babel-plugin-syntax-trailing-function-commas": { "version": "7.0.0-beta.0", @@ -26976,8 +26911,7 @@ "node_modules/camelize": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", - "integrity": "sha512-W2lPwkBkMZwFlPCXhIlYgxu+7gC/NUlCtdK652DAJ1JdgV0sTrvuPFshNPrFa1TY2JOkLhgdeEBplB4ezEa+xg==", - "peer": true + "integrity": "sha512-W2lPwkBkMZwFlPCXhIlYgxu+7gC/NUlCtdK652DAJ1JdgV0sTrvuPFshNPrFa1TY2JOkLhgdeEBplB4ezEa+xg==" }, "node_modules/caniuse-lite": { "version": "1.0.30001409", @@ -28134,6 +28068,200 @@ "node": ">= 0.6" } }, + "node_modules/connectkit": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/connectkit/-/connectkit-1.1.3.tgz", + "integrity": "sha512-gTRybTw6zsdGoZV+RP/P2ITk8SNNz9w6GJ9rDzcDyMgNtwwASPMJDBn+0BTVrVRytqU/RH46rTBsBaloroSNZw==", + "dependencies": { + "buffer": "^6.0.3", + "detect-browser": "^5.3.0", + "framer-motion": "^6.3.11", + "qrcode": "^1.5.0", + "react-transition-state": "^1.1.4", + "react-use-measure": "^2.1.1", + "resize-observer-polyfill": "^1.5.1", + "styled-components": "^5.3.5" + }, + "engines": { + "node": ">=12.4" + }, + "peerDependencies": { + "ethers": ">=5.5.0 <6", + "react": "17.x || 18.x", + "react-dom": "17.x || 18.x", + "wagmi": "0.10.x" + } + }, + "node_modules/connectkit/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/connectkit/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/connectkit/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/connectkit/node_modules/detect-browser": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.3.0.tgz", + "integrity": "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==" + }, + "node_modules/connectkit/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/connectkit/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/connectkit/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/connectkit/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/connectkit/node_modules/pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/connectkit/node_modules/qrcode": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.1.tgz", + "integrity": "sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==", + "dependencies": { + "dijkstrajs": "^1.0.1", + "encode-utf8": "^1.0.3", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "bin": { + "qrcode": "bin/qrcode" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/connectkit/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/connectkit/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "node_modules/connectkit/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/connectkit/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/console-browserify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", @@ -28799,7 +28927,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==", - "peer": true, "engines": { "node": ">=4" } @@ -28986,7 +29113,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz", "integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==", - "peer": true, "dependencies": { "camelize": "^1.0.0", "css-color-keywords": "^1.0.0", @@ -29138,8 +29264,7 @@ "node_modules/debounce": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", - "peer": true + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" }, "node_modules/debug": { "version": "4.3.4", @@ -32624,6 +32749,62 @@ "node": ">=0.10.0" } }, + "node_modules/framer-motion": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz", + "integrity": "sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw==", + "dependencies": { + "@motionone/dom": "10.12.0", + "framesync": "6.0.1", + "hey-listen": "^1.0.8", + "popmotion": "11.0.3", + "style-value-types": "5.0.0", + "tslib": "^2.1.0" + }, + "optionalDependencies": { + "@emotion/is-prop-valid": "^0.8.2" + }, + "peerDependencies": { + "react": ">=16.8 || ^17.0.0 || ^18.0.0", + "react-dom": ">=16.8 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/framer-motion/node_modules/@emotion/is-prop-valid": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", + "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==", + "optional": true, + "dependencies": { + "@emotion/memoize": "0.7.4" + } + }, + "node_modules/framer-motion/node_modules/@emotion/memoize": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", + "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==", + "optional": true + }, + "node_modules/framer-motion/node_modules/@motionone/dom": { + "version": "10.12.0", + "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.12.0.tgz", + "integrity": "sha512-UdPTtLMAktHiqV0atOczNYyDd/d8Cf5fFsd1tua03PqTwwCe/6lwhLSQ8a7TbnQ5SN0gm44N1slBfj+ORIhrqw==", + "dependencies": { + "@motionone/animation": "^10.12.0", + "@motionone/generators": "^10.12.0", + "@motionone/types": "^10.12.0", + "@motionone/utils": "^10.12.0", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" + } + }, + "node_modules/framesync": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.0.1.tgz", + "integrity": "sha512-fUY88kXvGiIItgNC7wcTOl0SNRCVXMKSWW2Yzfmn7EKNc+MpCzcz9DhdHcdjbrtN3c6R4H5dTY2jiCpPdysEjA==", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -43815,6 +43996,17 @@ "node": ">=10" } }, + "node_modules/popmotion": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/popmotion/-/popmotion-11.0.3.tgz", + "integrity": "sha512-Y55FLdj3UxkR7Vl3s7Qr4e9m0onSnP8W7d/xQLsoJM40vs6UKHFdygs6SWryasTZYqugMjm3BepCF4CWXDiHgA==", + "dependencies": { + "framesync": "6.0.1", + "hey-listen": "^1.0.8", + "style-value-types": "5.0.0", + "tslib": "^2.1.0" + } + }, "node_modules/posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -45355,11 +45547,19 @@ "react-dom": ">=16.6.0" } }, + "node_modules/react-transition-state": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/react-transition-state/-/react-transition-state-1.1.5.tgz", + "integrity": "sha512-ITY2mZqc2dWG2eitJkYNdcSFW8aKeOlkL2A/vowRrLL8GH3J6Re/SpD/BLvQzrVOTqjsP0b5S9N10vgNNzwMUQ==", + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, "node_modules/react-use-measure": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/react-use-measure/-/react-use-measure-2.1.1.tgz", "integrity": "sha512-nocZhN26cproIiIduswYpV5y5lQpSQS1y/4KuvUCjSKmw7ZWIS/+g3aFnX3WdBkyuGUtTLif3UTqnLLhbDoQig==", - "peer": true, "dependencies": { "debounce": "^1.2.1" }, @@ -46707,8 +46907,7 @@ "node_modules/resize-observer-polyfill": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==", - "peer": true + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" }, "node_modules/resolve": { "version": "1.22.1", @@ -47930,8 +48129,7 @@ "node_modules/shallowequal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", - "peer": true + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" }, "node_modules/shebang-command": { "version": "2.0.0", @@ -48966,12 +49164,20 @@ "inline-style-parser": "0.1.1" } }, + "node_modules/style-value-types": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.0.0.tgz", + "integrity": "sha512-08yq36Ikn4kx4YU6RD7jWEv27v4V+PUsOGa4n/as8Et3CuODMJQ00ENeAVXAeydX4Z2j1XHZF1K2sX4mGl18fA==", + "dependencies": { + "hey-listen": "^1.0.8", + "tslib": "^2.1.0" + } + }, "node_modules/styled-components": { "version": "5.3.5", "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.3.5.tgz", "integrity": "sha512-ndETJ9RKaaL6q41B69WudeqLzOpY1A/ET/glXkNZ2T7dPjPqpPCXXQjDFYZWwNnE5co0wX+gTCqx9mfxTmSIPg==", "hasInstallScript": true, - "peer": true, "dependencies": { "@babel/helper-module-imports": "^7.0.0", "@babel/traverse": "^7.4.5", @@ -49001,7 +49207,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "peer": true, "engines": { "node": ">=4" } @@ -49010,7 +49215,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "peer": true, "dependencies": { "has-flag": "^3.0.0" }, @@ -51108,13 +51312,13 @@ } }, "node_modules/wagmi": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/wagmi/-/wagmi-0.11.4.tgz", - "integrity": "sha512-zzJAXvsHFuNYrS/3KZC8xPqP7/eQT33xSlMIvMCgO/EYfQLM34r0Z+tcYmJ5KnuS1xd/fO1K6O2sSZVlaXaiLg==", + "version": "0.10.15", + "resolved": "https://registry.npmjs.org/wagmi/-/wagmi-0.10.15.tgz", + "integrity": "sha512-hyVhPJ9KrgQULCvdbxggbq+1O61O4Cqo2NQ+f6xT7EUwOXYS+SDvasy5EpyKToxkTSlR4+LhbQR+0+u70e2OkA==", "funding": [ { "type": "gitcoin", - "url": "https://wagmi.sh/gitcoin" + "url": "https://gitcoin.co/grants/4493/wagmi-react-hooks-library-for-ethereum" }, { "type": "github", @@ -51122,22 +51326,18 @@ } ], "dependencies": { + "@coinbase/wallet-sdk": "^3.6.0", "@tanstack/query-sync-storage-persister": "^4.14.5", "@tanstack/react-query": "^4.14.5", "@tanstack/react-query-persist-client": "^4.14.5", - "@wagmi/core": "0.9.4", - "abitype": "^0.3.0", + "@wagmi/core": "0.8.19", + "@walletconnect/ethereum-provider": "^1.8.0", + "abitype": "^0.2.5", "use-sync-external-store": "^1.2.0" }, "peerDependencies": { - "ethers": ">=5.5.1 <6", - "react": ">=17.0.0", - "typescript": ">=4.9.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "ethers": ">=5.5.1", + "react": ">=17.0.0" } }, "node_modules/walker": { @@ -54011,7 +54211,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.0.tgz", "integrity": "sha512-3aDpDprjM0AwaxGE09bOPkNxHpBd+kA6jty3RnaEXdweX1DF1U3VQpPYb0g1IStAuK7SVQ1cy+bNBBKp4W3Fjg==", - "peer": true, "requires": { "@emotion/memoize": "^0.8.0" } @@ -54063,14 +54262,12 @@ "@emotion/stylis": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.8.5.tgz", - "integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==", - "peer": true + "integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==" }, "@emotion/unitless": { "version": "0.7.5", "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", - "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==", - "peer": true + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" }, "@emotion/use-insertion-effect-with-fallbacks": { "version": "1.0.0", @@ -57857,32 +58054,6 @@ } } }, - "@safe-global/safe-apps-provider": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@safe-global/safe-apps-provider/-/safe-apps-provider-0.15.2.tgz", - "integrity": "sha512-BaoGAuY7h6jLBL7P+M6b7hd+1QfTv8uMyNF3udhiNUwA0XwfzH2ePQB13IEV3Mn7wdcIMEEUDS5kHbtAsj60qQ==", - "requires": { - "@safe-global/safe-apps-sdk": "7.9.0", - "events": "^3.3.0" - } - }, - "@safe-global/safe-apps-sdk": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@safe-global/safe-apps-sdk/-/safe-apps-sdk-7.9.0.tgz", - "integrity": "sha512-S2EI+JL8ocSgE3uGNaDZCzKmwfhtxXZFDUP76vN0FeaY35itFMyi8F0Vhxu0XnZm3yLzJE3tp5px6GhuQFLU6w==", - "requires": { - "@safe-global/safe-gateway-typescript-sdk": "^3.5.3", - "ethers": "^5.7.2" - } - }, - "@safe-global/safe-gateway-typescript-sdk": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.7.0.tgz", - "integrity": "sha512-3BvlUgp0oZ1Zkn7nG3wY1jvCEE4t530BjKcaa3r0qsf0whf/ez/0gmQwk7DTOGmVmvOfjj6HHikxnrUCCX+/3Q==", - "requires": { - "cross-fetch": "^3.1.5" - } - }, "@samverschueren/stream-to-observable": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz", @@ -69592,35 +69763,31 @@ "requires": {} }, "@wagmi/chains": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@wagmi/chains/-/chains-0.2.6.tgz", - "integrity": "sha512-YRvWZ6G5X25BgLB8jCAz7Je3yUh+CvmXujrWnL/1lbXslheEq1Ssf77zRfdQo+zfD4bwL/qHEUNREf8r6usKsA==", - "requires": {} + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/@wagmi/chains/-/chains-0.1.14.tgz", + "integrity": "sha512-hSzb6Ni/PejVzliKkc5T3ehzRJxr5k4fZMGYuouqwArWQ8z7R4jrIlm2j2nNOD7Epz6ZucdiVluU1YH0d/EEyw==" }, "@wagmi/connectors": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@wagmi/connectors/-/connectors-0.2.4.tgz", - "integrity": "sha512-vHlAPm9xIPze1SsF7MzUHG8Hl4mAgYwhCw2uKkhQCpZoEksKn3J89AmINh4BaMVVBcDK2ZYkLZfN0D1VMVMZcQ==", + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/@wagmi/connectors/-/connectors-0.1.10.tgz", + "integrity": "sha512-kEFzqNlB+EEl4gcvTMYZOSGlWXn53YGIiAsvXnqo3MEim4ZfTqcNZ71NV+DVmQu+N+F09wvq2FkbLO4lLVB78g==", "requires": { "@coinbase/wallet-sdk": "^3.5.4", "@ledgerhq/connect-kit-loader": "^1.0.1", - "@safe-global/safe-apps-provider": "^0.15.2", - "@safe-global/safe-apps-sdk": "^7.9.0", "@walletconnect/ethereum-provider": "^1.8.0", - "@walletconnect/universal-provider": "^2.3.3", - "@web3modal/standalone": "^2.0.0", - "abitype": "^0.3.0", + "@walletconnect/universal-provider": "^2.2.1", + "@web3modal/standalone": "^2.0.0-rc.2", "eventemitter3": "^4.0.7" } }, "@wagmi/core": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/@wagmi/core/-/core-0.9.4.tgz", - "integrity": "sha512-YUOS1xn2PfKo0c90J708Vd+OPM5GoOouWExL/ZyuDP05f7y3PwDbN5ZfCyiqyTWsO53mMXcajMTFyjDqLxXACg==", + "version": "0.8.19", + "resolved": "https://registry.npmjs.org/@wagmi/core/-/core-0.8.19.tgz", + "integrity": "sha512-B1iXB4MRjxgoybZATRmBI7YEfUhpIl3aZGUjo5GXPU1SNtlXIA4/3wePlmLD64XzICXVBp99kynrrdlvJxc4gw==", "requires": { - "@wagmi/chains": "0.2.6", - "@wagmi/connectors": "0.2.4", - "abitype": "^0.3.0", + "@wagmi/chains": "0.1.14", + "@wagmi/connectors": "0.1.10", + "abitype": "^0.2.5", "eventemitter3": "^4.0.7", "zustand": "^4.3.1" }, @@ -70393,21 +70560,6 @@ } } }, - "@web3modal/ethereum": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@web3modal/ethereum/-/ethereum-2.1.1.tgz", - "integrity": "sha512-F5kqPtqOgYt+1S7lZd8nfD59x1+YUkqvhbJrnSMg1uxDPSBtOGnSX33XVTQ7m3Z2/3yeoFkeLipx4i4WVLdAFA==", - "requires": {} - }, - "@web3modal/react": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@web3modal/react/-/react-2.1.1.tgz", - "integrity": "sha512-lij4OxfL8jCmgjQIrqXzNwGXEfXHr6ext/2+MwA12+2TO4SOOtbvkBmmvicHmV7EEo43fCAqyrk6vDhsXZ00Ag==", - "requires": { - "@web3modal/core": "2.1.1", - "@web3modal/ui": "2.1.1" - } - }, "@web3modal/standalone": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@web3modal/standalone/-/standalone-2.1.1.tgz", @@ -70842,9 +70994,9 @@ "dev": true }, "abitype": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.3.0.tgz", - "integrity": "sha512-0YokyAV4hKMcy97Pl+6QgZBlBdZJN2llslOs7kiFY+cu7kMlVXDBpxMExfv0krzBCQt2t7hNovpQ3y/zvEm18A==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.2.5.tgz", + "integrity": "sha512-t1iiokWYpkrziu4WL2Gb6YdGvaP9ZKs7WnA39TI8TsW2E99GVRgDPW/xOKhzoCdyxOYt550CNYEFluCwGaFHaA==", "requires": {} }, "abort-controller": { @@ -72363,7 +72515,6 @@ "version": "2.0.7", "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.7.tgz", "integrity": "sha512-i7YhvPgVqRKfoQ66toiZ06jPNA3p6ierpfUuEWxNF+fV27Uv5gxBkf8KZLHUCc1nFA9j6+80pYoIpqCeyW3/bA==", - "peer": true, "requires": { "@babel/helper-annotate-as-pure": "^7.16.0", "@babel/helper-module-imports": "^7.16.0", @@ -72375,8 +72526,7 @@ "babel-plugin-syntax-jsx": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", - "integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==", - "peer": true + "integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==" }, "babel-plugin-syntax-trailing-function-commas": { "version": "7.0.0-beta.0", @@ -73244,8 +73394,7 @@ "camelize": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", - "integrity": "sha512-W2lPwkBkMZwFlPCXhIlYgxu+7gC/NUlCtdK652DAJ1JdgV0sTrvuPFshNPrFa1TY2JOkLhgdeEBplB4ezEa+xg==", - "peer": true + "integrity": "sha512-W2lPwkBkMZwFlPCXhIlYgxu+7gC/NUlCtdK652DAJ1JdgV0sTrvuPFshNPrFa1TY2JOkLhgdeEBplB4ezEa+xg==" }, "caniuse-lite": { "version": "1.0.30001409", @@ -74154,6 +74303,143 @@ } } }, + "connectkit": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/connectkit/-/connectkit-1.1.3.tgz", + "integrity": "sha512-gTRybTw6zsdGoZV+RP/P2ITk8SNNz9w6GJ9rDzcDyMgNtwwASPMJDBn+0BTVrVRytqU/RH46rTBsBaloroSNZw==", + "requires": { + "buffer": "^6.0.3", + "detect-browser": "^5.3.0", + "framer-motion": "^6.3.11", + "qrcode": "^1.5.0", + "react-transition-state": "^1.1.4", + "react-use-measure": "^2.1.1", + "resize-observer-polyfill": "^1.5.1", + "styled-components": "^5.3.5" + }, + "dependencies": { + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "detect-browser": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.3.0.tgz", + "integrity": "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==" + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==" + }, + "qrcode": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.1.tgz", + "integrity": "sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==", + "requires": { + "dijkstrajs": "^1.0.1", + "encode-utf8": "^1.0.3", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, "console-browserify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", @@ -74692,8 +74978,7 @@ "css-color-keywords": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", - "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==", - "peer": true + "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==" }, "css-loader": { "version": "5.2.7", @@ -74816,7 +75101,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz", "integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==", - "peer": true, "requires": { "camelize": "^1.0.0", "css-color-keywords": "^1.0.0", @@ -74936,8 +75220,7 @@ "debounce": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", - "peer": true + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" }, "debug": { "version": "4.3.4", @@ -77673,6 +77956,58 @@ "map-cache": "^0.2.2" } }, + "framer-motion": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz", + "integrity": "sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw==", + "requires": { + "@emotion/is-prop-valid": "^0.8.2", + "@motionone/dom": "10.12.0", + "framesync": "6.0.1", + "hey-listen": "^1.0.8", + "popmotion": "11.0.3", + "style-value-types": "5.0.0", + "tslib": "^2.1.0" + }, + "dependencies": { + "@emotion/is-prop-valid": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", + "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==", + "optional": true, + "requires": { + "@emotion/memoize": "0.7.4" + } + }, + "@emotion/memoize": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", + "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==", + "optional": true + }, + "@motionone/dom": { + "version": "10.12.0", + "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.12.0.tgz", + "integrity": "sha512-UdPTtLMAktHiqV0atOczNYyDd/d8Cf5fFsd1tua03PqTwwCe/6lwhLSQ8a7TbnQ5SN0gm44N1slBfj+ORIhrqw==", + "requires": { + "@motionone/animation": "^10.12.0", + "@motionone/generators": "^10.12.0", + "@motionone/types": "^10.12.0", + "@motionone/utils": "^10.12.0", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" + } + } + } + }, + "framesync": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.0.1.tgz", + "integrity": "sha512-fUY88kXvGiIItgNC7wcTOl0SNRCVXMKSWW2Yzfmn7EKNc+MpCzcz9DhdHcdjbrtN3c6R4H5dTY2jiCpPdysEjA==", + "requires": { + "tslib": "^2.1.0" + } + }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -86307,6 +86642,17 @@ "@babel/runtime": "^7.17.8" } }, + "popmotion": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/popmotion/-/popmotion-11.0.3.tgz", + "integrity": "sha512-Y55FLdj3UxkR7Vl3s7Qr4e9m0onSnP8W7d/xQLsoJM40vs6UKHFdygs6SWryasTZYqugMjm3BepCF4CWXDiHgA==", + "requires": { + "framesync": "6.0.1", + "hey-listen": "^1.0.8", + "style-value-types": "5.0.0", + "tslib": "^2.1.0" + } + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -87486,11 +87832,16 @@ "prop-types": "^15.6.2" } }, + "react-transition-state": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/react-transition-state/-/react-transition-state-1.1.5.tgz", + "integrity": "sha512-ITY2mZqc2dWG2eitJkYNdcSFW8aKeOlkL2A/vowRrLL8GH3J6Re/SpD/BLvQzrVOTqjsP0b5S9N10vgNNzwMUQ==", + "requires": {} + }, "react-use-measure": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/react-use-measure/-/react-use-measure-2.1.1.tgz", "integrity": "sha512-nocZhN26cproIiIduswYpV5y5lQpSQS1y/4KuvUCjSKmw7ZWIS/+g3aFnX3WdBkyuGUtTLif3UTqnLLhbDoQig==", - "peer": true, "requires": { "debounce": "^1.2.1" } @@ -88502,8 +88853,7 @@ "resize-observer-polyfill": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==", - "peer": true + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" }, "resolve": { "version": "1.22.1", @@ -89460,8 +89810,7 @@ "shallowequal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", - "peer": true + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" }, "shebang-command": { "version": "2.0.0", @@ -90270,11 +90619,19 @@ "inline-style-parser": "0.1.1" } }, + "style-value-types": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.0.0.tgz", + "integrity": "sha512-08yq36Ikn4kx4YU6RD7jWEv27v4V+PUsOGa4n/as8Et3CuODMJQ00ENeAVXAeydX4Z2j1XHZF1K2sX4mGl18fA==", + "requires": { + "hey-listen": "^1.0.8", + "tslib": "^2.1.0" + } + }, "styled-components": { "version": "5.3.5", "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.3.5.tgz", "integrity": "sha512-ndETJ9RKaaL6q41B69WudeqLzOpY1A/ET/glXkNZ2T7dPjPqpPCXXQjDFYZWwNnE5co0wX+gTCqx9mfxTmSIPg==", - "peer": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/traverse": "^7.4.5", @@ -90291,14 +90648,12 @@ "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "peer": true + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "peer": true, "requires": { "has-flag": "^3.0.0" } @@ -91916,15 +92271,17 @@ } }, "wagmi": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/wagmi/-/wagmi-0.11.4.tgz", - "integrity": "sha512-zzJAXvsHFuNYrS/3KZC8xPqP7/eQT33xSlMIvMCgO/EYfQLM34r0Z+tcYmJ5KnuS1xd/fO1K6O2sSZVlaXaiLg==", + "version": "0.10.15", + "resolved": "https://registry.npmjs.org/wagmi/-/wagmi-0.10.15.tgz", + "integrity": "sha512-hyVhPJ9KrgQULCvdbxggbq+1O61O4Cqo2NQ+f6xT7EUwOXYS+SDvasy5EpyKToxkTSlR4+LhbQR+0+u70e2OkA==", "requires": { + "@coinbase/wallet-sdk": "^3.6.0", "@tanstack/query-sync-storage-persister": "^4.14.5", "@tanstack/react-query": "^4.14.5", "@tanstack/react-query-persist-client": "^4.14.5", - "@wagmi/core": "0.9.4", - "abitype": "^0.3.0", + "@wagmi/core": "0.8.19", + "@walletconnect/ethereum-provider": "^1.8.0", + "abitype": "^0.2.5", "use-sync-external-store": "^1.2.0" } }, diff --git a/package.json b/package.json index 2051dd0e8..52735f728 100644 --- a/package.json +++ b/package.json @@ -31,10 +31,9 @@ "@oceanprotocol/use-dark-mode": "^2.4.3", "@tippyjs/react": "^4.2.6", "@urql/exchange-refocus": "^1.0.0", - "@web3modal/ethereum": "^2.1.1", - "@web3modal/react": "^2.1.1", "axios": "^1.2.0", "classnames": "^2.3.2", + "connectkit": "^1.1.3", "date-fns": "^2.29.3", "decimal.js": "^10.4.2", "dom-confetti": "^0.2.2", @@ -68,7 +67,7 @@ "slugify": "^1.6.5", "swr": "^1.3.0", "urql": "^3.0.3", - "wagmi": "^0.11.4", + "wagmi": "^0.10.5", "yup": "^0.32.11" }, "devDependencies": { diff --git a/src/@utils/wallet.ts b/src/@utils/wallet.ts index ee5ce15de..249b1a5ed 100644 --- a/src/@utils/wallet.ts +++ b/src/@utils/wallet.ts @@ -1,41 +1,18 @@ import { LoggerInstance } from '@oceanprotocol/lib' -import { - EthereumClient, - modalConnectors, - walletConnectProvider -} from '@web3modal/ethereum' -import { configureChains, createClient, erc20ABI } from 'wagmi' +import { createClient, erc20ABI } from 'wagmi' import { mainnet, polygon, bsc, goerli, polygonMumbai } from 'wagmi/chains' -import { publicProvider } from 'wagmi/providers/public' -import { infuraProvider } from 'wagmi/providers/infura' import { ethers } from 'ethers' import { formatEther } from 'ethers/lib/utils' +import { getDefaultClient } from 'connectkit' // Wagmi client -export const { chains, provider } = configureChains( - [mainnet, polygon, bsc, goerli, polygonMumbai], - [ - walletConnectProvider({ - projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID - }), - infuraProvider({ apiKey: process.env.NEXT_PUBLIC_INFURA_PROJECT_ID }), - publicProvider() - ] -) - -export const wagmiClient = createClient({ - autoConnect: true, - connectors: modalConnectors({ +export const wagmiClient = createClient( + getDefaultClient({ appName: 'Ocean Market', - version: '2', - projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID, - chains - }), - provider -}) - -// Web3Modal Ethereum Client -export const ethereumClient = new EthereumClient(wagmiClient, chains) + infuraId: process.env.NEXT_PUBLIC_INFURA_PROJECT_ID, + chains: [mainnet, polygon, bsc, goerli, polygonMumbai] + }) +) export function accountTruncate(account: string): string { if (!account || account === '') return diff --git a/src/components/Header/Wallet/Account.tsx b/src/components/Header/Wallet/Account.tsx index 921a4cf5c..aa37837c9 100644 --- a/src/components/Header/Wallet/Account.tsx +++ b/src/components/Header/Wallet/Account.tsx @@ -4,26 +4,25 @@ import { accountTruncate } from '@utils/wallet' // import Loader from '@shared/atoms/Loader' import styles from './Account.module.css' import Avatar from '@shared/atoms/Avatar' -import { useAccount, useProvider, useEnsName, useEnsAvatar } from 'wagmi' -import { useWeb3Modal } from '@web3modal/react' +import { useAccount, useEnsName, useEnsAvatar } from 'wagmi' +import { useModal } from 'connectkit' // Forward ref for Tippy.js // eslint-disable-next-line const Account = React.forwardRef((props, ref: any) => { - // const provider = useProvider() const { address: accountId } = useAccount() const { data: accountEns } = useEnsName({ address: accountId, chainId: 1 }) const { data: accountEnsAvatar } = useEnsAvatar({ address: accountId, chainId: 1 }) - const { open } = useWeb3Modal() + const { setOpen } = useModal() async function handleActivation(e: FormEvent) { // prevent accidentially submitting a form the button might be in e.preventDefault() - await open() + setOpen(true) } // return diff --git a/src/components/Header/Wallet/Details.tsx b/src/components/Header/Wallet/Details.tsx index fa49f85e0..1fe8668bc 100644 --- a/src/components/Header/Wallet/Details.tsx +++ b/src/components/Header/Wallet/Details.tsx @@ -5,18 +5,17 @@ import Button from '@shared/atoms/Button' import AddToken from '@shared/AddToken' import Conversion from '@shared/Price/Conversion' import { getOceanConfig } from '@utils/ocean' -import { useNetwork, useProvider, useDisconnect, useAccount } from 'wagmi' +import { useNetwork, useDisconnect, useAccount } from 'wagmi' +import { useModal } from 'connectkit' import styles from './Details.module.css' import useBalance from '@hooks/useBalance' -import { useWeb3Modal } from '@web3modal/react' import useNetworkMetadata from '@hooks/useNetworkMetadata' export default function Details(): ReactElement { const { chain } = useNetwork() - const { connector: activeConnector, isConnected } = useAccount() - const { open: openWeb3Modal } = useWeb3Modal() + const { connector: activeConnector } = useAccount() + const { setOpen } = useModal() const { disconnect } = useDisconnect() - const provider = useProvider() const { balance } = useBalance() const { networkData } = useNetworkMetadata() const { locale } = useUserPreferences() @@ -78,7 +77,7 @@ export default function Details(): ReactElement { )}

-