From aa1e71add8c63a689ac1a59613776e8873014ab6 Mon Sep 17 00:00:00 2001 From: Dylan DesRosier Date: Mon, 12 Jun 2023 20:29:01 +0100 Subject: [PATCH 1/4] WalletConnect v2 --- package.json | 4 +- yarn.lock | 270 ++++++++++++++++++++++++++++++--------------------- 2 files changed, 161 insertions(+), 113 deletions(-) diff --git a/package.json b/package.json index ddbc7191..f7f9466f 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@pooltogether/v4-twab-delegator-js": "0.2.2", "@pooltogether/v4-utils-js": "0.1.5", "@pooltogether/wallet-connection": "1.0.3", - "@rainbow-me/rainbowkit": "^0.12.14", + "@rainbow-me/rainbowkit": "0.12.15-canary.3", "@reach/dialog": "^0.15.3", "@reach/menu-button": "^0.15.3", "@reach/tooltip": "^0.15.3", @@ -108,6 +108,6 @@ "react-tooltip": "^4.2.21", "tailwindcss": "^2.2.19", "typescript": "4", - "wagmi": "^0.12.13" + "wagmi": "0.12.16" } } diff --git a/yarn.lock b/yarn.lock index 532d8673..ed8854b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1943,7 +1943,7 @@ "@motionone/utils" "^10.15.1" tslib "^2.3.1" -"@motionone/dom@^10.15.3", "@motionone/dom@^10.15.5": +"@motionone/dom@^10.15.3": version "10.15.5" resolved "https://registry.yarnpkg.com/@motionone/dom/-/dom-10.15.5.tgz#4af18f8136d85c2fc997cac98121c969f6731802" integrity sha512-Xc5avlgyh3xukU9tydh9+8mB8+2zAq+WlLsC3eEIp7Ax7DnXgY7Bj/iv0a4X2R9z9ZFZiaXK3BO0xMYHKbAAdA== @@ -1955,6 +1955,18 @@ hey-listen "^1.0.8" tslib "^2.3.1" +"@motionone/dom@^10.16.2": + version "10.16.2" + resolved "https://registry.yarnpkg.com/@motionone/dom/-/dom-10.16.2.tgz#0c44df8ee3d1cfc50ee11d27050b27824355a61a" + integrity sha512-bnuHdNbge1FutZXv+k7xub9oPWcF0hsu8y1HTH/qg6av58YI0VufZ3ngfC7p2xhMJMnoh0LXFma2EGTgPeCkeg== + dependencies: + "@motionone/animation" "^10.15.1" + "@motionone/generators" "^10.15.1" + "@motionone/types" "^10.15.1" + "@motionone/utils" "^10.15.1" + hey-listen "^1.0.8" + tslib "^2.3.1" + "@motionone/easing@^10.15.1": version "10.15.1" resolved "https://registry.yarnpkg.com/@motionone/easing/-/easing-10.15.1.tgz#95cf3adaef34da6deebb83940d8143ede3deb693" @@ -1972,12 +1984,12 @@ "@motionone/utils" "^10.15.1" tslib "^2.3.1" -"@motionone/svelte@^10.15.5": - version "10.15.5" - resolved "https://registry.yarnpkg.com/@motionone/svelte/-/svelte-10.15.5.tgz#f36b40101ec1db122820598089f42e831f6cf5f5" - integrity sha512-Xyxtgp7BlVnSBwcoFmXGHUVnpNktzeXsEifu2NJJWc7VGuxutDsBZxNdz80qvpLIC5MeBa1wh7GGegZzTm1msg== +"@motionone/svelte@^10.16.2": + version "10.16.2" + resolved "https://registry.yarnpkg.com/@motionone/svelte/-/svelte-10.16.2.tgz#0b37c3b12927814d31d24941d1ca0ff49981b444" + integrity sha512-38xsroKrfK+aHYhuQlE6eFcGy0EwrB43Q7RGjF73j/kRUTcLNu/LAaKiLLsN5lyqVzCgTBVt4TMT/ShWbTbc5Q== dependencies: - "@motionone/dom" "^10.15.5" + "@motionone/dom" "^10.16.2" tslib "^2.3.1" "@motionone/types@^10.15.1": @@ -1994,12 +2006,12 @@ hey-listen "^1.0.8" tslib "^2.3.1" -"@motionone/vue@^10.15.5": - version "10.15.5" - resolved "https://registry.yarnpkg.com/@motionone/vue/-/vue-10.15.5.tgz#3101c62b2fce06b3f3072b9ff0f551213eb02476" - integrity sha512-cUENrLYAolUacHvCgU+8wF9OgSlVutfWbHMLERI/bElCJ+e2YVQvG/CpGhIM5fYOOJzuvg2T2wHmLLmvJoavEw== +"@motionone/vue@^10.16.2": + version "10.16.2" + resolved "https://registry.yarnpkg.com/@motionone/vue/-/vue-10.16.2.tgz#faf13afc27620a2df870c71c58a04ee8de8dea65" + integrity sha512-7/dEK/nWQXOkJ70bqb2KyNfSWbNvWqKKq1C8juj+0Mg/AorgD8O5wE3naddK0G+aXuNMqRuc4jlsYHHWHtIzVw== dependencies: - "@motionone/dom" "^10.15.5" + "@motionone/dom" "^10.16.2" tslib "^2.3.1" "@next/env@12.3.4": @@ -2595,10 +2607,10 @@ style-value-types "^3.1.7" tslib "^1.10.0" -"@rainbow-me/rainbowkit@^0.12.14": - version "0.12.14" - resolved "https://registry.yarnpkg.com/@rainbow-me/rainbowkit/-/rainbowkit-0.12.14.tgz#7fd737e480fde08749e9e0e0b25c5de92f879ead" - integrity sha512-G7/uYl6TrDS7eiQauc5GEWQ09wCV91hs7xZqj3Af1wsLmbnJM2paUEMs0NI4rbvw0yiMkfoNYMZ2Wfl7NQLKaA== +"@rainbow-me/rainbowkit@0.12.15-canary.3": + version "0.12.15-canary.3" + resolved "https://registry.yarnpkg.com/@rainbow-me/rainbowkit/-/rainbowkit-0.12.15-canary.3.tgz#856b281f5fed5ed34026fa1c26e71df29867e92e" + integrity sha512-atPVgPty+WwKzAufXnuh+7LqwdsuW+cv8LPfwQXPVPEHSlFqaXLy8LFwOWwh0KpKY3rl+cpVnTBUmDKoXiqSoQ== dependencies: "@vanilla-extract/css" "1.9.1" "@vanilla-extract/dynamic" "2.0.2" @@ -4010,40 +4022,41 @@ resolved "https://registry.yarnpkg.com/@wagmi/chains/-/chains-0.1.14.tgz#2740762f2719df2c69c63ab30b67fdf4bef70305" integrity sha512-hSzb6Ni/PejVzliKkc5T3ehzRJxr5k4fZMGYuouqwArWQ8z7R4jrIlm2j2nNOD7Epz6ZucdiVluU1YH0d/EEyw== -"@wagmi/connectors@0.3.19": - version "0.3.19" - resolved "https://registry.yarnpkg.com/@wagmi/connectors/-/connectors-0.3.19.tgz#b9e9a55f8c9824116cfcdfc95666136cf431cadc" - integrity sha512-1EnVdNjP5dAfWoW8dlUDZS+Lva8MYabWK+vwzSUBeSyJcAslXInoiHLb+cz9p8oAAqXspcPLRX3XPErYav23gA== +"@wagmi/connectors@0.3.21": + version "0.3.21" + resolved "https://registry.yarnpkg.com/@wagmi/connectors/-/connectors-0.3.21.tgz#0bec726c14217ad391f6e49af1203ccf0249786e" + integrity sha512-yXtczgBQzVhUeo6D2L9yu8HmWQv08v6Ji5Cb4ZNL1mM2VVnvXxv7l40fSschcTw6H5jBZytgeGgL/aTYhn3HYQ== dependencies: "@coinbase/wallet-sdk" "^3.6.6" "@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" "2.7.2" + "@walletconnect/ethereum-provider" "2.8.1" "@walletconnect/legacy-provider" "^2.0.0" - "@web3modal/standalone" "^2.3.7" + "@walletconnect/modal" "^2.4.6" abitype "^0.3.0" eventemitter3 "^4.0.7" -"@wagmi/core@0.10.11": - version "0.10.11" - resolved "https://registry.yarnpkg.com/@wagmi/core/-/core-0.10.11.tgz#cf4079b10e5efba113c09afc39c88dc2a947689c" - integrity sha512-WOmG2RG65U6i+p09/aFztFSLPCeC+CYnkPh+OXrxQ8Q3m829983sH7xUTRbFAl561lRevUHmB+XS/na+Oj2bYQ== +"@wagmi/core@0.10.14": + version "0.10.14" + resolved "https://registry.yarnpkg.com/@wagmi/core/-/core-0.10.14.tgz#5b07df06c5d5a29bcee76b1ad71695e88559955b" + integrity sha512-+iQj5YNdVQ/kLVpVMLmF71Y2vnW3ox4b4Na4S9fvQazGudhqfqfpQ+YPYmH6SIIuZ1VhRnBmjJIY88IZt/OkwA== dependencies: "@wagmi/chains" "0.2.22" - "@wagmi/connectors" "0.3.19" + "@wagmi/connectors" "0.3.21" abitype "^0.3.0" eventemitter3 "^4.0.7" zustand "^4.3.1" -"@walletconnect/core@2.7.2": - version "2.7.2" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.7.2.tgz#698eb6178eaa17c804ca0ad3176035188b9db86b" - integrity sha512-gInSwh3uLpTEkDGArfOFoOVgiXW+zkZJpGqfARVi5fhSxsnL1jYNpqO2k8KAXUPfB4MIzLyaGruiaywncLAczA== +"@walletconnect/core@2.8.1": + version "2.8.1" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.8.1.tgz#f74404af372a11e05c214cbc14b5af0e9c0cf916" + integrity sha512-mN9Zkdl/NeThntK8cydDoQOW6jUEpOeFgYR1RCKPLH51VQwlbdSgvvQIeanSQXEY4U7AM3x8cs1sxqMomIfRQg== dependencies: "@walletconnect/heartbeat" "1.2.1" - "@walletconnect/jsonrpc-provider" "^1.0.12" - "@walletconnect/jsonrpc-utils" "^1.0.7" + "@walletconnect/jsonrpc-provider" "1.0.13" + "@walletconnect/jsonrpc-types" "1.0.3" + "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/jsonrpc-ws-connection" "^1.0.11" "@walletconnect/keyvaluestorage" "^1.0.2" "@walletconnect/logger" "^2.0.1" @@ -4051,8 +4064,8 @@ "@walletconnect/relay-auth" "^1.0.4" "@walletconnect/safe-json" "^1.0.2" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.7.2" - "@walletconnect/utils" "2.7.2" + "@walletconnect/types" "2.8.1" + "@walletconnect/utils" "2.8.1" events "^3.3.0" lodash.isequal "4.5.0" uint8arrays "^3.1.0" @@ -4085,19 +4098,19 @@ dependencies: tslib "1.14.1" -"@walletconnect/ethereum-provider@2.7.2": - version "2.7.2" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.7.2.tgz#261c546883131e15faa4db6dc3ba020c6388d5af" - integrity sha512-bvmutLrKKLlQ1WxKCvvX5p5YVox1D1f3Enp6hzAiZf4taN+n/M5rmwfAcLgLhp4cTAUDhl3zgtZErzDyJnvGvQ== - dependencies: - "@walletconnect/jsonrpc-http-connection" "^1.0.4" - "@walletconnect/jsonrpc-provider" "^1.0.11" - "@walletconnect/jsonrpc-types" "^1.0.2" - "@walletconnect/jsonrpc-utils" "^1.0.7" - "@walletconnect/sign-client" "2.7.2" - "@walletconnect/types" "2.7.2" - "@walletconnect/universal-provider" "2.7.2" - "@walletconnect/utils" "2.7.2" +"@walletconnect/ethereum-provider@2.8.1": + version "2.8.1" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.8.1.tgz#1743072f42b5c940648b0303a382e8907a362a00" + integrity sha512-YlF8CCiFTSEZRyANIBsop/U+t+d1Z1/UXXoE9+iwjSGKJsaym6PgBLPb2d8XdmS/qR6Tcx7lVodTp4cVtezKnA== + dependencies: + "@walletconnect/jsonrpc-http-connection" "^1.0.7" + "@walletconnect/jsonrpc-provider" "^1.0.13" + "@walletconnect/jsonrpc-types" "^1.0.3" + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/sign-client" "2.8.1" + "@walletconnect/types" "2.8.1" + "@walletconnect/universal-provider" "2.8.1" + "@walletconnect/utils" "2.8.1" events "^3.3.0" "@walletconnect/events@^1.0.1": @@ -4127,7 +4140,26 @@ cross-fetch "^3.1.4" tslib "1.14.1" -"@walletconnect/jsonrpc-provider@^1.0.11", "@walletconnect/jsonrpc-provider@^1.0.12", "@walletconnect/jsonrpc-provider@^1.0.6": +"@walletconnect/jsonrpc-http-connection@^1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.7.tgz#a6973569b8854c22da707a759d241e4f5c2d5a98" + integrity sha512-qlfh8fCfu8LOM9JRR9KE0s0wxP6ZG9/Jom8M0qsoIQeKF3Ni0FyV4V1qy/cc7nfI46SLQLSl4tgWSfLiE1swyQ== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.6" + "@walletconnect/safe-json" "^1.0.1" + cross-fetch "^3.1.4" + tslib "1.14.1" + +"@walletconnect/jsonrpc-provider@1.0.13", "@walletconnect/jsonrpc-provider@^1.0.13": + version "1.0.13" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz#9a74da648d015e1fffc745f0c7d629457f53648b" + integrity sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/safe-json" "^1.0.2" + tslib "1.14.1" + +"@walletconnect/jsonrpc-provider@^1.0.6": version "1.0.12" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.12.tgz#965408d99fc889d49c194cd207804282805f45ed" integrity sha512-6uI2y5281gloZSzICOjk+CVC7CVu0MhtMt2Yzpj05lPb0pzm/bK2oZ2ibxwLerPrqpNt/5bIFVRmoOgPw1mHAQ== @@ -4136,6 +4168,14 @@ "@walletconnect/safe-json" "^1.0.2" tslib "1.14.1" +"@walletconnect/jsonrpc-types@1.0.3", "@walletconnect/jsonrpc-types@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz#65e3b77046f1a7fa8347ae02bc1b841abe6f290c" + integrity sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw== + dependencies: + keyvaluestorage-interface "^1.0.0" + tslib "1.14.1" + "@walletconnect/jsonrpc-types@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.2.tgz#b79519f679cd6a5fa4a1bea888f27c1916689a20" @@ -4144,6 +4184,15 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" +"@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz#82d0cc6a5d6ff0ecc277cb35f71402c91ad48d72" + integrity sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw== + dependencies: + "@walletconnect/environment" "^1.0.1" + "@walletconnect/jsonrpc-types" "^1.0.3" + tslib "1.14.1" + "@walletconnect/jsonrpc-utils@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.4.tgz#2009ba3907b02516f2caacd2fb871ff0d472b2cb" @@ -4249,6 +4298,14 @@ pino "7.11.0" tslib "1.14.1" +"@walletconnect/modal@^2.4.6": + version "2.4.7" + resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.4.7.tgz#fd84d6f1ac767865d63153e32150f790739a189a" + integrity sha512-kFpvDTT44CgNGcwQVC0jHrYed4xorghKX1DOGo8ZfBSJ5TJx3p6d6SzLxkH1cZupWbljWkYS6SqvZcUBs8vWpg== + dependencies: + "@web3modal/core" "2.4.7" + "@web3modal/ui" "2.4.7" + "@walletconnect/randombytes@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@walletconnect/randombytes/-/randombytes-1.0.3.tgz#e795e4918367fd1e6a2215e075e64ab93e23985b" @@ -4293,19 +4350,19 @@ dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.7.2": - version "2.7.2" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.7.2.tgz#8ece418fb4995a366c0d097dd04f29b95256ae52" - integrity sha512-JOYPmrgR4YG4M2comNcXaa8cLIws0ZJj/SCpF0XJzRZP2+OXWouK19UaI32ROQrcwNodBNeYFRfT5hSM5xjfKg== +"@walletconnect/sign-client@2.8.1": + version "2.8.1" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.8.1.tgz#8c6de724eff6a306c692dd66e66944089be5e30a" + integrity sha512-6DbpjP9BED2YZOZdpVgYo0HwPBV7k99imnsdMFrTn16EFAxhuYP0/qPwum9d072oNMGWJSA6d4rzc8FHNtHsCA== dependencies: - "@walletconnect/core" "2.7.2" + "@walletconnect/core" "2.8.1" "@walletconnect/events" "^1.0.1" "@walletconnect/heartbeat" "1.2.1" - "@walletconnect/jsonrpc-utils" "^1.0.7" + "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/logger" "^2.0.1" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.7.2" - "@walletconnect/utils" "2.7.2" + "@walletconnect/types" "2.8.1" + "@walletconnect/utils" "2.8.1" events "^3.3.0" "@walletconnect/time@^1.0.2": @@ -4315,49 +4372,48 @@ dependencies: tslib "1.14.1" -"@walletconnect/types@2.7.2": - version "2.7.2" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.7.2.tgz#508d1755110864dee294f955e09b7da3f8ee0064" - integrity sha512-1O2UefakZpT0ErRfEAXY7Ls3qdUrKDky/DsK088xR6klyfkQOx+aSVH0fJYLhmnqPTuvp3lrqNbsDc0s6/6nvg== +"@walletconnect/types@2.8.1": + version "2.8.1" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.8.1.tgz#640eb6ad23866886fbe09a9b29832bf3f8647a09" + integrity sha512-MLISp85b+27vVkm3Wkud+eYCwySXCdOrmn0yQCSN6DnRrrunrD05ksz4CXGP7h2oXUvvXPDt/6lXBf1B4AfqrA== dependencies: "@walletconnect/events" "^1.0.1" "@walletconnect/heartbeat" "1.2.1" - "@walletconnect/jsonrpc-types" "^1.0.2" + "@walletconnect/jsonrpc-types" "1.0.3" "@walletconnect/keyvaluestorage" "^1.0.2" "@walletconnect/logger" "^2.0.1" events "^3.3.0" -"@walletconnect/universal-provider@2.7.2": - version "2.7.2" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.7.2.tgz#c3ba1ddb9a9471c15dd49c0d62fec8c6ffc48cce" - integrity sha512-5glu7vCmq3SFUYgniICf7CUZMwrd6FNS/qnCjrnfgW8T55Opms9YkhRpWTJFHpBdNRWF7n6z/Kss2J8olKTxKw== +"@walletconnect/universal-provider@2.8.1": + version "2.8.1" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.8.1.tgz#3fc51c56d1c94a02eb952f9bf948293cc7aace7e" + integrity sha512-6shgE4PM/S+GEh9oTWMloHZlt2BLsCitRn9tBh2Vf+jZiGlug3WNm+tBc/Fo6ILyHuzeYPbkzCM67AxcutOHGQ== dependencies: - "@walletconnect/jsonrpc-http-connection" "^1.0.4" - "@walletconnect/jsonrpc-provider" "^1.0.11" + "@walletconnect/jsonrpc-http-connection" "^1.0.7" + "@walletconnect/jsonrpc-provider" "1.0.13" "@walletconnect/jsonrpc-types" "^1.0.2" "@walletconnect/jsonrpc-utils" "^1.0.7" "@walletconnect/logger" "^2.0.1" - "@walletconnect/sign-client" "2.7.2" - "@walletconnect/types" "2.7.2" - "@walletconnect/utils" "2.7.2" + "@walletconnect/sign-client" "2.8.1" + "@walletconnect/types" "2.8.1" + "@walletconnect/utils" "2.8.1" eip1193-provider "1.0.1" events "^3.3.0" -"@walletconnect/utils@2.7.2": - version "2.7.2" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.7.2.tgz#71f2b9941a0592e155db9c7898a2e6a99f4c9a8d" - integrity sha512-b2lU/JoWqwCOLMudPSRTt3pliBnv6qQHCBWiMBYi1vL14AW3usO5QmK1wF90AVwpdPJ7wFZ6MgHymeWWfhYnGQ== +"@walletconnect/utils@2.8.1": + version "2.8.1" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.8.1.tgz#1356f4bba7f8b6664fc5b61ce3497596c8d9d603" + integrity sha512-d6p9OX3v70m6ijp+j4qvqiQZQU1vbEHN48G8HqXasyro3Z+N8vtcB5/gV4pTYsbWgLSDtPHj49mzbWQ0LdIdTw== dependencies: "@stablelib/chacha20poly1305" "1.0.1" "@stablelib/hkdf" "1.0.1" "@stablelib/random" "^1.0.2" "@stablelib/sha256" "1.0.1" "@stablelib/x25519" "^1.0.3" - "@walletconnect/jsonrpc-utils" "^1.0.7" "@walletconnect/relay-api" "^1.0.9" "@walletconnect/safe-json" "^1.0.2" "@walletconnect/time" "^1.0.2" - "@walletconnect/types" "2.7.2" + "@walletconnect/types" "2.8.1" "@walletconnect/window-getters" "^1.0.1" "@walletconnect/window-metadata" "^1.0.1" detect-browser "5.3.0" @@ -4379,30 +4435,22 @@ "@walletconnect/window-getters" "^1.0.1" tslib "1.14.1" -"@web3modal/core@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@web3modal/core/-/core-2.4.1.tgz#9b0a60aa88ef8518de7a30bab1278b2c9f046012" - integrity sha512-v6Y/eQJSI2YfUTv8rGqjFabqdk3ZPjx6Fe7j5Q8fw0ZWF1YRGM3mySG457qtKQ7D7E1kNKA3BHbaOZ3pgQoG6A== +"@web3modal/core@2.4.7": + version "2.4.7" + resolved "https://registry.yarnpkg.com/@web3modal/core/-/core-2.4.7.tgz#e128be449bc5f6f23f6fb32f12021c096b5e7a07" + integrity sha512-FZMmI4JnEZovRDdN+PZBMe2ot8ly+UftVkZ6lmtfgiRZ2Gy3k/4IYE8/KwOSmN63Lf2Oj2077buLR17i0xoKZA== dependencies: buffer "6.0.3" valtio "1.10.5" -"@web3modal/standalone@^2.3.7": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@web3modal/standalone/-/standalone-2.4.1.tgz#e10330583ce7b550ba676e4c595ac8ea8715bcdb" - integrity sha512-ZrI5LwWeT9sd8A3FdIX/gBp3ZrzrX882Ln1vJN0LTCmeP2OUsYcW5bPxjv1PcJ1YUBY7Tg4aTgMUnAVTTuqb+w== +"@web3modal/ui@2.4.7": + version "2.4.7" + resolved "https://registry.yarnpkg.com/@web3modal/ui/-/ui-2.4.7.tgz#94d70e60386eb6fae422c56386019e761f80a50a" + integrity sha512-5tU9u5CVYueZ9y+1x1A1Q0bFUfk3gOIKy3MT6Vx+aI0RDxVu7OYQDw6wbNPlgz/wd9JPYXG6uSv8WTBpdyit8Q== dependencies: - "@web3modal/core" "2.4.1" - "@web3modal/ui" "2.4.1" - -"@web3modal/ui@2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@web3modal/ui/-/ui-2.4.1.tgz#c1c5a8bf4cd749febd15411ec710b22215e66e56" - integrity sha512-x1ceyd3mMJsIHs5UUTLvE+6qyCjhyjL6gB/wVmTDbwASHSQIVyshQJ+s7BwIEMP/pbAsYDg+/M8EiUuE+/E/kg== - dependencies: - "@web3modal/core" "2.4.1" - lit "2.7.4" - motion "10.15.5" + "@web3modal/core" "2.4.7" + lit "2.7.5" + motion "10.16.2" qrcode "1.5.3" "@xstate/react@^1.2.0": @@ -11497,10 +11545,10 @@ lit-html@^2.7.0: dependencies: "@types/trusted-types" "^2.0.2" -lit@2.7.4: - version "2.7.4" - resolved "https://registry.yarnpkg.com/lit/-/lit-2.7.4.tgz#ca63d27fda178dbffae0faf2c882b9910e40842c" - integrity sha512-cgD7xrZoYr21mbrkZIuIrj98YTMw/snJPg52deWVV4A8icLyNHI3bF70xsJeAgwTuiq5Kkd+ZR8gybSJDCPB7g== +lit@2.7.5: + version "2.7.5" + resolved "https://registry.yarnpkg.com/lit/-/lit-2.7.5.tgz#60bc82990cfad169d42cd786999356dcf79b035f" + integrity sha512-i/cH7Ye6nBDUASMnfwcictBnsTN91+aBjXoTHF2xARghXScKxpD4F4WYI+VLXg9lqbMinDfvoI7VnZXjyHgdfQ== dependencies: "@lit/reactive-element" "^1.6.0" lit-element "^3.3.0" @@ -12082,17 +12130,17 @@ modern-normalize@^1.1.0: resolved "https://registry.yarnpkg.com/modern-normalize/-/modern-normalize-1.1.0.tgz#da8e80140d9221426bd4f725c6e11283d34f90b7" integrity sha512-2lMlY1Yc1+CUy0gw4H95uNN7vjbpoED7NNRSBHE25nWfLBdmMzFCsPshlzbxHz+gYMcBEUN8V4pU16prcdPSgA== -motion@10.15.5: - version "10.15.5" - resolved "https://registry.yarnpkg.com/motion/-/motion-10.15.5.tgz#d336ddbdd37bc28bb99fbb243fe309df6c685ad6" - integrity sha512-ejP6KioN4pigTGxL93APzOnvtLklParL59UQB2T3HWXQBxFcIp5/7YXFmkgiA6pNKKzjvnLhnonRBN5iSFMnNw== +motion@10.16.2: + version "10.16.2" + resolved "https://registry.yarnpkg.com/motion/-/motion-10.16.2.tgz#7dc173c6ad62210a7e9916caeeaf22c51e598d21" + integrity sha512-p+PurYqfUdcJZvtnmAqu5fJgV2kR0uLFQuBKtLeFVTrYEVllI99tiOTSefVNYuip9ELTEkepIIDftNdze76NAQ== dependencies: "@motionone/animation" "^10.15.1" - "@motionone/dom" "^10.15.5" - "@motionone/svelte" "^10.15.5" + "@motionone/dom" "^10.16.2" + "@motionone/svelte" "^10.16.2" "@motionone/types" "^10.15.1" "@motionone/utils" "^10.15.1" - "@motionone/vue" "^10.15.5" + "@motionone/vue" "^10.16.2" ms@2.0.0: version "2.0.0" @@ -15916,15 +15964,15 @@ w3c-xmlserializer@^2.0.0: dependencies: xml-name-validator "^3.0.0" -wagmi@^0.12.13: - version "0.12.13" - resolved "https://registry.yarnpkg.com/wagmi/-/wagmi-0.12.13.tgz#995cd453fcfa6a6b3aa3a8bf30f6b52c3fbd7879" - integrity sha512-1J+F68MztodPUo2OIFImiC3OoZD4gdryxTidfwQz9LJawXdBNmAOFvq0LQClrrqgFk0Gd3EoLo/MKGiEn2RsMg== +wagmi@0.12.16: + version "0.12.16" + resolved "https://registry.yarnpkg.com/wagmi/-/wagmi-0.12.16.tgz#4e5e2a29fd9d646b5a06e0ff8838be4d3459ed03" + integrity sha512-ZnQYC7wkcxNrfIZ+8LIYIXaEmnih8n4aUBZ5J+YI6QwnAWfo80jI79Z5F0BBML6wG7PYP2iIzMbIlnDIfx67uQ== dependencies: "@tanstack/query-sync-storage-persister" "^4.27.1" "@tanstack/react-query" "^4.28.0" "@tanstack/react-query-persist-client" "^4.28.0" - "@wagmi/core" "0.10.11" + "@wagmi/core" "0.10.14" abitype "^0.3.0" use-sync-external-store "^1.2.0" From 69abbccac6f702cf60be2d124dbdb67b71715639 Mon Sep 17 00:00:00 2001 From: Dylan DesRosier Date: Thu, 22 Jun 2023 14:29:31 +0100 Subject: [PATCH 2/4] Fix prize amount post accuracy --- src/views/Account/Rewards/RewardsCard.tsx | 4 ++-- src/views/Prizes/MultiDrawsCard/PrizeClaimSheet.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/Account/Rewards/RewardsCard.tsx b/src/views/Account/Rewards/RewardsCard.tsx index 5296ab56..43acf282 100644 --- a/src/views/Account/Rewards/RewardsCard.tsx +++ b/src/views/Account/Rewards/RewardsCard.tsx @@ -709,14 +709,14 @@ const ClaimModalReceipt = (props: { diff --git a/src/views/Prizes/MultiDrawsCard/PrizeClaimSheet.tsx b/src/views/Prizes/MultiDrawsCard/PrizeClaimSheet.tsx index 167dc588..1ad530ef 100644 --- a/src/views/Prizes/MultiDrawsCard/PrizeClaimSheet.tsx +++ b/src/views/Prizes/MultiDrawsCard/PrizeClaimSheet.tsx @@ -190,14 +190,14 @@ export const PrizeClaimSheet = (props: PrizeClaimSheetProps) => { From 3d8e858d172b298d3a5a83accadcbbdfe377dd5e Mon Sep 17 00:00:00 2001 From: Dylan DesRosier Date: Thu, 22 Jun 2023 22:36:36 +0100 Subject: [PATCH 3/4] Bump wagmi --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f7f9466f..e4d1b021 100644 --- a/package.json +++ b/package.json @@ -108,6 +108,6 @@ "react-tooltip": "^4.2.21", "tailwindcss": "^2.2.19", "typescript": "4", - "wagmi": "0.12.16" + "wagmi": "0.12.17" } } From d7edd81b3ae21ea52310d902be895569e6e0d3e7 Mon Sep 17 00:00:00 2001 From: Dylan DesRosier Date: Tue, 27 Jun 2023 14:44:24 +0100 Subject: [PATCH 4/4] Bump rainbowkit --- package.json | 2 +- src/components/Input/TxButton.tsx | 8 +++--- src/components/Modal/DepositModal/index.tsx | 5 +++- src/constants/config.ts | 8 ++++-- .../V3DepositList/PrizePoolDepositView.tsx | 4 --- .../DepositTrigger/DepositModal/index.tsx | 5 +++- yarn.lock | 26 +++++++++---------- 7 files changed, 32 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index e4d1b021..e1bb636f 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@pooltogether/v4-twab-delegator-js": "0.2.2", "@pooltogether/v4-utils-js": "0.1.5", "@pooltogether/wallet-connection": "1.0.3", - "@rainbow-me/rainbowkit": "0.12.15-canary.3", + "@rainbow-me/rainbowkit": "0.12.15", "@reach/dialog": "^0.15.3", "@reach/menu-button": "^0.15.3", "@reach/tooltip": "^0.15.3", diff --git a/src/components/Input/TxButton.tsx b/src/components/Input/TxButton.tsx index 9f0b6583..40c0073c 100644 --- a/src/components/Input/TxButton.tsx +++ b/src/components/Input/TxButton.tsx @@ -3,10 +3,10 @@ import { getNetworkNiceNameByChainId } from '@pooltogether/utilities' import { TransactionState, TransactionStatus, - useConnectWallet, useIsWalletConnected, useIsWalletOnChainId } from '@pooltogether/wallet-connection' +import { useConnectModal } from '@rainbow-me/rainbowkit' import { useTranslation } from 'next-i18next' import React, { useMemo } from 'react' import { useSwitchNetwork } from 'wagmi' @@ -36,7 +36,7 @@ export const TxButton = (props: TxButtonProps) => { ...buttonProps } = props const isWalletConnected = useIsWalletConnected() - const connectWallet = useConnectWallet() + const { openConnectModal } = useConnectModal() const { switchNetwork } = useSwitchNetwork() const { t } = useTranslation() @@ -53,7 +53,7 @@ export const TxButton = (props: TxButtonProps) => { if (!!_connectWallet) { return [t('connectWallet'), _connectWallet, 'button'] } - return [t('connectWallet'), connectWallet, 'button'] + return [t('connectWallet'), openConnectModal, 'button'] } else if (status === TransactionStatus.pendingUserConfirmation) { return [t('confirmInWallet'), () => null, 'button'] } else if (status === TransactionStatus.pendingBlockchainConfirmation) { @@ -69,7 +69,7 @@ export const TxButton = (props: TxButtonProps) => { isWalletOnProperNetwork, _connectWallet, t, - connectWallet, + openConnectModal, networkName, switchNetwork, chainId, diff --git a/src/components/Modal/DepositModal/index.tsx b/src/components/Modal/DepositModal/index.tsx index 80f06878..abf5c3b4 100644 --- a/src/components/Modal/DepositModal/index.tsx +++ b/src/components/Modal/DepositModal/index.tsx @@ -15,6 +15,7 @@ import { PrizePool } from '@pooltogether/v4-client-js' import { useTransaction } from '@pooltogether/wallet-connection' +import { useConnectModal } from '@rainbow-me/rainbowkit' import { ApprovalType } from '@views/Deposit/DepositTrigger/DepositModal' import { RSV } from 'eth-permit/dist/rpc' import { useCallback, useEffect, useState } from 'react' @@ -99,6 +100,8 @@ export const DepositModal: React.FC<{ setSelectedViewId(ViewIds.deposit) } + const { openConnectModal } = useConnectModal() + return ( setDepositTransactionId('')} - connectWallet={() => setSelectedViewId(ViewIds.walletConnection)} + connectWallet={openConnectModal} approvalType={approvalType} setApprovalType={setApprovalType} eip2612DepositPermit={eip2612DepositPermit} diff --git a/src/constants/config.ts b/src/constants/config.ts index 64888cb0..16da121f 100644 --- a/src/constants/config.ts +++ b/src/constants/config.ts @@ -204,7 +204,8 @@ export const BRIDGE_URLS = Object.freeze({ { url: 'https://app.optimism.io/bridge', title: 'Optimism bridge' }, { url: 'https://wallet.polygon.technology/bridge', title: 'Polygon bridge' }, { url: 'https://bridge.avax.network/', title: 'Avalanche bridge' }, - { url: 'https://bridge.arbitrum.io/', title: 'Arbitrum bridge' } + { url: 'https://bridge.arbitrum.io/', title: 'Arbitrum bridge' }, + { url: 'https://across.to/bridge', title: 'Across bridge' } // { url: 'https://zapper.fi/bridge', title: 'Zapper' }, // { url: 'https://app.hop.exchange/send?token=USDC', title: 'Hop Protocol' } ], @@ -214,7 +215,10 @@ export const BRIDGE_URLS = Object.freeze({ // { url: 'https://app.hop.exchange/send?token=USDC', title: 'Hop Protocol' } ], [CHAIN_ID.avalanche]: [{ url: 'https://bridge.avax.network/', title: 'Avalanche bridge' }], - [CHAIN_ID.optimism]: [{ url: 'https://app.optimism.io/bridge', title: 'Optimism bridge' }], + [CHAIN_ID.optimism]: [ + { url: 'https://app.optimism.io/bridge', title: 'Optimism bridge' }, + { url: 'https://across.to/bridge', title: 'Across bridge' } + ], [CHAIN_ID.arbitrum]: [{ url: 'https://bridge.arbitrum.io/', title: 'Arbitrum bridge' }] }) diff --git a/src/views/Account/V3DepositList/PrizePoolDepositView.tsx b/src/views/Account/V3DepositList/PrizePoolDepositView.tsx index 86720120..6f90a3c8 100644 --- a/src/views/Account/V3DepositList/PrizePoolDepositView.tsx +++ b/src/views/Account/V3DepositList/PrizePoolDepositView.tsx @@ -16,8 +16,6 @@ import { Transaction, TransactionState, TransactionStatus, - useConnectWallet, - useIsWalletConnected, useTransaction, useUsersAddress } from '@pooltogether/wallet-connection' @@ -162,8 +160,6 @@ const DepositFormView = (props: DepositFormViewProps) => { const { chainId, ticket, token, amountToDeposit, form, depositTx, setReviewDepositView } = props const { t } = useTranslation() - const connectWallet = useConnectWallet() - const isWalletConnected = useIsWalletConnected() const { handleSubmit, diff --git a/src/views/Deposit/DepositTrigger/DepositModal/index.tsx b/src/views/Deposit/DepositTrigger/DepositModal/index.tsx index f21c61c3..9b8d4724 100644 --- a/src/views/Deposit/DepositTrigger/DepositModal/index.tsx +++ b/src/views/Deposit/DepositTrigger/DepositModal/index.tsx @@ -14,6 +14,7 @@ import { PrizePool } from '@pooltogether/v4-client-js' import { useTransaction } from '@pooltogether/wallet-connection' +import { useConnectModal } from '@rainbow-me/rainbowkit' import { RSV } from 'eth-permit/dist/rpc' import { useRouter } from 'next/router' import { useTranslation } from 'next-i18next' @@ -83,6 +84,8 @@ export const DepositModal: React.FC<{ const { t } = useTranslation() + const { openConnectModal } = useConnectModal() + const views: ModalWithViewStateView[] = [ { id: ViewIds.explore, @@ -156,7 +159,7 @@ export const DepositModal: React.FC<{ // reviewView sendDepositTransaction={sendDepositTransaction} clearDepositTransaction={() => setDepositTransactionId('')} - connectWallet={() => setSelectedViewId(ViewIds.walletConnection)} + connectWallet={openConnectModal} approvalType={approvalType} setApprovalType={setApprovalType} eip2612DepositPermit={eip2612DepositPermit} diff --git a/yarn.lock b/yarn.lock index ed8854b2..6b9ce3d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2607,10 +2607,10 @@ style-value-types "^3.1.7" tslib "^1.10.0" -"@rainbow-me/rainbowkit@0.12.15-canary.3": - version "0.12.15-canary.3" - resolved "https://registry.yarnpkg.com/@rainbow-me/rainbowkit/-/rainbowkit-0.12.15-canary.3.tgz#856b281f5fed5ed34026fa1c26e71df29867e92e" - integrity sha512-atPVgPty+WwKzAufXnuh+7LqwdsuW+cv8LPfwQXPVPEHSlFqaXLy8LFwOWwh0KpKY3rl+cpVnTBUmDKoXiqSoQ== +"@rainbow-me/rainbowkit@0.12.15": + version "0.12.15" + resolved "https://registry.yarnpkg.com/@rainbow-me/rainbowkit/-/rainbowkit-0.12.15.tgz#b5c785ac1759a12fd3bdf58a94810c51e5cfeb5c" + integrity sha512-FL2EiH3Cr1Pjoda21cGexvcxzUGUB0eNojMeRpM5xu9tLVVGMwsaLLrmVztFRi77zcxTFzP5whbjo0LJb3r2bQ== dependencies: "@vanilla-extract/css" "1.9.1" "@vanilla-extract/dynamic" "2.0.2" @@ -4037,10 +4037,10 @@ abitype "^0.3.0" eventemitter3 "^4.0.7" -"@wagmi/core@0.10.14": - version "0.10.14" - resolved "https://registry.yarnpkg.com/@wagmi/core/-/core-0.10.14.tgz#5b07df06c5d5a29bcee76b1ad71695e88559955b" - integrity sha512-+iQj5YNdVQ/kLVpVMLmF71Y2vnW3ox4b4Na4S9fvQazGudhqfqfpQ+YPYmH6SIIuZ1VhRnBmjJIY88IZt/OkwA== +"@wagmi/core@0.10.15": + version "0.10.15" + resolved "https://registry.yarnpkg.com/@wagmi/core/-/core-0.10.15.tgz#b9304bc0df07ebdddf6a9c26eef49825d4065964" + integrity sha512-rCrCVk28BxO8smLtBBnCZkvWFU1jI61x6DUidXAMagQ5yZdiDTr/YZpJzOkiR09fQCKq62INyRkJlRsk43SEoQ== dependencies: "@wagmi/chains" "0.2.22" "@wagmi/connectors" "0.3.21" @@ -15964,15 +15964,15 @@ w3c-xmlserializer@^2.0.0: dependencies: xml-name-validator "^3.0.0" -wagmi@0.12.16: - version "0.12.16" - resolved "https://registry.yarnpkg.com/wagmi/-/wagmi-0.12.16.tgz#4e5e2a29fd9d646b5a06e0ff8838be4d3459ed03" - integrity sha512-ZnQYC7wkcxNrfIZ+8LIYIXaEmnih8n4aUBZ5J+YI6QwnAWfo80jI79Z5F0BBML6wG7PYP2iIzMbIlnDIfx67uQ== +wagmi@0.12.17: + version "0.12.17" + resolved "https://registry.yarnpkg.com/wagmi/-/wagmi-0.12.17.tgz#ae6787acb747ddfc6d9da3335cec559c8051731e" + integrity sha512-0HArKpVI0nlek135d8LfrIQv38pzCSOZVVUOHGdPS8Mweypeb3niCAHbIjr5ERXhLsoZO8jf9eSUML6ErdXxog== dependencies: "@tanstack/query-sync-storage-persister" "^4.27.1" "@tanstack/react-query" "^4.28.0" "@tanstack/react-query-persist-client" "^4.28.0" - "@wagmi/core" "0.10.14" + "@wagmi/core" "0.10.15" abitype "^0.3.0" use-sync-external-store "^1.2.0"