diff --git a/package.json b/package.json index 99efae8e..f65447fe 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,14 @@ "@codemirror/language": "6.3.1", "@codemirror/state": "6.1.4", "@codemirror/view": "6.7.0", + "@crossbell/connect-kit": "0.0.6", + "@crossbell/contract": "0.0.6", + "@crossbell/indexer": "0.0.6", + "@crossbell/ui": "0.0.6", + "@crossbell/util-ethers": "0.0.6", + "@crossbell/util-hooks": "0.0.6", + "@crossbell/util-ipfs": "0.0.6", + "@crossbell/util-metadata": "0.0.6", "@emoji-mart/data": "1.1.1", "@emoji-mart/react": "1.1.1", "@floating-ui/react-dom-interactions": "0.13.3", @@ -30,7 +38,6 @@ "@iconify-json/akar-icons": "1.1.12", "@iconify-json/tabler": "1.1.54", "@monaco-editor/react": "4.4.6", - "@rainbow-me/rainbowkit": "0.8.1", "@tanstack/react-query": "4.22.0", "@tanstack/react-query-devtools": "4.22.0", "@tanstack/react-query-persist-client": "4.22.0", @@ -46,6 +53,7 @@ "ethers": "5.7.2", "fast-deep-equal": "3.1.3", "idb-keyval": "6.2.0", + "immer": "9.0.17", "ioredis": "5.2.4", "js-yaml": "4.1.0", "jsonfeed-to-rss": "^3.0.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f1bb3803..80eabfd3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,14 @@ specifiers: '@codemirror/language': 6.3.1 '@codemirror/state': 6.1.4 '@codemirror/view': 6.7.0 + '@crossbell/connect-kit': 0.0.6 + '@crossbell/contract': 0.0.6 + '@crossbell/indexer': 0.0.6 + '@crossbell/ui': 0.0.6 + '@crossbell/util-ethers': 0.0.6 + '@crossbell/util-hooks': 0.0.6 + '@crossbell/util-ipfs': 0.0.6 + '@crossbell/util-metadata': 0.0.6 '@emoji-mart/data': 1.1.1 '@emoji-mart/react': 1.1.1 '@floating-ui/react-dom-interactions': 0.13.3 @@ -21,7 +29,6 @@ specifiers: '@monaco-editor/react': 4.4.6 '@next/bundle-analyzer': 13.1.2 '@playwright/test': 1.29.2 - '@rainbow-me/rainbowkit': 0.8.1 '@tailwindcss/line-clamp': ^0.4.2 '@tanstack/react-query': 4.22.0 '@tanstack/react-query-devtools': 4.22.0 @@ -60,6 +67,7 @@ specifiers: fast-deep-equal: 3.1.3 husky: 8.0.3 idb-keyval: 6.2.0 + immer: 9.0.17 ioredis: 5.2.4 js-yaml: 4.1.0 jsonfeed-to-rss: ^3.0.6 @@ -120,6 +128,14 @@ dependencies: '@codemirror/language': 6.3.1 '@codemirror/state': 6.1.4 '@codemirror/view': 6.7.0 + '@crossbell/connect-kit': 0.0.6_trixsdeca3cjambemp6yxgmpcm + '@crossbell/contract': 0.0.6_j2aag2hn6oolatv5haaa4234xu + '@crossbell/indexer': 0.0.6_epqrbdlixidyl2cpwkoretklfu + '@crossbell/ui': 0.0.6_react@18.2.0 + '@crossbell/util-ethers': 0.0.6 + '@crossbell/util-hooks': 0.0.6_react@18.2.0 + '@crossbell/util-ipfs': 0.0.6_react@18.2.0 + '@crossbell/util-metadata': 0.0.6_aklndbpc7bbyae5yvvosjgd36y '@emoji-mart/data': 1.1.1 '@emoji-mart/react': 1.1.1_64mwqb66z7c4vy75vn2wjcn7pu '@floating-ui/react-dom-interactions': 0.13.3_ib3m5ricvtkl2cll7qpr2f6lvq @@ -128,7 +144,6 @@ dependencies: '@iconify-json/akar-icons': 1.1.12 '@iconify-json/tabler': 1.1.54 '@monaco-editor/react': 4.4.6_biqbaboplfbrettd7655fr4n2y - '@rainbow-me/rainbowkit': 0.8.1_7dzb4y6j3pihpssrwkfz5wy5va '@tanstack/react-query': 4.22.0_biqbaboplfbrettd7655fr4n2y '@tanstack/react-query-devtools': 4.22.0_gp275tdwez2a4eujt75dnnp754 '@tanstack/react-query-persist-client': 4.22.0_tqsbl3x6ixew47ctvte2nz2yki @@ -144,6 +159,7 @@ dependencies: ethers: 5.7.2 fast-deep-equal: 3.1.3 idb-keyval: 6.2.0 + immer: 9.0.17 ioredis: 5.2.4 js-yaml: 4.1.0 jsonfeed-to-rss: 3.0.6 @@ -188,8 +204,8 @@ dependencies: unist-util-visit: 4.1.1 use-onclickoutside: 0.4.1_kzbn2opkn2327fwg5yzwzya5o4 uuid: 9.0.0 - wagmi: 0.8.10_5fkdkfy2bkgsnhvxgn477z7iae - zustand: 4.3.1_react@18.2.0 + wagmi: 0.8.10_oxgw366w4maetf5vsldye6glsu + zustand: 4.3.1_immer@9.0.17+react@18.2.0 devDependencies: '@iconify-json/bi': 1.1.14 @@ -261,7 +277,6 @@ packages: dependencies: '@babel/highlight': 7.18.6 dev: false - optional: true /@babel/compat-data/7.20.10: resolution: {integrity: sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==} @@ -331,7 +346,15 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 dev: false - optional: true + + /@babel/plugin-syntax-jsx/7.18.6: + resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/helper-plugin-utils': 7.20.2 + dev: false /@babel/plugin-transform-runtime/7.19.6: resolution: {integrity: sha512-PRH37lz4JU156lYFW1p8OxE5i7d6Sl/zV58ooyr+q1J1lnQPyg5tIiXlIwNVhJaY4W3TmOtdc8jqdXQcB1v5Yw==} @@ -532,6 +555,128 @@ packages: - utf-8-validate dev: false + /@crossbell/connect-kit/0.0.6_trixsdeca3cjambemp6yxgmpcm: + resolution: {integrity: sha512-QtY7sSP+agVFOkEQ9mzpe+yTAFZ7r9p00tS8gPAjjpxTZzAVbLi8DWPZPQeuvOR5t8S6iCpOvUrn79bbRJmpNQ==} + peerDependencies: + '@crossbell/contract': 0.0.6 + '@crossbell/indexer': 0.0.6 + '@crossbell/ui': 0.0.6 + '@crossbell/util-hooks': 0.0.6 + '@crossbell/util-metadata': 0.0.6 + '@tanstack/react-query': '*' + '@wagmi/core': '*' + crossbell.js: ^0.16 + ethers: '*' + immer: ^9 + react: ^18 + wagmi: '*' + zustand: ^4 + dependencies: + '@crossbell/contract': 0.0.6_j2aag2hn6oolatv5haaa4234xu + '@crossbell/indexer': 0.0.6_epqrbdlixidyl2cpwkoretklfu + '@crossbell/ui': 0.0.6_react@18.2.0 + '@crossbell/util-hooks': 0.0.6_react@18.2.0 + '@crossbell/util-metadata': 0.0.6_aklndbpc7bbyae5yvvosjgd36y + '@emotion/react': 11.10.5_kzbn2opkn2327fwg5yzwzya5o4 + '@mantine/carousel': 5.10.0_hzmlq6vyapjyogfbtcru4ga64a + '@mantine/core': 5.10.0_lbfixegkxal6rwioqxubxet6s4 + '@mantine/hooks': 5.10.0_react@18.2.0 + '@mantine/notifications': 5.10.0_3m53ouna3laykmqkiimzgz4i2m + '@tanstack/react-query': 4.22.0_biqbaboplfbrettd7655fr4n2y + canvas-confetti: 1.6.0 + check-password-strength: 2.0.7 + classnames: 2.3.1 + crossbell.js: 0.16.1 + detect-browser: 5.2.0 + embla-carousel-react: 7.0.5_react@18.2.0 + ethers: 5.7.2 + immer: 9.0.17 + qrcode: 1.5.0 + react: 18.2.0 + react-transition-group: 4.4.5_biqbaboplfbrettd7655fr4n2y + wagmi: 0.8.10_oxgw366w4maetf5vsldye6glsu + zustand: 4.3.1_immer@9.0.17+react@18.2.0 + transitivePeerDependencies: + - '@babel/core' + - '@types/react' + - react-dom + dev: false + + /@crossbell/contract/0.0.6_j2aag2hn6oolatv5haaa4234xu: + resolution: {integrity: sha512-uYR4h8ZQiStzv6YZM1ayZm8SwfbR1BtaqI2ny60xsVPg2y7/MDieuewsV7QNwEwLdu9MuOhS3UQM4q/a+BWMZQ==} + peerDependencies: + '@crossbell/indexer': 0.0.6 + '@crossbell/util-hooks': 0.0.6 + crossbell.js: 0.16.x + ethers: 5.x.x + react: 18.x.x + wagmi: 0.7.x + dependencies: + '@crossbell/indexer': 0.0.6_epqrbdlixidyl2cpwkoretklfu + '@crossbell/util-hooks': 0.0.6_react@18.2.0 + crossbell.js: 0.16.1 + ethers: 5.7.2 + react: 18.2.0 + wagmi: 0.8.10_oxgw366w4maetf5vsldye6glsu + dev: false + + /@crossbell/indexer/0.0.6_epqrbdlixidyl2cpwkoretklfu: + resolution: {integrity: sha512-vNyMKnT0xZkyfo44DYLFguBsyDnro3OmaZQrZ5n6JHhLmnL/LCqA/hIdlP/othzltccNnMhJr+EARClPBaptQg==} + peerDependencies: + '@tanstack/react-query': 4.x + crossbell.js: 0.16.x + ethers: 5.x + wagmi: 0.7.x + dependencies: + '@tanstack/react-query': 4.22.0_biqbaboplfbrettd7655fr4n2y + crossbell.js: 0.16.1 + ethers: 5.7.2 + lru-cache: 7.14.0 + wagmi: 0.8.10_oxgw366w4maetf5vsldye6glsu + dev: false + + /@crossbell/ui/0.0.6_react@18.2.0: + resolution: {integrity: sha512-20/aW5BD+V+F/niwu/4aeYzbVvj7jtNm1KISxy5YXGwfVlLn0TJd66f66lSKOUMStHqBLZY6019Pv2G/5NXjzw==} + peerDependencies: + react: 18.x.x + dependencies: + facepaint: 1.2.1 + react: 18.2.0 + dev: false + + /@crossbell/util-ethers/0.0.6: + resolution: {integrity: sha512-jTlnmfwS+2D2IKyjqFBTHOhwlreX27r4Ysxz3Iuv5len16lwrModdy11Fn5XAw/EPTcLbrEputSWyaUT+uzhxA==} + dev: false + + /@crossbell/util-hooks/0.0.6_react@18.2.0: + resolution: {integrity: sha512-ItlnBpL1+gd9hpQgynoOef1nkMJtHKsuRekKH38QYrD7hirXhK9lZAvw72nHheXsJO3jHEaWMW78ZYuA3cropA==} + peerDependencies: + react: 18.x.x + dependencies: + react: 18.2.0 + dev: false + + /@crossbell/util-ipfs/0.0.6_react@18.2.0: + resolution: {integrity: sha512-vaBkp4xh0ZkLTl3EnNuq42djGfoYz0LI2aM3LzUku9S8r3MVRiqKGAHwcnC4PMWsPQO2r4P6KPOkLKhPPC1fsg==} + peerDependencies: + react: 18.x.x + dependencies: + react: 18.2.0 + dev: false + + /@crossbell/util-metadata/0.0.6_aklndbpc7bbyae5yvvosjgd36y: + resolution: {integrity: sha512-fU6oghSYaIE2KiS/Gmx8eP/hcEdBL47dhvEmjTW6wooxvrxCgV0kBuqzKxPS80PTzH+AxyZEoGrh22uYZOrEfA==} + peerDependencies: + '@crossbell/util-ethers': 0.0.6 + '@crossbell/util-ipfs': 0.0.6 + crossbell.js: 0.16.x + dependencies: + '@crossbell/util-ethers': 0.0.6 + '@crossbell/util-ipfs': 0.0.6_react@18.2.0 + '@fastify/deepmerge': 1.1.0 + crossbell.js: 0.16.1 + dev: false + /@emoji-mart/data/1.1.1: resolution: {integrity: sha512-yn1LiT9QA0GHN+Xkv0ZkZYS0+SyopNItMEi7z/f9Se8yA5TMjlcq0jisseqeO0MdG/x8P5Pgqluzi6rOr5HUkw==} dev: false @@ -546,8 +691,99 @@ packages: react: 18.2.0 dev: false - /@emotion/hash/0.8.0: - resolution: {integrity: sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==} + /@emotion/babel-plugin/11.10.5: + resolution: {integrity: sha512-xE7/hyLHJac7D2Ve9dKroBBZqBT7WuPQmWcq7HSGb84sUuP4mlOWoB8dvVfD9yk5DHkU1m6RW7xSoDtnQHNQeA==} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/helper-module-imports': 7.18.6 + '@babel/plugin-syntax-jsx': 7.18.6 + '@babel/runtime': 7.20.7 + '@emotion/hash': 0.9.0 + '@emotion/memoize': 0.8.0 + '@emotion/serialize': 1.1.1 + babel-plugin-macros: 3.1.0 + convert-source-map: 1.9.0 + escape-string-regexp: 4.0.0 + find-root: 1.1.0 + source-map: 0.5.7 + stylis: 4.1.3 + dev: false + + /@emotion/cache/11.10.5: + resolution: {integrity: sha512-dGYHWyzTdmK+f2+EnIGBpkz1lKc4Zbj2KHd4cX3Wi8/OWr5pKslNjc3yABKH4adRGCvSX4VDC0i04mrrq0aiRA==} + dependencies: + '@emotion/memoize': 0.8.0 + '@emotion/sheet': 1.2.1 + '@emotion/utils': 1.2.0 + '@emotion/weak-memoize': 0.3.0 + stylis: 4.1.3 + dev: false + + /@emotion/hash/0.9.0: + resolution: {integrity: sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ==} + dev: false + + /@emotion/memoize/0.8.0: + resolution: {integrity: sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA==} + dev: false + + /@emotion/react/11.10.5_kzbn2opkn2327fwg5yzwzya5o4: + resolution: {integrity: sha512-TZs6235tCJ/7iF6/rvTaOH4oxQg2gMAcdHemjwLKIjKz4rRuYe1HJ2TQJKnAcRAfOUDdU8XoDadCe1rl72iv8A==} + peerDependencies: + '@babel/core': ^7.0.0 + '@types/react': '*' + react: '>=16.8.0' + peerDependenciesMeta: + '@babel/core': + optional: true + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.20.7 + '@emotion/babel-plugin': 11.10.5 + '@emotion/cache': 11.10.5 + '@emotion/serialize': 1.1.1 + '@emotion/use-insertion-effect-with-fallbacks': 1.0.0_react@18.2.0 + '@emotion/utils': 1.2.0 + '@emotion/weak-memoize': 0.3.0 + '@types/react': 18.0.26 + hoist-non-react-statics: 3.3.2 + react: 18.2.0 + dev: false + + /@emotion/serialize/1.1.1: + resolution: {integrity: sha512-Zl/0LFggN7+L1liljxXdsVSVlg6E/Z/olVWpfxUTxOAmi8NU7YoeWeLfi1RmnB2TATHoaWwIBRoL+FvAJiTUQA==} + dependencies: + '@emotion/hash': 0.9.0 + '@emotion/memoize': 0.8.0 + '@emotion/unitless': 0.8.0 + '@emotion/utils': 1.2.0 + csstype: 3.1.1 + dev: false + + /@emotion/sheet/1.2.1: + resolution: {integrity: sha512-zxRBwl93sHMsOj4zs+OslQKg/uhF38MB+OMKoCrVuS0nyTkqnau+BM3WGEoOptg9Oz45T/aIGs1qbVAsEFo3nA==} + dev: false + + /@emotion/unitless/0.8.0: + resolution: {integrity: sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==} + dev: false + + /@emotion/use-insertion-effect-with-fallbacks/1.0.0_react@18.2.0: + resolution: {integrity: sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A==} + peerDependencies: + react: '>=16.8.0' + dependencies: + react: 18.2.0 + dev: false + + /@emotion/utils/1.2.0: + resolution: {integrity: sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw==} + dev: false + + /@emotion/weak-memoize/0.3.0: + resolution: {integrity: sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg==} dev: false /@esbuild/android-arm/0.16.17: @@ -1080,6 +1316,10 @@ packages: '@ethersproject/strings': 5.7.0 dev: false + /@fastify/deepmerge/1.1.0: + resolution: {integrity: sha512-E8Hfdvs1bG6u0N4vN5Nty6JONUfTdOciyD5rn8KnEsLKIenvOVcr210BQR9t34PRkNyjqnMLGk3e0BsaxRdL+g==} + dev: false + /@floating-ui/core/1.1.0: resolution: {integrity: sha512-zbsLwtnHo84w1Kc8rScAo5GMk1GdecSlrflIbfnEBJwvTSj1SL6kkOYV+nHraMCPEy+RNZZUaZyL8JosDGCtGQ==} dev: false @@ -1090,6 +1330,21 @@ packages: '@floating-ui/core': 1.1.0 dev: false + /@floating-ui/react-dom-interactions/0.10.3_ib3m5ricvtkl2cll7qpr2f6lvq: + resolution: {integrity: sha512-UEHqdnzyoiWNU5az/tAljr9iXFzN18DcvpMqW+/cXz4FEhDEB1ogLtWldOWCujLerPBnSRocADALafelOReMpw==} + deprecated: Package renamed to @floating-ui/react + peerDependencies: + react: '>=16.8.0' + react-dom: '>=16.8.0' + dependencies: + '@floating-ui/react-dom': 1.2.0_biqbaboplfbrettd7655fr4n2y + aria-hidden: 1.2.2_kzbn2opkn2327fwg5yzwzya5o4 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + transitivePeerDependencies: + - '@types/react' + dev: false + /@floating-ui/react-dom-interactions/0.13.3_ib3m5ricvtkl2cll7qpr2f6lvq: resolution: {integrity: sha512-AnCW06eIZxzD/Hl1Qbi2JkQRU5KpY7Dn81k3xRfbvs+HylhB+t3x88/GNKLK39mMTlJ/ylxm5prUpiLrTWvifQ==} deprecated: Package renamed to @floating-ui/react @@ -1322,6 +1577,87 @@ packages: '@lezer/highlight': 1.1.3 dev: false + /@mantine/carousel/5.10.0_hzmlq6vyapjyogfbtcru4ga64a: + resolution: {integrity: sha512-nEZXJw96Y6lu952BlMT0txlhJf7XkllnGk9Mpmsrm6bKDD/dJM6oOZAFfwSj1QNPJpm4bYTmG/404BSQvm60WA==} + peerDependencies: + '@mantine/core': 5.10.0 + '@mantine/hooks': 5.10.0 + embla-carousel-react: ^7.0.0 + react: '>=16.8.0' + dependencies: + '@mantine/core': 5.10.0_lbfixegkxal6rwioqxubxet6s4 + '@mantine/hooks': 5.10.0_react@18.2.0 + '@mantine/utils': 5.10.0_react@18.2.0 + embla-carousel-react: 7.0.5_react@18.2.0 + react: 18.2.0 + dev: false + + /@mantine/core/5.10.0_lbfixegkxal6rwioqxubxet6s4: + resolution: {integrity: sha512-if272RiYPK0nQQdGNwcCSY7bCPJW9455qXlRhnYOr021xh89T8WFVPeDw4uwcxoXsXdKRV5GAi9irSnsUqsjJQ==} + peerDependencies: + '@mantine/hooks': 5.10.0 + react: '>=16.8.0' + react-dom: '>=16.8.0' + dependencies: + '@floating-ui/react-dom-interactions': 0.10.3_ib3m5ricvtkl2cll7qpr2f6lvq + '@mantine/hooks': 5.10.0_react@18.2.0 + '@mantine/styles': 5.10.0_sogmqz4enknxtkxk3k5s6bqwnq + '@mantine/utils': 5.10.0_react@18.2.0 + '@radix-ui/react-scroll-area': 1.0.2_biqbaboplfbrettd7655fr4n2y + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + react-textarea-autosize: 8.3.4_kzbn2opkn2327fwg5yzwzya5o4 + transitivePeerDependencies: + - '@emotion/react' + - '@types/react' + dev: false + + /@mantine/hooks/5.10.0_react@18.2.0: + resolution: {integrity: sha512-dAefxpvqjFtXNeKse+awkIa4U1XGnMMOqWg1+07Y2Ino2G6EiT8AEnYqQyTXgcPoNaWwG9533Q/DDadmyweqaQ==} + peerDependencies: + react: '>=16.8.0' + dependencies: + react: 18.2.0 + dev: false + + /@mantine/notifications/5.10.0_3m53ouna3laykmqkiimzgz4i2m: + resolution: {integrity: sha512-ipqH8ia0ibjHj1+4hIgFmYK5RbmGX2oEyZWoIYVie5rwf8OgdIQOjF4LaZw+KVw0QPvNajj9Fj4AQay5egJSDQ==} + peerDependencies: + '@mantine/core': 5.10.0 + '@mantine/hooks': 5.10.0 + react: '>=16.8.0' + react-dom: '>=16.8.0' + dependencies: + '@mantine/core': 5.10.0_lbfixegkxal6rwioqxubxet6s4 + '@mantine/hooks': 5.10.0_react@18.2.0 + '@mantine/utils': 5.10.0_react@18.2.0 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + react-transition-group: 4.4.2_biqbaboplfbrettd7655fr4n2y + dev: false + + /@mantine/styles/5.10.0_sogmqz4enknxtkxk3k5s6bqwnq: + resolution: {integrity: sha512-3JBM5LWJHb4Yk7jymPiSuaBJRoe2CgA7KoyYWgabwBP115GlHPb1rQCcavJsobHV4U+wFfZEEUnVBpaAaXqgmw==} + peerDependencies: + '@emotion/react': '>=11.9.0' + react: '>=16.8.0' + react-dom: '>=16.8.0' + dependencies: + '@emotion/react': 11.10.5_kzbn2opkn2327fwg5yzwzya5o4 + clsx: 1.1.1 + csstype: 3.0.9 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + dev: false + + /@mantine/utils/5.10.0_react@18.2.0: + resolution: {integrity: sha512-mHnNm0ajIa8qLAIEwv82N6+7YKecynOA3I8vzgBHXS2x4HwGsHITFYGmMh2LNpx5dRL034tObfEFYZXqncyEDw==} + peerDependencies: + react: '>=16.8.0' + dependencies: + react: 18.2.0 + dev: false + /@mapbox/hast-util-table-cell-style/0.2.0: resolution: {integrity: sha512-gqaTIGC8My3LVSnU38IwjHVKJC94HSonjvFHDk8/aSrApL8v4uWgm8zJkK7MJIIbHuNOr/+Mv2KkQKcxs6LEZA==} engines: {node: '>=12'} @@ -1708,27 +2044,116 @@ packages: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true - /@rainbow-me/rainbowkit/0.8.1_7dzb4y6j3pihpssrwkfz5wy5va: - resolution: {integrity: sha512-A8BjihvgCY/xjQWOpqgOce+uO4mmIV4Qlo3XMF87kk5WNmyLLaPx2oYTJQz1uOinWE77h4G0HozJr5wnrermgw==} - engines: {node: '>=12.4'} - peerDependencies: - ethers: '>=5.5.1' - react: '>=17' - react-dom: '>=17' - wagmi: 0.9.x + /@radix-ui/number/1.0.0: + resolution: {integrity: sha512-Ofwh/1HX69ZfJRiRBMTy7rgjAzHmwe4kW9C9Y99HTRUcYLUuVT0KESFj15rPjRgKJs20GPq8Bm5aEDJ8DuA3vA==} dependencies: - '@vanilla-extract/css': 1.9.1 - '@vanilla-extract/dynamic': 2.0.2 - '@vanilla-extract/sprinkles': 1.5.0_@vanilla-extract+css@1.9.1 - clsx: 1.1.1 - ethers: 5.7.2 - qrcode: 1.5.0 + '@babel/runtime': 7.20.7 + dev: false + + /@radix-ui/primitive/1.0.0: + resolution: {integrity: sha512-3e7rn8FDMin4CgeL7Z/49smCA3rFYY3Ha2rUQ7HRWFadS5iCRw08ZgVT1LaNTCNqgvrUiyczLflrVrF0SRQtNA==} + dependencies: + '@babel/runtime': 7.20.7 + dev: false + + /@radix-ui/react-compose-refs/1.0.0_react@18.2.0: + resolution: {integrity: sha512-0KaSv6sx787/hK3eF53iOkiSLwAGlFMx5lotrqD2pTjB18KbybKoEIgkNZTKC60YECDQTKGTRcDBILwZVqVKvA==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.7 + react: 18.2.0 + dev: false + + /@radix-ui/react-context/1.0.0_react@18.2.0: + resolution: {integrity: sha512-1pVM9RfOQ+n/N5PJK33kRSKsr1glNxomxONs5c49MliinBY6Yw2Q995qfBUUo0/Mbg05B/sGA0gkgPI7kmSHBg==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.7 + react: 18.2.0 + dev: false + + /@radix-ui/react-direction/1.0.0_react@18.2.0: + resolution: {integrity: sha512-2HV05lGUgYcA6xgLQ4BKPDmtL+QbIZYH5fCOTAOOcJ5O0QbWS3i9lKaurLzliYUDhORI2Qr3pyjhJh44lKA3rQ==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.7 + react: 18.2.0 + dev: false + + /@radix-ui/react-presence/1.0.0_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.7 + '@radix-ui/react-compose-refs': 1.0.0_react@18.2.0 + '@radix-ui/react-use-layout-effect': 1.0.0_react@18.2.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - react-remove-scroll: 2.5.4_kzbn2opkn2327fwg5yzwzya5o4 - wagmi: 0.8.10_5fkdkfy2bkgsnhvxgn477z7iae - transitivePeerDependencies: - - '@types/react' + dev: false + + /@radix-ui/react-primitive/1.0.1_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-fHbmislWVkZaIdeF6GZxF0A/NH/3BjrGIYj+Ae6eTmTCr7EB0RQAAVEiqsXK6p3/JcRqVSBQoceZroj30Jj3XA==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.7 + '@radix-ui/react-slot': 1.0.1_react@18.2.0 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + dev: false + + /@radix-ui/react-scroll-area/1.0.2_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-k8VseTxI26kcKJaX0HPwkvlNBPTs56JRdYzcZ/vzrNUkDlvXBy8sMc7WvCpYzZkHgb+hd72VW9MqkqecGtuNgg==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.7 + '@radix-ui/number': 1.0.0 + '@radix-ui/primitive': 1.0.0 + '@radix-ui/react-compose-refs': 1.0.0_react@18.2.0 + '@radix-ui/react-context': 1.0.0_react@18.2.0 + '@radix-ui/react-direction': 1.0.0_react@18.2.0 + '@radix-ui/react-presence': 1.0.0_biqbaboplfbrettd7655fr4n2y + '@radix-ui/react-primitive': 1.0.1_biqbaboplfbrettd7655fr4n2y + '@radix-ui/react-use-callback-ref': 1.0.0_react@18.2.0 + '@radix-ui/react-use-layout-effect': 1.0.0_react@18.2.0 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + dev: false + + /@radix-ui/react-slot/1.0.1_react@18.2.0: + resolution: {integrity: sha512-avutXAFL1ehGvAXtPquu0YK5oz6ctS474iM3vNGQIkswrVhdrS52e3uoMQBzZhNRAIE0jBnUyXWNmSjGHhCFcw==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.7 + '@radix-ui/react-compose-refs': 1.0.0_react@18.2.0 + react: 18.2.0 + dev: false + + /@radix-ui/react-use-callback-ref/1.0.0_react@18.2.0: + resolution: {integrity: sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.7 + react: 18.2.0 + dev: false + + /@radix-ui/react-use-layout-effect/1.0.0_react@18.2.0: + resolution: {integrity: sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.7 + react: 18.2.0 dev: false /@rollup/pluginutils/5.0.2: @@ -1975,7 +2400,6 @@ packages: /@types/parse-json/4.0.0: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} dev: false - optional: true /@types/parse5/6.0.3: resolution: {integrity: sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==} @@ -2335,41 +2759,7 @@ packages: wonka: 6.1.2 dev: false - /@vanilla-extract/css/1.9.1: - resolution: {integrity: sha512-pu2SFiff5jRhPwvGoj8cM5l/qIyLvigOmy22ss5DGjwV5pJYezRjDLxWumi2luIwioMWvh9EozCjyfH8nq+7fQ==} - dependencies: - '@emotion/hash': 0.8.0 - '@vanilla-extract/private': 1.0.3 - ahocorasick: 1.0.2 - chalk: 4.1.2 - css-what: 5.1.0 - cssesc: 3.0.0 - csstype: 3.1.1 - deep-object-diff: 1.1.9 - deepmerge: 4.2.2 - media-query-parser: 2.0.2 - outdent: 0.8.0 - dev: false - - /@vanilla-extract/dynamic/2.0.2: - resolution: {integrity: sha512-U4nKaEQ8Kuz+exXEr51DUpyaOuzo24/S/k1YbDPQR06cYcNjQqvwFRnwWtZ+9ImocqM1wTKtzrdUgSTtLGIwAg==} - dependencies: - '@vanilla-extract/private': 1.0.3 - dev: false - - /@vanilla-extract/private/1.0.3: - resolution: {integrity: sha512-17kVyLq3ePTKOkveHxXuIJZtGYs+cSoev7BlP+Lf4916qfDhk/HBjvlYDe8egrea7LNPHKwSZJK/bzZC+Q6AwQ==} - dev: false - - /@vanilla-extract/sprinkles/1.5.0_@vanilla-extract+css@1.9.1: - resolution: {integrity: sha512-W58f2Rzz5lLmk0jbhgStVlZl5wEiPB1Ur3fRvUaBM+MrifZ3qskmFq/CiH//fEYeG5Dh9vF1qRviMMH46cX9Nw==} - peerDependencies: - '@vanilla-extract/css': ^1.0.0 - dependencies: - '@vanilla-extract/css': 1.9.1 - dev: false - - /@wagmi/core/0.7.9_x4d3gduigo4gw4jtoghioomvum: + /@wagmi/core/0.7.9_3a3ay2gkodlqn546cnci5ajssm: resolution: {integrity: sha512-97KCELUP5Q1AagRyE7SmpLh4/v3xdcy/XMbybLvvtQbgmi3y5oEzy4h/wJMY1hEZlmicqyWZAHHm6xIr1tP5HA==} peerDependencies: '@coinbase/wallet-sdk': '>=3.3.0' @@ -2386,7 +2776,7 @@ packages: abitype: 0.1.8_typescript@4.9.4 ethers: 5.7.2 eventemitter3: 4.0.7 - zustand: 4.3.1_react@18.2.0 + zustand: 4.3.1_immer@9.0.17+react@18.2.0 transitivePeerDependencies: - immer - react @@ -2696,10 +3086,6 @@ packages: indent-string: 4.0.0 dev: true - /ahocorasick/1.0.2: - resolution: {integrity: sha512-hCOfMzbFx5IDutmWLAt6MZwOUjIfSM9G9FyVxytmE4Rs/5YDPWQrD/+IR1w+FweD9H2oOZEnv36TmkjhNURBVA==} - dev: false - /ajv/6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: @@ -2939,6 +3325,15 @@ packages: dev: false optional: true + /babel-plugin-macros/3.1.0: + resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} + engines: {node: '>=10', npm: '>=6'} + dependencies: + '@babel/runtime': 7.20.7 + cosmiconfig: 7.1.0 + resolve: 1.22.1 + dev: false + /babel-plugin-polyfill-corejs2/0.3.3: resolution: {integrity: sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==} peerDependencies: @@ -3221,6 +3616,10 @@ packages: resolution: {integrity: sha512-ecER9xgJQVMqcrxThKptsW0pPxSae8R2RB87LNa+ivW9ppNWRHEplXcDzkCOP4LYWGj8hunXLqaiC41iBATNyg==} dev: false + /canvas-confetti/1.6.0: + resolution: {integrity: sha512-ej+w/m8Jzpv9Z7W7uJZer14Ke8P2ogsjg4ZMGIuq4iqUOqY2Jq8BNW42iGmNfRwREaaEfFIczLuZZiEVSYNHAA==} + dev: false + /ccount/2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} dev: false @@ -3246,7 +3645,6 @@ packages: escape-string-regexp: 1.0.5 supports-color: 5.5.0 dev: false - optional: true /chalk/4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} @@ -3254,6 +3652,7 @@ packages: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 + dev: true /character-entities-html4/2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} @@ -3275,6 +3674,10 @@ packages: resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} dev: true + /check-password-strength/2.0.7: + resolution: {integrity: sha512-VyklBkB6dOKnCIh63zdVr7QKVMN9/npwUqNAXxWrz8HabVZH/n/d+lyNm1O/vbXFJlT/Hytb5ouYKYGkoeZirQ==} + dev: false + /chokidar/3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -3502,6 +3905,10 @@ packages: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} dev: false + /convert-source-map/1.9.0: + resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} + dev: false + /copy-anything/3.0.3: resolution: {integrity: sha512-fpW2W/BqEzqPp29QS+MwwfisHCQZtiduTe/m8idFo0xbti9fIZ2WVhAsCv4ggFVH3AgCkVdpoOCtQC6gBrdhjw==} engines: {node: '>=12.13'} @@ -3533,6 +3940,17 @@ packages: dev: false optional: true + /cosmiconfig/7.1.0: + resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} + engines: {node: '>=10'} + dependencies: + '@types/parse-json': 4.0.0 + import-fresh: 3.3.0 + parse-json: 5.2.0 + path-type: 4.0.0 + yaml: 1.10.2 + dev: false + /create-hash/1.2.0: resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} dependencies: @@ -3604,15 +4022,15 @@ packages: source-map-js: 1.0.2 dev: true - /css-what/5.1.0: - resolution: {integrity: sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==} - engines: {node: '>= 6'} - dev: false - /cssesc/3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} hasBin: true + dev: true + + /csstype/3.0.9: + resolution: {integrity: sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==} + dev: false /csstype/3.1.1: resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==} @@ -3726,15 +4144,6 @@ packages: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true - /deep-object-diff/1.1.9: - resolution: {integrity: sha512-Rn+RuwkmkDwCi2/oXOFS9Gsr5lJZu/yTGpK7wAaAIE75CC+LCGEZHpY6VQJa/RoJcrmaA/docWJZvYohlNkWPA==} - dev: false - - /deepmerge/4.2.2: - resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} - engines: {node: '>=0.10.0'} - dev: false - /define-lazy-prop/2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} @@ -3798,10 +4207,6 @@ packages: engines: {node: '>=8'} dev: false - /detect-node-es/1.1.0: - resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} - dev: false - /detective/5.2.1: resolution: {integrity: sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==} engines: {node: '>=0.8.0'} @@ -3866,6 +4271,13 @@ packages: esutils: 2.0.3 dev: true + /dom-helpers/5.2.1: + resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} + dependencies: + '@babel/runtime': 7.20.7 + csstype: 3.1.1 + dev: false + /dotenv/16.0.3: resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} engines: {node: '>=12'} @@ -3904,6 +4316,19 @@ packages: minimalistic-crypto-utils: 1.0.1 dev: false + /embla-carousel-react/7.0.5_react@18.2.0: + resolution: {integrity: sha512-qhw980gKj7G+O5d3WSwj0TyhcbpGP3DqJPiAatt1t3wEEcZqn7csaIfLh4e1N/0kna9sZfZZRzz+//NSrUodSg==} + peerDependencies: + react: ^16.8.0 || ^17.0.1 || ^18.0.0 + dependencies: + embla-carousel: 7.0.5 + react: 18.2.0 + dev: false + + /embla-carousel/7.0.5: + resolution: {integrity: sha512-loRcu0La0F7bhEMwbvgpi14iaaIEdwacH1xoplnaYfwN4KMgECkiuLgu4lx+v6MYd6lSpg/bw7ZxEuLUwYjavg==} + dev: false + /emoji-mart/5.4.0: resolution: {integrity: sha512-xrRrUmMqZG64oRxmUZcf8zSMUGQtIUYUL3aZD5iMkqAve+I9wMNh3OVOXL7NW9fEm48L2LI3BUPpj/DUIAJrVg==} dev: false @@ -3946,7 +4371,6 @@ packages: dependencies: is-arrayish: 0.2.1 dev: false - optional: true /es-abstract/1.21.1: resolution: {integrity: sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==} @@ -4109,12 +4533,10 @@ packages: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} dev: false - optional: true /escape-string-regexp/4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - dev: true /escape-string-regexp/5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} @@ -4671,6 +5093,10 @@ packages: engines: {node: '> 0.1.90'} dev: false + /facepaint/1.2.1: + resolution: {integrity: sha512-oNvBekbhsm/0PNSOWca5raHNAi6dG960Bx6LJgxDPNF59WpuspgQ17bN5MKwOr7JcFdQYc7StW3VZ28DBZLavQ==} + dev: false + /fast-deep-equal/3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -4743,6 +5169,10 @@ packages: engines: {node: '>=0.10.0'} dev: false + /find-root/1.1.0: + resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} + dev: false + /find-up/3.0.0: resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} engines: {node: '>=6'} @@ -4881,11 +5311,6 @@ packages: has: 1.0.3 has-symbols: 1.0.3 - /get-nonce/1.0.1: - resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} - engines: {node: '>=6'} - dev: false - /get-stream/6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -5034,11 +5459,11 @@ packages: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} dev: false - optional: true /has-flag/4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + dev: true /has-property-descriptors/1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} @@ -5255,6 +5680,12 @@ packages: minimalistic-crypto-utils: 1.0.1 dev: false + /hoist-non-react-statics/3.3.2: + resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} + dependencies: + react-is: 16.13.1 + dev: false + /html-void-elements/2.0.1: resolution: {integrity: sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==} dev: false @@ -5306,6 +5737,10 @@ packages: engines: {node: '>= 4'} dev: true + /immer/9.0.17: + resolution: {integrity: sha512-+hBruaLSQvkPfxRiTLK/mi4vLH+/VQS6z2KJahdoxlleFOI8ARqzOF17uy12eFDlqWmPoygwc5evgwcp+dlHhg==} + dev: false + /import-fresh/3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -5349,12 +5784,6 @@ packages: side-channel: 1.0.4 dev: true - /invariant/2.2.4: - resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} - dependencies: - loose-envify: 1.4.0 - dev: false - /ioredis/5.2.4: resolution: {integrity: sha512-qIpuAEt32lZJQ0XyrloCRdlEdUUNGG9i0UOk6zgzK6igyudNWqEBxfH6OlbnOOoBBvr1WB02mm8fR55CnikRng==} engines: {node: '>=12.22.0'} @@ -5406,7 +5835,6 @@ packages: /is-arrayish/0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: false - optional: true /is-arrayish/0.3.2: resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} @@ -5716,7 +6144,6 @@ packages: /json-parse-even-better-errors/2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: false - optional: true /json-rpc-engine/5.4.0: resolution: {integrity: sha512-rAffKbPoNDjuRnXkecTjnsE3xLLrb00rEkdgalINhaYVYIxDwWtvYBr9UFbhTvPB1B2qUOLoFd/cV6f4Q7mh7g==} @@ -5867,7 +6294,6 @@ packages: /lines-and-columns/1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: false - optional: true /lint-staged/13.1.0: resolution: {integrity: sha512-pn/sR8IrcF/T0vpWLilih8jmVouMlxqXxKuAojmbiGX5n/gDnz+abdPptlj0vYnbfE0SQNl3CY/HwtM0+yfOVQ==} @@ -6018,6 +6444,11 @@ packages: dependencies: yallist: 4.0.0 + /lru-cache/7.14.0: + resolution: {integrity: sha512-EIRtP1GrSJny0dqb50QXRUNBxHJhcpxHC++M5tD7RYbvLLn5KVWKsbyswSSqDuU15UFi3bgTQIY8nhDMeF6aDQ==} + engines: {node: '>=12'} + dev: false + /mafmt/10.0.0: resolution: {integrity: sha512-K1bziJOXcnepfztu+2Xy9FLKVLaFMDuspmiyJIYRxnO0WOxFSV7XKSdMxMrVZxcvg1+YjlTIvSGTImUHU2k4Aw==} dependencies: @@ -6224,12 +6655,6 @@ packages: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} dev: true - /media-query-parser/2.0.2: - resolution: {integrity: sha512-1N4qp+jE0pL5Xv4uEcwVUhIkwdUO3S/9gML90nqKA7v7FcOS5vUtatfzok9S9U1EJU8dHWlcv95WLnKmmxZI9w==} - dependencies: - '@babel/runtime': 7.20.7 - dev: false - /merge-stream/2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: true @@ -7005,10 +7430,6 @@ packages: word-wrap: 1.2.3 dev: true - /outdent/0.8.0: - resolution: {integrity: sha512-KiOAIsdpUTcAXuykya5fnVVT+/5uS0Q1mrkRHcF89tpieSmY33O/tmc54CqwA+bfhbtEfZUNLHaPUiB9X3jt1A==} - dev: false - /p-limit/2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -7084,7 +7505,6 @@ packages: json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 dev: false - optional: true /parse-numeric-range/1.3.0: resolution: {integrity: sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==} @@ -7510,41 +7930,6 @@ packages: /react-is/16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - /react-remove-scroll-bar/2.3.4_kzbn2opkn2327fwg5yzwzya5o4: - resolution: {integrity: sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==} - engines: {node: '>=10'} - peerDependencies: - '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - '@types/react': - optional: true - dependencies: - '@types/react': 18.0.26 - react: 18.2.0 - react-style-singleton: 2.2.1_kzbn2opkn2327fwg5yzwzya5o4 - tslib: 2.4.1 - dev: false - - /react-remove-scroll/2.5.4_kzbn2opkn2327fwg5yzwzya5o4: - resolution: {integrity: sha512-xGVKJJr0SJGQVirVFAUZ2k1QLyO6m+2fy0l8Qawbp5Jgrv3DeLalrfMNBFSlmz5kriGGzsVBtGVnf4pTKIhhWA==} - engines: {node: '>=10'} - peerDependencies: - '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - '@types/react': - optional: true - dependencies: - '@types/react': 18.0.26 - react: 18.2.0 - react-remove-scroll-bar: 2.3.4_kzbn2opkn2327fwg5yzwzya5o4 - react-style-singleton: 2.2.1_kzbn2opkn2327fwg5yzwzya5o4 - tslib: 2.4.1 - use-callback-ref: 1.3.0_kzbn2opkn2327fwg5yzwzya5o4 - use-sidecar: 1.1.2_kzbn2opkn2327fwg5yzwzya5o4 - dev: false - /react-scroll/1.8.9_biqbaboplfbrettd7655fr4n2y: resolution: {integrity: sha512-9m7ztraiX/l6L7erzYAD3fhnveNckei6/NkWfqwN2e0FRdoE2W6Pk4oi2Nah7mWpPCPAeIgegfaqZACTimPOwg==} peerDependencies: @@ -7573,21 +7958,46 @@ packages: tiny-invariant: 1.2.0 dev: false - /react-style-singleton/2.2.1_kzbn2opkn2327fwg5yzwzya5o4: - resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} + /react-textarea-autosize/8.3.4_kzbn2opkn2327fwg5yzwzya5o4: + resolution: {integrity: sha512-CdtmP8Dc19xL8/R6sWvtknD/eCXkQr30dtvC4VmGInhRsfF8X/ihXCq6+9l9qbxmKRiq407/7z5fxE7cVWQNgQ==} engines: {node: '>=10'} peerDependencies: - '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - '@types/react': - optional: true dependencies: - '@types/react': 18.0.26 - get-nonce: 1.0.1 - invariant: 2.2.4 + '@babel/runtime': 7.20.7 react: 18.2.0 - tslib: 2.4.1 + use-composed-ref: 1.3.0_react@18.2.0 + use-latest: 1.2.1_kzbn2opkn2327fwg5yzwzya5o4 + transitivePeerDependencies: + - '@types/react' + dev: false + + /react-transition-group/4.4.2_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-/RNYfRAMlZwDSr6z4zNKV6xu53/e2BuaBbGhbyYIXTrmgu/bGHzmqOs7mJSJBHy9Ud+ApHx3QjrkKSp1pxvlFg==} + peerDependencies: + react: '>=16.6.0' + react-dom: '>=16.6.0' + dependencies: + '@babel/runtime': 7.20.7 + dom-helpers: 5.2.1 + loose-envify: 1.4.0 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + dev: false + + /react-transition-group/4.4.5_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==} + peerDependencies: + react: '>=16.6.0' + react-dom: '>=16.6.0' + dependencies: + '@babel/runtime': 7.20.7 + dom-helpers: 5.2.1 + loose-envify: 1.4.0 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 dev: false /react/18.2.0: @@ -8190,6 +8600,11 @@ packages: source-map: 0.6.1 dev: true + /source-map/0.5.7: + resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} + engines: {node: '>=0.10.0'} + dev: false + /source-map/0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -8407,6 +8822,10 @@ packages: react: 18.2.0 dev: false + /stylis/4.1.3: + resolution: {integrity: sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA==} + dev: false + /superjson/1.12.1: resolution: {integrity: sha512-HMTj43zvwW5bD+JCZCvFf4DkZQCmiLTen4C+W1Xogj0SPOpnhxsriogM04QmBVGH5b3kcIIOr6FqQ/aoIDx7TQ==} engines: {node: '>=10'} @@ -8424,13 +8843,13 @@ packages: dependencies: has-flag: 3.0.0 dev: false - optional: true /supports-color/7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} dependencies: has-flag: 4.0.0 + dev: true /supports-preserve-symlinks-flag/1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} @@ -8915,19 +9334,12 @@ packages: punycode: 2.2.0 dev: true - /use-callback-ref/1.3.0_kzbn2opkn2327fwg5yzwzya5o4: - resolution: {integrity: sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==} - engines: {node: '>=10'} + /use-composed-ref/1.3.0_react@18.2.0: + resolution: {integrity: sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==} peerDependencies: - '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - '@types/react': - optional: true dependencies: - '@types/react': 18.0.26 react: 18.2.0 - tslib: 2.4.1 dev: false /use-isomorphic-layout-effect/1.1.2_kzbn2opkn2327fwg5yzwzya5o4: @@ -8969,22 +9381,6 @@ packages: - '@types/react' dev: false - /use-sidecar/1.1.2_kzbn2opkn2327fwg5yzwzya5o4: - resolution: {integrity: sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==} - engines: {node: '>=10'} - peerDependencies: - '@types/react': ^16.9.0 || ^17.0.0 || ^18.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - '@types/react': - optional: true - dependencies: - '@types/react': 18.0.26 - detect-node-es: 1.1.0 - react: 18.2.0 - tslib: 2.4.1 - dev: false - /use-sync-external-store/1.2.0_react@18.2.0: resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} peerDependencies: @@ -9176,7 +9572,7 @@ packages: resolution: {integrity: sha512-f+fciywl1SJEniZHD6H+kUO8gOnwIr7f4ijKA6+ZvJFjeGi1r4PDLl53Ayud9O/rk64RqgoQine0feoeOU0kXg==} dev: false - /wagmi/0.8.10_5fkdkfy2bkgsnhvxgn477z7iae: + /wagmi/0.8.10_oxgw366w4maetf5vsldye6glsu: resolution: {integrity: sha512-svS/Debs6maJX3TlPDXNo+UDfZn8VCHzN2xcMMjPjcu2Z9k2iwFwC0TMLxM1itluzrTcw9n8F8E+f6gb+Aw+EQ==} peerDependencies: ethers: '>=5.5.1' @@ -9186,7 +9582,7 @@ packages: '@tanstack/query-sync-storage-persister': 4.22.0 '@tanstack/react-query': 4.22.0_biqbaboplfbrettd7655fr4n2y '@tanstack/react-query-persist-client': 4.22.0_tqsbl3x6ixew47ctvte2nz2yki - '@wagmi/core': 0.7.9_x4d3gduigo4gw4jtoghioomvum + '@wagmi/core': 0.7.9_3a3ay2gkodlqn546cnci5ajssm '@walletconnect/ethereum-provider': 1.8.0 abitype: 0.1.8_typescript@4.9.4 ethers: 5.7.2 @@ -9529,7 +9925,7 @@ packages: engines: {node: '>=10'} dev: true - /zustand/4.3.1_react@18.2.0: + /zustand/4.3.1_immer@9.0.17+react@18.2.0: resolution: {integrity: sha512-EVyo/eLlOTcJm/X5M00rwtbYFXwRVTaRteSvhtbTZUCQFJkNfIyHPiJ6Ke68MSWzcKHpPzvqNH4gC2ZS/sbNqw==} engines: {node: '>=12.7.0'} peerDependencies: @@ -9541,6 +9937,7 @@ packages: react: optional: true dependencies: + immer: 9.0.17 react: 18.2.0 use-sync-external-store: 1.2.0_react@18.2.0 dev: false diff --git a/src/components/common/CommentInput.tsx b/src/components/common/CommentInput.tsx index 05a4b536..a3f8715d 100644 --- a/src/components/common/CommentInput.tsx +++ b/src/components/common/CommentInput.tsx @@ -6,7 +6,7 @@ import { Avatar } from "~/components/ui/Avatar" import { Input } from "~/components/ui/Input" import { Button } from "~/components/ui/Button" import { useForm } from "react-hook-form" -import { useConnectModal } from "@rainbow-me/rainbowkit" +import { useConnectModal } from "@crossbell/connect-kit" import { useState, useEffect } from "react" import { useCommentPage } from "~/queries/page" import { useRouter } from "next/router" @@ -20,7 +20,7 @@ export const CommentInput: React.FC<{ }> = ({ pageId, originalId }) => { const { address } = useAccount() const userSites = useGetUserSites(address) - const { openConnectModal } = useConnectModal() + const { show: openConnectModal } = useConnectModal() const commentPage = useCommentPage() const router = useRouter() const [viewer, setViewer] = useState(null) diff --git a/src/components/common/ConnectButton.tsx b/src/components/common/ConnectButton.tsx index 2bf6baa1..5e6ed8bb 100644 --- a/src/components/common/ConnectButton.tsx +++ b/src/components/common/ConnectButton.tsx @@ -1,45 +1,46 @@ -import { ConnectButton as RainbowConnectButton } from "@rainbow-me/rainbowkit" +import { + useConnectModal, + useAccountState, + useDisconnectModal, + useAccountBalance, + GeneralAccount, +} from "@crossbell/connect-kit" import { useGetUserSites } from "~/queries/site" -import { useAccount, useDisconnect, useBalance } from "wagmi" import { Avatar } from "~/components/ui/Avatar" import { Button } from "~/components/ui/Button" import type { HeaderLinkType } from "~/components/site/SiteHeader" import { DashboardIcon } from "../icons/DashboardIcon" import { UniLink } from "../ui/UniLink" -import { useEffect, useState } from "react" +import { useEffect, useState, useMemo } from "react" import { Square2StackIcon, ArrowRightOnRectangleIcon, } from "@heroicons/react/24/outline" import { BigNumber } from "ethers" import { SITE_URL } from "~/lib/env" +import { useRefCallback } from "@crossbell/util-hooks" export const ConnectButton: React.FC<{ left?: boolean variant?: "text" | "primary" | "secondary" | "like" | "collect" | "crossbell" }> = ({ left, variant }) => { - const { address } = useAccount() - const userSites = useGetUserSites(address) - const { disconnect } = useDisconnect() + const [ssrReady, account] = useAccountState(({ ssrReady, computed }) => [ + ssrReady, + computed.account, + ]) - const [copyLabel, setCopyLabel] = useState("") - useEffect(() => { - if (address) { - setCopyLabel(address?.slice(0, 5) + "..." + address?.slice(-4)) - } - }, [address]) + const { show: openConnectModal } = useConnectModal() + const { show: disconnect } = useDisconnectModal() + const { balance } = useAccountBalance() + const [copyLabelDisplay, copyLabel] = useCopyLabel(account) + + const userSites = useGetUserSites(account?.address) const dropdownLinks: HeaderLinkType[] = [ { icon: , - label: copyLabel, - onClick() { - navigator.clipboard.writeText(address || "") - setCopyLabel("Copied!") - setTimeout(() => { - setCopyLabel(address?.slice(0, 5) + "..." + address?.slice(-4)) - }, 1000) - }, + label: copyLabelDisplay, + onClick: copyLabel, }, { icon: , @@ -49,20 +50,14 @@ export const ConnectButton: React.FC<{ { icon: , label: "Disconnect", - onClick() { - disconnect() - }, + onClick: disconnect, }, ] - const { data: balance } = useBalance({ - address: address, - }) - const [InsufficientBalance, setInsufficientBalance] = useState(false) useEffect(() => { - if (balance !== undefined) { + if (balance) { if ( BigNumber.from(balance.value).gt( BigNumber.from("1" + "0".repeat(balance.decimals - 2)), @@ -76,123 +71,129 @@ export const ConnectButton: React.FC<{ }, [balance]) return ( - - {({ - account, - chain, - openAccountModal, - openChainModal, - openConnectModal, - mounted, - }) => { +
+ {(() => { + if (!account) { + return ( + + ) + } return ( -
- {(() => { - if (!mounted || !account || !chain) { - return ( - - ) - } - return ( -
+ {userSites.isSuccess ? ( + <> + - + +
- ) - })()} + + ) : ( + "" + )}
) - }} - + })()} +
) } + +function useCopyLabel(account: GeneralAccount | null) { + const [isShowCopied, setIsShowCopied] = useState(false) + + const copyLabel = useRefCallback(() => { + const value = + (account?.type === "email" ? account.email : account?.address) || "" + + navigator.clipboard.writeText(value) + setIsShowCopied(true) + setTimeout(() => setIsShowCopied(false), 1000) + }) + + return [ + isShowCopied ? "Copied!" : getAccountDisplayName(account), + copyLabel, + ] as const +} + +function getAccountDisplayName(account: GeneralAccount | null) { + const value = + (account?.type === "email" ? account.email : account?.address) || "" + + return value.slice(0, 5) + "..." + value.slice(-4) +} diff --git a/src/components/common/FollowingButton.tsx b/src/components/common/FollowingButton.tsx index 4eb02c04..662d197f 100644 --- a/src/components/common/FollowingButton.tsx +++ b/src/components/common/FollowingButton.tsx @@ -11,7 +11,7 @@ import { useUnsubscribeFromSite, useGetUserSites, } from "~/queries/site" -import { useConnectModal } from "@rainbow-me/rainbowkit" +import { useConnectModal } from "@crossbell/connect-kit" import clsx from "clsx" export const FollowingButton: React.FC<{ @@ -24,7 +24,7 @@ export const FollowingButton: React.FC<{ const { address } = useAccount() const subscribeToSite = useSubscribeToSite() const unsubscribeFromSite = useUnsubscribeFromSite() - const { openConnectModal } = useConnectModal() + const { show: openConnectModal } = useConnectModal() const [followProgress, setFollowProgress] = useState(false) const userSite = useGetUserSites(address) const router = useRouter() diff --git a/src/components/common/Reactions.tsx b/src/components/common/Reactions.tsx index 445cea28..78b33b00 100644 --- a/src/components/common/Reactions.tsx +++ b/src/components/common/Reactions.tsx @@ -10,7 +10,7 @@ import { } from "~/queries/page" import { useGetUserSites } from "~/queries/site" import { useAccount } from "wagmi" -import { useConnectModal } from "@rainbow-me/rainbowkit" +import { useConnectModal } from "@crossbell/connect-kit" import { useState, useEffect } from "react" import { Button } from "../ui/Button" import { useRouter } from "next/router" @@ -33,7 +33,7 @@ export const Reactions: React.FC<{ const mintPage = useMintPage() const { address } = useAccount() - const { openConnectModal } = useConnectModal() + const { show: openConnectModal } = useConnectModal() const [likeProgress, setLikeProgress] = useState(false) const [mintProgress, setMintProgress] = useState(false) const userSite = useGetUserSites(address) diff --git a/src/lib/wallet-config.ts b/src/lib/wallet-config.ts new file mode 100644 index 00000000..4f8c58d6 --- /dev/null +++ b/src/lib/wallet-config.ts @@ -0,0 +1,74 @@ +import { configureChains } from "wagmi" +import { jsonRpcProvider } from "wagmi/providers/jsonRpc" +import { MetaMaskConnector } from "wagmi/connectors/metaMask" +import { WalletConnectConnector } from "wagmi/connectors/walletConnect" +import { CoinbaseWalletConnector } from "wagmi/connectors/coinbaseWallet" +import { InjectedConnector } from "wagmi/connectors/injected" + +import { CSB_SCAN, IPFS_GATEWAY, APP_NAME } from "~/lib/env" + +export const { chains, provider } = configureChains( + [ + { + id: 3737, + name: "Crossbell", + network: "crossbell", + rpcUrls: { + default: "https://rpc.crossbell.io", + }, + iconUrl: `${IPFS_GATEWAY}QmS8zEetTb6pwdNpVjv5bz55BXiSMGP9BjTJmNcjcUT91t`, + nativeCurrency: { + decimals: 18, + name: "Crossbell Token", + symbol: "CSB", + }, + blockExplorers: { + default: { + name: "Crossbell Explorer", + url: CSB_SCAN, + }, + }, + testnet: false, + } as any, + ], + [jsonRpcProvider({ rpc: (chain) => ({ http: chain.rpcUrls.default }) })], + { + pollingInterval: 1000, + }, +) + +export const connectors = [ + new InjectedConnector({ + chains, + options: { + shimDisconnect: true, + name: (detectedName) => + `Injected (${ + typeof detectedName === "string" + ? detectedName + : detectedName.join(", ") + })`, + }, + }), + new MetaMaskConnector({ + chains, + options: { + shimDisconnect: true, + shimChainChangedDisconnect: false, + UNSTABLE_shimOnConnectSelectAccount: true, + }, + }), + new CoinbaseWalletConnector({ + chains, + options: { + appName: APP_NAME, + headlessMode: true, + }, + }), + new WalletConnectConnector({ + chains, + options: { + qrcode: false, + }, + }), +] diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 0d0b1535..384361f7 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,70 +1,24 @@ -import { Toaster } from "react-hot-toast" import "~/css/main.css" import "~/generated/uno.css" -import { configureChains, createClient, WagmiConfig } from "wagmi" -import { jsonRpcProvider } from "wagmi/providers/jsonRpc" + +import { Toaster } from "react-hot-toast" +import { createClient, WagmiConfig } from "wagmi" import { Hydrate, QueryClient } from "@tanstack/react-query" import { ReactQueryDevtools } from "@tanstack/react-query-devtools" import { PersistQueryClientProvider } from "@tanstack/react-query-persist-client" -import { createIDBPersister } from "~/lib/persister.client" import { - RainbowKitProvider, - connectorsForWallets, -} from "@rainbow-me/rainbowkit" -import { - injectedWallet, - metaMaskWallet, - coinbaseWallet, - walletConnectWallet, - braveWallet, -} from "@rainbow-me/rainbowkit/wallets" -import { APP_NAME, CSB_SCAN, IPFS_GATEWAY } from "~/lib/env" + ConnectKitProvider, + useAccountState, + useConnectModal, + useUpgradeAccountModal, +} from "@crossbell/connect-kit" +import { InitContractProvider } from "@crossbell/contract" +import { useRefCallback } from "@crossbell/util-hooks" import NextNProgress from "nextjs-progressbar" -import "@rainbow-me/rainbowkit/styles.css" - -const { chains, provider } = configureChains( - [ - { - id: 3737, - name: "Crossbell", - network: "crossbell", - rpcUrls: { - default: "https://rpc.crossbell.io", - }, - iconUrl: `${IPFS_GATEWAY}QmS8zEetTb6pwdNpVjv5bz55BXiSMGP9BjTJmNcjcUT91t`, - nativeCurrency: { - decimals: 18, - name: "Crossbell Token", - symbol: "CSB", - }, - blockExplorers: { - default: { - name: "Crossbell Explorer", - url: CSB_SCAN, - }, - }, - testnet: false, - } as any, - ], - [jsonRpcProvider({ rpc: (chain) => ({ http: chain.rpcUrls.default }) })], - { - pollingInterval: 1000, - }, -) - -const connectors = connectorsForWallets([ - { - groupName: "Recommended", - wallets: [ - metaMaskWallet({ chains }), - walletConnectWallet({ chains }), - braveWallet({ chains, shimDisconnect: true }), - coinbaseWallet({ appName: APP_NAME, chains }), - injectedWallet({ chains, shimDisconnect: true }), - ], - }, -]) +import { toGateway } from "~/lib/ipfs-parser" +import { connectors, provider } from "~/lib/wallet-config" +import { createIDBPersister } from "~/lib/persister.client" const wagmiClient = createClient({ autoConnect: true, @@ -96,24 +50,46 @@ try { function MyApp({ Component, pageProps }: any) { const getLayout = Component.getLayout ?? ((page: any) => page) + const connectModal = useConnectModal() + const upgradeAccountModal = useUpgradeAccountModal() + const [isEmailConnected, characterId] = useAccountState((s) => [ + !!s.email, + s.computed.account?.characterId, + ]) + const getCurrentCharacterId = useRefCallback(() => characterId ?? null) return ( - - - - - - {getLayout()} - - - - + + + { + console.log("openFaucetHintModel") + // FIXME: - openFaucetHintModel + }} + openMintNewCharacterModel={() => { + console.log("openMintNewCharacterModel") + // FIXME: - openMintNewCharacterModel + }} + openConnectModal={ + isEmailConnected ? upgradeAccountModal.show : connectModal.show + } + getCurrentCharacterId={getCurrentCharacterId} + > + + + + {getLayout()} + + + + + ) } diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 235419e8..2f4cfb61 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -9,7 +9,7 @@ import { LoveIcon } from "~/components/icons/LoveIcon" import { BlockchainIcon } from "~/components/icons/BlockchainIcon" import { LaughIcon } from "~/components/icons/LaughIcon" import { Button } from "~/components/ui/Button" -import { useConnectModal } from "@rainbow-me/rainbowkit" +import { useConnectModal } from "@crossbell/connect-kit" import { useRouter } from "next/router" import { GITHUB_LINK, APP_NAME, CSB_SCAN } from "~/lib/env" import { getSiteLink } from "~/lib/helpers" @@ -39,7 +39,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { export default function Home({ region }: { region: string | null }) { const [addressIn, setAddressIn] = useState("") const { address } = useAccount() - const { openConnectModal } = useConnectModal() + const { show: openConnectModal } = useConnectModal() const router = useRouter() const showcaseSites = useGetSites(showcase) diff --git a/src/queries/page.ts b/src/queries/page.ts index 0ecd0ef8..a9fcafa8 100644 --- a/src/queries/page.ts +++ b/src/queries/page.ts @@ -4,9 +4,10 @@ import { useQueryClient, useInfiniteQuery, } from "@tanstack/react-query" +import { useContract } from "@crossbell/contract" + import * as pageModel from "~/models/page.model" import { useUnidata } from "./unidata" -import { useContract } from "./crossbell" export const useGetPagesBySiteLite = ( input: Parameters[0], diff --git a/src/queries/site.ts b/src/queries/site.ts index 0991ec84..af411ab3 100644 --- a/src/queries/site.ts +++ b/src/queries/site.ts @@ -1,7 +1,8 @@ import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" +import { useContract } from "@crossbell/contract" + import * as siteModel from "~/models/site.model" import { useUnidata } from "./unidata" -import { useContract } from "./crossbell" export const useGetUserSites = (address?: string) => { const unidata = useUnidata()