From ee33a410b952f00b9828e269289cf8ccf5dd594b Mon Sep 17 00:00:00 2001 From: Gancho Radkov Date: Tue, 24 Jun 2025 14:47:26 +0300 Subject: [PATCH 1/5] wip: non evm 1ca --- advanced/dapps/react-dapp-v2/package.json | 25 ++-- advanced/dapps/react-dapp-v2/pnpm-lock.yaml | 130 ++++++++---------- .../react-dapp-v2/src/constants/default.ts | 28 ++-- .../src/contexts/ClientContext.tsx | 32 ++++- .../src/contexts/JsonRpcContext.tsx | 4 +- advanced/wallets/react-wallet-v2/package.json | 12 +- .../src/views/SessionSignSolanaModal.tsx | 23 +++- .../SessionSignSuiPersonalMessageModal.tsx | 7 +- advanced/wallets/react-wallet-v2/yarn.lock | 74 +++++----- 9 files changed, 181 insertions(+), 154 deletions(-) diff --git a/advanced/dapps/react-dapp-v2/package.json b/advanced/dapps/react-dapp-v2/package.json index 1e94aacb2..c2b14c938 100644 --- a/advanced/dapps/react-dapp-v2/package.json +++ b/advanced/dapps/react-dapp-v2/package.json @@ -26,12 +26,13 @@ "@solana/web3.js": "^1.36.0", "@stacks/network": "^7.0.2", "@stacks/transactions": "^7.0.6", - "@walletconnect/core": "2.21.3", + "@walletconnect/core": "2.20.3-canary-1ca-1", "@walletconnect/encoding": "^1.0.1", "@walletconnect/jsonrpc-utils": "^1.0.8", - "@walletconnect/types": "2.21.3", - "@walletconnect/universal-provider": "2.21.3", - "@walletconnect/utils": "2.21.3", + "@walletconnect/types": "2.20.3-canary-1ca-1", + "@walletconnect/universal-provider": "2.20.3-canary-1ca-1", + "@walletconnect/sign-client": "2.20.3-canary-1ca-1", + "@walletconnect/utils": "2.20.3-canary-1ca-1", "@reown/appkit": "1.7.5", "axios": "^1.0.0", "@mysten/sui": "^1.29.1", @@ -111,14 +112,14 @@ "next@>=9.5.5 <14.2.15": ">=14.2.15", "ansi-html@<0.0.8": ">=0.0.8", "axios@<1.8.2": ">=1.8.2", - "@walletconnect/core@": ">=2.21.3", - "@walletconnect/encoding@": ">=1.0.1", - "@walletconnect/jsonrpc-utils@": ">=1.0.8", - "@walletconnect/types@": ">=2.21.3", - "@walletconnect/universal-provider@": ">=2.21.3", - "@walletconnect/sign-client@": ">=2.21.3", - "@walletconnect/utils@": ">=2.21.3", - "@walletconnect/ethereum-provider@": ">=2.21.3" + "@walletconnect/core@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-1", + "@walletconnect/encoding": ">=1.0.1", + "@walletconnect/jsonrpc-utils": ">=1.0.8", + "@walletconnect/types@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-1", + "@walletconnect/universal-provider@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-1", + "@walletconnect/sign-client@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-1", + "@walletconnect/utils@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-1", + "@walletconnect/ethereum-provider@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-1" } } } diff --git a/advanced/dapps/react-dapp-v2/pnpm-lock.yaml b/advanced/dapps/react-dapp-v2/pnpm-lock.yaml index a42474793..51c25e146 100644 --- a/advanced/dapps/react-dapp-v2/pnpm-lock.yaml +++ b/advanced/dapps/react-dapp-v2/pnpm-lock.yaml @@ -38,14 +38,14 @@ overrides: next@>=9.5.5 <14.2.15: '>=14.2.15' ansi-html@<0.0.8: '>=0.0.8' axios@<1.8.2: '>=1.8.2' - '@walletconnect/core@': '>=2.21.3' - '@walletconnect/encoding@': '>=1.0.1' - '@walletconnect/jsonrpc-utils@': '>=1.0.8' - '@walletconnect/types@': '>=2.21.3' - '@walletconnect/universal-provider@': '>=2.21.3' - '@walletconnect/sign-client@': '>=2.21.3' - '@walletconnect/utils@': '>=2.21.3' - '@walletconnect/ethereum-provider@': '>=2.21.3' + '@walletconnect/core@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-1' + '@walletconnect/encoding': '>=1.0.1' + '@walletconnect/jsonrpc-utils': '>=1.0.8' + '@walletconnect/types@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-1' + '@walletconnect/universal-provider@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-1' + '@walletconnect/sign-client@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-1' + '@walletconnect/utils@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-1' + '@walletconnect/ethereum-provider@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-1' importers: @@ -103,23 +103,26 @@ importers: specifier: ^7.0.6 version: 7.0.6(encoding@0.1.13) '@walletconnect/core': - specifier: '>=2.21.3' - version: 2.21.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + specifier: 2.20.3-canary-1ca-1 + version: 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/encoding': specifier: '>=1.0.1' version: 1.0.2 '@walletconnect/jsonrpc-utils': specifier: '>=1.0.8' version: 1.0.8 + '@walletconnect/sign-client': + specifier: 2.20.3-canary-1ca-1 + version: 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/types': - specifier: '>=2.21.3' - version: 2.21.3 + specifier: 2.20.3-canary-1ca-1 + version: 2.20.3-canary-1ca-1 '@walletconnect/universal-provider': - specifier: '>=2.21.3' - version: 2.21.3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + specifier: 2.20.3-canary-1ca-1 + version: 2.20.3-canary-1ca-1(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/utils': - specifier: '>=2.21.3' - version: 2.21.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + specifier: 2.20.3-canary-1ca-1 + version: 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) axios: specifier: '>=1.8.2' version: 1.8.3 @@ -2443,8 +2446,8 @@ packages: cpu: [x64] os: [win32] - '@walletconnect/core@2.21.3': - resolution: {integrity: sha512-kMjo5bI6VOsFe/DmxgeTMxCdAIfSzUzG8kCDrpxUXrTnMgaU4H2JBW+tGn7KP/YY1x49+lErZsN5JiQsE5n6Rw==} + '@walletconnect/core@2.20.3-canary-1ca-1': + resolution: {integrity: sha512-IHzl0WqqyPFwoyn40Zh24dToFfdh1tZpIwRGUPmyQN3i6A+PpAcOv6Qke2n3WiXpJPqrIAIoiWS4H5cRhSY8Hw==} engines: {node: '>=18'} '@walletconnect/encoding@1.0.2': @@ -2494,20 +2497,20 @@ packages: '@walletconnect/safe-json@1.0.2': resolution: {integrity: sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==} - '@walletconnect/sign-client@2.21.3': - resolution: {integrity: sha512-Z6sTCBrset7u5CNjPWlqQuWxmLL2WlGLZYKoB7g/Nvg8wLWo0VaaNeTtNsuopLfJeqdV9/4nV/qHE4xXs2nMIQ==} + '@walletconnect/sign-client@2.20.3-canary-1ca-1': + resolution: {integrity: sha512-mDf1qA6VdpNIaAXy3qj9ciqZEIu/roScTmzhcu/SBLrG9VPfWEK9nV+H9XavrL+X/PLlgfmeN2ywRek9yzEVNQ==} '@walletconnect/time@1.0.2': resolution: {integrity: sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g==} - '@walletconnect/types@2.21.3': - resolution: {integrity: sha512-4fDchSb6q/YIuUokaIvp+/tpWtmiL+dOWuKUCq0+w81R0unsQzn4Zc57Xh+TkNAlBGSJmZ44ZQPevN4vaTnjwg==} + '@walletconnect/types@2.20.3-canary-1ca-1': + resolution: {integrity: sha512-OWqJsQ7nUcAVKF58MjNp6+lOL0kpFR/qCWGp/YS61fBt8Ao8v0LplV1uWhFpH+qCgmt2xJoKh7Jq8z1xmkMSug==} - '@walletconnect/universal-provider@2.21.3': - resolution: {integrity: sha512-Tlkfbtp5oNvSb9yEUl3Fxs0A1y8kLbGJOq7F3zyjVu2EvG96cMqqmlYlPRsi55VDn3scmw8zr2zN+BMsMAuDPw==} + '@walletconnect/universal-provider@2.20.3-canary-1ca-1': + resolution: {integrity: sha512-kWJhRsr5fE4SSDx7QlGq6mYCNWT1teCmErKPUMjJizEDrC/+Xm2j57Us9+4l7LIbjSUhT2uN6A6F4CwbMUfyTw==} - '@walletconnect/utils@2.21.3': - resolution: {integrity: sha512-LHxYX69vG7aPCQB9YT1F8ibwAfRNYwqCEBMplrmquAX+l4lMHTpXvsFF/a5NWFT23DKzbWZ4VTfQTDZ//XJKpg==} + '@walletconnect/utils@2.20.3-canary-1ca-1': + resolution: {integrity: sha512-EXDaiuIUxUvc0AIF3dh3hR9m9ophnM5Lh16mvGSxqXi0Qpk/9tQTDqFoPbsxs3RpPks6EQNZomFMbafIGuLJ8g==} '@walletconnect/window-getters@1.0.1': resolution: {integrity: sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q==} @@ -8593,14 +8596,6 @@ packages: typescript: optional: true - viem@2.30.6: - resolution: {integrity: sha512-N3vGy3pZ+EVgQRuWqQhZPFXxQE8qMRrBd3uM+KLc1Ub2w6+vkyr7umeWQCM4c+wlsCdByUgh2630MDMLquMtpg==} - peerDependencies: - typescript: '>=5.0.4' - peerDependenciesMeta: - typescript: - optional: true - viem@2.31.0: resolution: {integrity: sha512-U7OMQ6yqK+bRbEIarf2vqxL7unSEQvNxvML/1zG7suAmKuJmipqdVTVJGKBCJiYsm/EremyO2FS4dHIPpGv+eA==} peerDependencies: @@ -11291,8 +11286,8 @@ snapshots: '@kadena/cryptography-utils': 0.3.3 '@kadena/pactjs': 0.2.9 '@kadena/types': 0.3.3 - '@walletconnect/sign-client': 2.21.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) - '@walletconnect/types': 2.21.3 + '@walletconnect/sign-client': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-1 cross-fetch: 3.1.8(encoding@0.1.13) debug: 4.3.7 encoding: 0.1.13 @@ -11767,7 +11762,7 @@ snapshots: dependencies: big.js: 6.2.2 dayjs: 1.11.13 - viem: 2.30.6(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.22.4) + viem: 2.31.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.22.4) transitivePeerDependencies: - bufferutil - typescript @@ -11778,7 +11773,7 @@ snapshots: dependencies: big.js: 6.2.2 dayjs: 1.11.13 - viem: 2.30.6(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + viem: 2.31.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) transitivePeerDependencies: - bufferutil - typescript @@ -11789,9 +11784,9 @@ snapshots: dependencies: '@reown/appkit-common': 1.7.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@reown/appkit-wallet': 1.7.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) - '@walletconnect/universal-provider': 2.21.3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/universal-provider': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) valtio: 1.13.2(@types/react@18.0.15)(react@18.3.1) - viem: 2.30.6(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + viem: 2.31.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -11935,9 +11930,9 @@ snapshots: '@reown/appkit-polyfills': 1.7.5 '@reown/appkit-wallet': 1.7.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) '@walletconnect/logger': 2.1.2 - '@walletconnect/universal-provider': 2.21.3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/universal-provider': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) valtio: 1.13.2(@types/react@18.0.15)(react@18.3.1) - viem: 2.30.6(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + viem: 2.31.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -11986,8 +11981,8 @@ snapshots: '@reown/appkit-ui': 1.7.5(@types/react@18.0.15)(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@reown/appkit-utils': 1.7.5(@types/react@18.0.15)(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.3)(utf-8-validate@5.0.10)(valtio@1.13.2(@types/react@18.0.15)(react@18.3.1))(zod@3.24.4) '@reown/appkit-wallet': 1.7.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) - '@walletconnect/types': 2.21.3 - '@walletconnect/universal-provider': 2.21.3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-1 + '@walletconnect/universal-provider': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) bs58: 6.0.0 valtio: 1.13.2(@types/react@18.0.15)(react@18.3.1) viem: 2.29.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) @@ -12767,7 +12762,7 @@ snapshots: '@unrs/rspack-resolver-binding-win32-x64-msvc@1.2.2': optional: true - '@walletconnect/core@2.21.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@walletconnect/core@2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-provider': 1.0.14 @@ -12780,8 +12775,8 @@ snapshots: '@walletconnect/relay-auth': 1.1.0 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.21.3 - '@walletconnect/utils': 2.21.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-1 + '@walletconnect/utils': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/window-getters': 1.0.1 es-toolkit: 1.39.3 events: 3.3.0 @@ -12912,16 +12907,16 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/sign-client@2.21.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@walletconnect/sign-client@2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: - '@walletconnect/core': 2.21.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/core': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.1.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.21.3 - '@walletconnect/utils': 2.21.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-1 + '@walletconnect/utils': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -12951,7 +12946,7 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/types@2.21.3': + '@walletconnect/types@2.20.3-canary-1ca-1': dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 @@ -12979,7 +12974,7 @@ snapshots: - ioredis - uploadthing - '@walletconnect/universal-provider@2.21.3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@walletconnect/universal-provider@2.20.3-canary-1ca-1(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/jsonrpc-http-connection': 1.0.8(encoding@0.1.13) @@ -12988,9 +12983,9 @@ snapshots: '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/keyvaluestorage': 1.1.1 '@walletconnect/logger': 2.1.2 - '@walletconnect/sign-client': 2.21.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) - '@walletconnect/types': 2.21.3 - '@walletconnect/utils': 2.21.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/sign-client': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-1 + '@walletconnect/utils': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) es-toolkit: 1.39.3 events: 3.3.0 transitivePeerDependencies: @@ -13018,7 +13013,7 @@ snapshots: - utf-8-validate - zod - '@walletconnect/utils@2.21.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@walletconnect/utils@2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: '@msgpack/msgpack': 3.1.2 '@noble/ciphers': 1.3.0 @@ -13031,7 +13026,7 @@ snapshots: '@walletconnect/relay-auth': 1.1.0 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.21.3 + '@walletconnect/types': 2.20.3-canary-1ca-1 '@walletconnect/window-getters': 1.0.1 '@walletconnect/window-metadata': 1.0.1 blakejs: 1.2.1 @@ -20693,7 +20688,7 @@ snapshots: - utf-8-validate - zod - viem@2.30.6(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.22.4): + viem@2.31.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.22.4): dependencies: '@noble/curves': 1.9.1 '@noble/hashes': 1.8.0 @@ -20710,23 +20705,6 @@ snapshots: - utf-8-validate - zod - viem@2.30.6(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4): - dependencies: - '@noble/curves': 1.9.1 - '@noble/hashes': 1.8.0 - '@scure/bip32': 1.7.0 - '@scure/bip39': 1.6.0 - abitype: 1.0.8(typescript@5.8.3)(zod@3.24.4) - isows: 1.0.7(ws@8.18.2(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - ox: 0.7.1(typescript@5.8.3)(zod@3.24.4) - ws: 8.18.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - zod - viem@2.31.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4): dependencies: '@noble/curves': 1.9.1 diff --git a/advanced/dapps/react-dapp-v2/src/constants/default.ts b/advanced/dapps/react-dapp-v2/src/constants/default.ts index 9ff472ec1..aa9f8bd47 100644 --- a/advanced/dapps/react-dapp-v2/src/constants/default.ts +++ b/advanced/dapps/react-dapp-v2/src/constants/default.ts @@ -12,16 +12,16 @@ export const DEFAULT_MAIN_CHAINS = [ "eip155:324", "eip155:42161", "eip155:42220", - "cosmos:cosmoshub-4", + // "cosmos:cosmoshub-4", "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", - "polkadot:91b171bb158e2d3848fa23a9f1c25182", - "mvx:1", - "tron:0x2b6653dc", - "tezos:mainnet", - "kadena:mainnet01", + // "polkadot:91b171bb158e2d3848fa23a9f1c25182", + // "mvx:1", + // "tron:0x2b6653dc", + // "tezos:mainnet", + // "kadena:mainnet01", "bip122:000000000019d6689c085ae165831e93", "sui:mainnet", - "stacks:1", + // "stacks:1", ]; export const DEFAULT_TEST_CHAINS = [ @@ -35,16 +35,16 @@ export const DEFAULT_TEST_CHAINS = [ "eip155:44787", "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z", - "polkadot:e143f23803ac50e8f6f8e62695d1ce9e", - "near:testnet", - "mvx:D", - "tron:0xcd8690dc", - "tezos:testnet", - "kadena:testnet04", + // "polkadot:e143f23803ac50e8f6f8e62695d1ce9e", + // "near:testnet", + // "mvx:D", + // "tron:0xcd8690dc", + // "tezos:testnet", + // "kadena:testnet04", "bip122:000000000933ea01ad0ee984209779ba", "sui:testnet", "sui:devnet", - "stacks:2147483648", + // "stacks:2147483648", ]; export const DEFAULT_CHAINS = [...DEFAULT_MAIN_CHAINS, ...DEFAULT_TEST_CHAINS]; diff --git a/advanced/dapps/react-dapp-v2/src/contexts/ClientContext.tsx b/advanced/dapps/react-dapp-v2/src/contexts/ClientContext.tsx index 02fd1c269..3a8681aba 100644 --- a/advanced/dapps/react-dapp-v2/src/contexts/ClientContext.tsx +++ b/advanced/dapps/react-dapp-v2/src/contexts/ClientContext.tsx @@ -183,10 +183,36 @@ export function ClientContextProvider({ }); provider.namespaces = undefined; - const session = await provider.connect({ - pairingTopic: pairing?.topic, - optionalNamespaces: namespacesToRequest as NamespaceConfig, + + // const client = await SignClient.init({ + // projectId: DEFAULT_PROJECT_ID, + // relayUrl: relayerRegion, + // metadata: { + // name: "React App", + // description: "App to test WalletConnect network", + // url: location.origin, + // icons: [], + // }, + // }); + console.log("chains", chains); + const { uri, response } = await client.authenticate({ + chains: chains, + methods: Object.values(namespacesToRequest) + .map((namespace) => namespace.methods) + .flat(), + uri: location.origin, + domain: location.origin, + nonce: "1234567890", }); + provider.events.emit("display_uri", uri); + console.log("uri", uri); + const { session, auths } = await response(); + console.log("session", session); + console.log("auths", auths); + // const session = await provider.connect({ + // pairingTopic: pairing?.topic, + // optionalNamespaces: namespacesToRequest as NamespaceConfig, + // }); if (!session) { throw new Error("Session is not connected"); diff --git a/advanced/dapps/react-dapp-v2/src/contexts/JsonRpcContext.tsx b/advanced/dapps/react-dapp-v2/src/contexts/JsonRpcContext.tsx index e684c9fb2..d1be57c33 100644 --- a/advanced/dapps/react-dapp-v2/src/contexts/JsonRpcContext.tsx +++ b/advanced/dapps/react-dapp-v2/src/contexts/JsonRpcContext.tsx @@ -572,7 +572,7 @@ export function JsonRpcContextProvider({ // check the session.sessionProperties first for capabilities const capabilitiesJson = session?.sessionProperties?.["capabilities"]; const walletCapabilities = - capabilitiesJson && JSON.parse(capabilitiesJson); + capabilitiesJson && JSON.parse(capabilitiesJson as string); let capabilities = walletCapabilities[address] as | GetCapabilitiesResult | undefined; @@ -2142,7 +2142,7 @@ export function JsonRpcContextProvider({ let result; if (addresses) { console.log("cached addresses", addresses); - const parsed = JSON.parse(addresses); + const parsed = JSON.parse(addresses as string); result = isOrdinal ? parsed.ordinal : parsed.payment; console.log("parsed", result); } else { diff --git a/advanced/wallets/react-wallet-v2/package.json b/advanced/wallets/react-wallet-v2/package.json index 709376d10..20692cbff 100644 --- a/advanced/wallets/react-wallet-v2/package.json +++ b/advanced/wallets/react-wallet-v2/package.json @@ -83,11 +83,11 @@ "typescript": "5.2.2" }, "resolutions": { - "@walletconnect/core": "2.21.3", - "@walletconnect/utils": "2.21.3", - "@walletconnect/types": "2.21.3", - "@walletconnect/sign-client": "2.21.3", - "@walletconnect/ethereum-provider": "2.21.3", - "@walletconnect/universal-provider": "2.21.3" + "@walletconnect/core": "2.20.3-canary-1ca-1", + "@walletconnect/utils": "2.20.3-canary-1ca-1", + "@walletconnect/types": "2.20.3-canary-1ca-1", + "@walletconnect/sign-client": "2.20.3-canary-1ca-1", + "@walletconnect/ethereum-provider": "2.20.3-canary-1ca-1", + "@walletconnect/universal-provider": "2.20.3-canary-1ca-1" } } diff --git a/advanced/wallets/react-wallet-v2/src/views/SessionSignSolanaModal.tsx b/advanced/wallets/react-wallet-v2/src/views/SessionSignSolanaModal.tsx index ee4cc75b8..74f6efc26 100644 --- a/advanced/wallets/react-wallet-v2/src/views/SessionSignSolanaModal.tsx +++ b/advanced/wallets/react-wallet-v2/src/views/SessionSignSolanaModal.tsx @@ -9,7 +9,9 @@ import { styledToast } from '@/utils/HelperUtil' import { approveSolanaRequest, rejectSolanaRequest } from '@/utils/SolanaRequestHandlerUtil' import { walletkit } from '@/utils/WalletConnectUtil' import RequestModal from '../components/RequestModal' -import { useCallback, useState } from 'react' +import { useCallback, useMemo, useState } from 'react' +import { SOLANA_SIGNING_METHODS } from '@/data/SolanaData' +import { base58 } from 'ethers/lib/utils' export default function SessionSignSolanaModal() { // Get request and wallet data from store @@ -27,6 +29,17 @@ export default function SessionSignSolanaModal() { const { topic, params } = requestEvent const { request, chainId } = params + const messageToSign = useMemo(() => { + try { + if (request.method === SOLANA_SIGNING_METHODS.SOLANA_SIGN_MESSAGE) { + return Buffer.from(base58.decode(request.params.message)).toString('utf-8') + } + } catch (e) { + return undefined + } + return undefined + }, [request, params]) + // Handle approve action (logic varies based on request method) const onApprove = useCallback(async () => { try { @@ -77,7 +90,13 @@ export default function SessionSignSolanaModal() { > - + {messageToSign ? ( + + {messageToSign} + + ) : ( + + )} diff --git a/advanced/wallets/react-wallet-v2/src/views/SessionSignSuiPersonalMessageModal.tsx b/advanced/wallets/react-wallet-v2/src/views/SessionSignSuiPersonalMessageModal.tsx index 6a0456c1c..55539be32 100644 --- a/advanced/wallets/react-wallet-v2/src/views/SessionSignSuiPersonalMessageModal.tsx +++ b/advanced/wallets/react-wallet-v2/src/views/SessionSignSuiPersonalMessageModal.tsx @@ -99,9 +99,12 @@ export default function SessionSignSuiPersonalMessageModal() { Message - + {/* {message} - + */} + + {message} + diff --git a/advanced/wallets/react-wallet-v2/yarn.lock b/advanced/wallets/react-wallet-v2/yarn.lock index f283c3e9e..800e20ff6 100644 --- a/advanced/wallets/react-wallet-v2/yarn.lock +++ b/advanced/wallets/react-wallet-v2/yarn.lock @@ -3753,10 +3753,10 @@ version "0.3.1" resolved "https://codeload.github.com/ecadlabs/axios-fetch-adapter/tar.gz/167684f522e90343b9f3439d9a43ac571e2396f6" -"@walletconnect/core@2.21.3": - version "2.21.3" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.21.3.tgz#13e50f4146bd9b3b9257466e5f47e2311aa39ef9" - integrity sha512-kMjo5bI6VOsFe/DmxgeTMxCdAIfSzUzG8kCDrpxUXrTnMgaU4H2JBW+tGn7KP/YY1x49+lErZsN5JiQsE5n6Rw== +"@walletconnect/core@2.20.3-canary-1ca-1", "@walletconnect/core@2.21.3": + version "2.20.3-canary-1ca-1" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.20.3-canary-1ca-1.tgz#504e26be84184eda6d87d958248b180526a8266b" + integrity sha512-IHzl0WqqyPFwoyn40Zh24dToFfdh1tZpIwRGUPmyQN3i6A+PpAcOv6Qke2n3WiXpJPqrIAIoiWS4H5cRhSY8Hw== dependencies: "@walletconnect/heartbeat" "1.2.2" "@walletconnect/jsonrpc-provider" "1.0.14" @@ -3769,8 +3769,8 @@ "@walletconnect/relay-auth" "1.1.0" "@walletconnect/safe-json" "1.0.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.21.3" - "@walletconnect/utils" "2.21.3" + "@walletconnect/types" "2.20.3-canary-1ca-1" + "@walletconnect/utils" "2.20.3-canary-1ca-1" "@walletconnect/window-getters" "1.0.1" es-toolkit "1.39.3" events "3.3.0" @@ -3783,10 +3783,10 @@ dependencies: tslib "1.14.1" -"@walletconnect/ethereum-provider@2.21.3": - version "2.21.3" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.21.3.tgz#8ccd23e5b9d4a4c85483c4444205345c7033750a" - integrity sha512-8LY7dpp994ZZc86/iIzOrNPhzuO1TdvNPDGnmCqY17XhR9aqhsrope/WupjpygeBCidBd8mlqx/hG8Rim6vsnQ== +"@walletconnect/ethereum-provider@2.20.3-canary-1ca-1": + version "2.20.3-canary-1ca-1" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.20.3-canary-1ca-1.tgz#a586765c1900ac205353b7636999fe64c4bd5936" + integrity sha512-t2XeeiosE+hgNhKN4f6PWpdfMyrZZDIl+bb00ppvI8NcOF8WVg7fnjtkkeEVwnljBFjXZNIddlaISyfH7da/Vw== dependencies: "@reown/appkit" "1.7.8" "@walletconnect/jsonrpc-http-connection" "1.0.8" @@ -3794,10 +3794,10 @@ "@walletconnect/jsonrpc-types" "1.0.4" "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/keyvaluestorage" "1.1.1" - "@walletconnect/sign-client" "2.21.3" - "@walletconnect/types" "2.21.3" - "@walletconnect/universal-provider" "2.21.3" - "@walletconnect/utils" "2.21.3" + "@walletconnect/sign-client" "2.20.3-canary-1ca-1" + "@walletconnect/types" "2.20.3-canary-1ca-1" + "@walletconnect/universal-provider" "2.20.3-canary-1ca-1" + "@walletconnect/utils" "2.20.3-canary-1ca-1" events "3.3.0" "@walletconnect/events@1.0.1", "@walletconnect/events@^1.0.1": @@ -3905,19 +3905,19 @@ dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.21.3": - version "2.21.3" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.21.3.tgz#a60fe378ce20caa90c8066f60289e4813858fdd6" - integrity sha512-Z6sTCBrset7u5CNjPWlqQuWxmLL2WlGLZYKoB7g/Nvg8wLWo0VaaNeTtNsuopLfJeqdV9/4nV/qHE4xXs2nMIQ== +"@walletconnect/sign-client@2.20.3-canary-1ca-1", "@walletconnect/sign-client@2.21.3": + version "2.20.3-canary-1ca-1" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.20.3-canary-1ca-1.tgz#a14d81c55aa683ebe43bbc32e20995ee7fe728e3" + integrity sha512-mDf1qA6VdpNIaAXy3qj9ciqZEIu/roScTmzhcu/SBLrG9VPfWEK9nV+H9XavrL+X/PLlgfmeN2ywRek9yzEVNQ== dependencies: - "@walletconnect/core" "2.21.3" + "@walletconnect/core" "2.20.3-canary-1ca-1" "@walletconnect/events" "1.0.1" "@walletconnect/heartbeat" "1.2.2" "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/logger" "2.1.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.21.3" - "@walletconnect/utils" "2.21.3" + "@walletconnect/types" "2.20.3-canary-1ca-1" + "@walletconnect/utils" "2.20.3-canary-1ca-1" events "3.3.0" "@walletconnect/time@1.0.2", "@walletconnect/time@^1.0.2": @@ -3927,10 +3927,10 @@ dependencies: tslib "1.14.1" -"@walletconnect/types@2.18.0", "@walletconnect/types@2.21.0", "@walletconnect/types@2.21.3": - version "2.21.3" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.21.3.tgz#143b116d60f74b3ffeb411f8914e762c7fb09ec2" - integrity sha512-4fDchSb6q/YIuUokaIvp+/tpWtmiL+dOWuKUCq0+w81R0unsQzn4Zc57Xh+TkNAlBGSJmZ44ZQPevN4vaTnjwg== +"@walletconnect/types@2.18.0", "@walletconnect/types@2.20.3-canary-1ca-1", "@walletconnect/types@2.21.0", "@walletconnect/types@2.21.3": + version "2.20.3-canary-1ca-1" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.20.3-canary-1ca-1.tgz#e8b7225ea87a0a57731680850998afd561d7629c" + integrity sha512-OWqJsQ7nUcAVKF58MjNp6+lOL0kpFR/qCWGp/YS61fBt8Ao8v0LplV1uWhFpH+qCgmt2xJoKh7Jq8z1xmkMSug== dependencies: "@walletconnect/events" "1.0.1" "@walletconnect/heartbeat" "1.2.2" @@ -3939,10 +3939,10 @@ "@walletconnect/logger" "2.1.2" events "3.3.0" -"@walletconnect/universal-provider@2.18.0", "@walletconnect/universal-provider@2.21.0", "@walletconnect/universal-provider@2.21.3": - version "2.21.3" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.21.3.tgz#b6141dd605cb6073e759be6deedf6cb8cce67ffb" - integrity sha512-Tlkfbtp5oNvSb9yEUl3Fxs0A1y8kLbGJOq7F3zyjVu2EvG96cMqqmlYlPRsi55VDn3scmw8zr2zN+BMsMAuDPw== +"@walletconnect/universal-provider@2.18.0", "@walletconnect/universal-provider@2.20.3-canary-1ca-1", "@walletconnect/universal-provider@2.21.0": + version "2.20.3-canary-1ca-1" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.20.3-canary-1ca-1.tgz#d50b027b9a8c2ec693ecd889c80203dff54f4e10" + integrity sha512-kWJhRsr5fE4SSDx7QlGq6mYCNWT1teCmErKPUMjJizEDrC/+Xm2j57Us9+4l7LIbjSUhT2uN6A6F4CwbMUfyTw== dependencies: "@walletconnect/events" "1.0.1" "@walletconnect/jsonrpc-http-connection" "1.0.8" @@ -3951,16 +3951,16 @@ "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/keyvaluestorage" "1.1.1" "@walletconnect/logger" "2.1.2" - "@walletconnect/sign-client" "2.21.3" - "@walletconnect/types" "2.21.3" - "@walletconnect/utils" "2.21.3" + "@walletconnect/sign-client" "2.20.3-canary-1ca-1" + "@walletconnect/types" "2.20.3-canary-1ca-1" + "@walletconnect/utils" "2.20.3-canary-1ca-1" es-toolkit "1.39.3" events "3.3.0" -"@walletconnect/utils@2.18.0", "@walletconnect/utils@2.21.3": - version "2.21.3" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.21.3.tgz#26b159cc177a1bc84c4b6c922886440d1c396318" - integrity sha512-LHxYX69vG7aPCQB9YT1F8ibwAfRNYwqCEBMplrmquAX+l4lMHTpXvsFF/a5NWFT23DKzbWZ4VTfQTDZ//XJKpg== +"@walletconnect/utils@2.18.0", "@walletconnect/utils@2.20.3-canary-1ca-1", "@walletconnect/utils@2.21.3": + version "2.20.3-canary-1ca-1" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.20.3-canary-1ca-1.tgz#d970954a89e1eb81c6693104e74d852e54454309" + integrity sha512-EXDaiuIUxUvc0AIF3dh3hR9m9ophnM5Lh16mvGSxqXi0Qpk/9tQTDqFoPbsxs3RpPks6EQNZomFMbafIGuLJ8g== dependencies: "@msgpack/msgpack" "3.1.2" "@noble/ciphers" "1.3.0" @@ -3973,7 +3973,7 @@ "@walletconnect/relay-auth" "1.1.0" "@walletconnect/safe-json" "1.0.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.21.3" + "@walletconnect/types" "2.20.3-canary-1ca-1" "@walletconnect/window-getters" "1.0.1" "@walletconnect/window-metadata" "1.0.1" blakejs "1.2.1" From 4fa9aae8d047ca9a132666bf66ea50e3ebee6050 Mon Sep 17 00:00:00 2001 From: Gancho Radkov Date: Tue, 24 Jun 2025 14:49:16 +0300 Subject: [PATCH 2/5] fix: type --- advanced/dapps/react-dapp-v2/src/pages/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/advanced/dapps/react-dapp-v2/src/pages/index.tsx b/advanced/dapps/react-dapp-v2/src/pages/index.tsx index ef620b745..c90619c4e 100644 --- a/advanced/dapps/react-dapp-v2/src/pages/index.tsx +++ b/advanced/dapps/react-dapp-v2/src/pages/index.tsx @@ -237,7 +237,8 @@ const Home: NextPage = () => { let availableActions: AccountAction[] = []; const chainIdAsHex = `0x${numberToHex(parseInt(chainId))}`; const capabilitiesJson = session?.sessionProperties?.["capabilities"]; - const walletCapabilities = capabilitiesJson && JSON.parse(capabilitiesJson); + const walletCapabilities = + capabilitiesJson && JSON.parse(capabilitiesJson as string); session?.namespaces?.["eip155"].methods.forEach((methodName) => { const action: AccountAction | undefined = actions[methodName as keyof typeof actions]; From 469a2820cc3a83c050fb0268bbe034adbd85eaf7 Mon Sep 17 00:00:00 2001 From: Gancho Radkov Date: Fri, 27 Jun 2025 14:00:36 +0300 Subject: [PATCH 3/5] feat: siwx handling --- advanced/dapps/react-dapp-v2/package.json | 22 ++--- advanced/dapps/react-dapp-v2/pnpm-lock.yaml | 92 +++++++++---------- .../dapps/react-dapp-v2/src/pages/index.tsx | 11 +-- advanced/wallets/react-wallet-v2/package.json | 12 +-- .../src/views/SessionProposalModal.tsx | 31 ++++++- .../src/views/SessionSignBip122Modal.tsx | 6 +- .../src/views/SessionSignSolanaModal.tsx | 6 +- .../SessionSignSuiPersonalMessageModal.tsx | 6 +- advanced/wallets/react-wallet-v2/yarn.lock | 74 +++++++-------- 9 files changed, 142 insertions(+), 118 deletions(-) diff --git a/advanced/dapps/react-dapp-v2/package.json b/advanced/dapps/react-dapp-v2/package.json index c2b14c938..40b54174d 100644 --- a/advanced/dapps/react-dapp-v2/package.json +++ b/advanced/dapps/react-dapp-v2/package.json @@ -26,13 +26,13 @@ "@solana/web3.js": "^1.36.0", "@stacks/network": "^7.0.2", "@stacks/transactions": "^7.0.6", - "@walletconnect/core": "2.20.3-canary-1ca-1", + "@walletconnect/core": "2.20.3-canary-1ca-3", "@walletconnect/encoding": "^1.0.1", "@walletconnect/jsonrpc-utils": "^1.0.8", - "@walletconnect/types": "2.20.3-canary-1ca-1", - "@walletconnect/universal-provider": "2.20.3-canary-1ca-1", - "@walletconnect/sign-client": "2.20.3-canary-1ca-1", - "@walletconnect/utils": "2.20.3-canary-1ca-1", + "@walletconnect/types": "2.20.3-canary-1ca-3", + "@walletconnect/universal-provider": "2.20.3-canary-1ca-3", + "@walletconnect/sign-client": "2.20.3-canary-1ca-3", + "@walletconnect/utils": "2.20.3-canary-1ca-3", "@reown/appkit": "1.7.5", "axios": "^1.0.0", "@mysten/sui": "^1.29.1", @@ -112,14 +112,14 @@ "next@>=9.5.5 <14.2.15": ">=14.2.15", "ansi-html@<0.0.8": ">=0.0.8", "axios@<1.8.2": ">=1.8.2", - "@walletconnect/core@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-1", + "@walletconnect/core@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-3", "@walletconnect/encoding": ">=1.0.1", "@walletconnect/jsonrpc-utils": ">=1.0.8", - "@walletconnect/types@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-1", - "@walletconnect/universal-provider@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-1", - "@walletconnect/sign-client@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-1", - "@walletconnect/utils@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-1", - "@walletconnect/ethereum-provider@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-1" + "@walletconnect/types@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-3", + "@walletconnect/universal-provider@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-3", + "@walletconnect/sign-client@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-3", + "@walletconnect/utils@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-3", + "@walletconnect/ethereum-provider@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-3" } } } diff --git a/advanced/dapps/react-dapp-v2/pnpm-lock.yaml b/advanced/dapps/react-dapp-v2/pnpm-lock.yaml index 51c25e146..99f988889 100644 --- a/advanced/dapps/react-dapp-v2/pnpm-lock.yaml +++ b/advanced/dapps/react-dapp-v2/pnpm-lock.yaml @@ -38,14 +38,14 @@ overrides: next@>=9.5.5 <14.2.15: '>=14.2.15' ansi-html@<0.0.8: '>=0.0.8' axios@<1.8.2: '>=1.8.2' - '@walletconnect/core@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-1' + '@walletconnect/core@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-3' '@walletconnect/encoding': '>=1.0.1' '@walletconnect/jsonrpc-utils': '>=1.0.8' - '@walletconnect/types@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-1' - '@walletconnect/universal-provider@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-1' - '@walletconnect/sign-client@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-1' - '@walletconnect/utils@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-1' - '@walletconnect/ethereum-provider@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-1' + '@walletconnect/types@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-3' + '@walletconnect/universal-provider@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-3' + '@walletconnect/sign-client@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-3' + '@walletconnect/utils@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-3' + '@walletconnect/ethereum-provider@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-3' importers: @@ -103,8 +103,8 @@ importers: specifier: ^7.0.6 version: 7.0.6(encoding@0.1.13) '@walletconnect/core': - specifier: 2.20.3-canary-1ca-1 - version: 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + specifier: 2.20.3-canary-1ca-3 + version: 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/encoding': specifier: '>=1.0.1' version: 1.0.2 @@ -112,17 +112,17 @@ importers: specifier: '>=1.0.8' version: 1.0.8 '@walletconnect/sign-client': - specifier: 2.20.3-canary-1ca-1 - version: 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + specifier: 2.20.3-canary-1ca-3 + version: 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/types': - specifier: 2.20.3-canary-1ca-1 - version: 2.20.3-canary-1ca-1 + specifier: 2.20.3-canary-1ca-3 + version: 2.20.3-canary-1ca-3 '@walletconnect/universal-provider': - specifier: 2.20.3-canary-1ca-1 - version: 2.20.3-canary-1ca-1(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + specifier: 2.20.3-canary-1ca-3 + version: 2.20.3-canary-1ca-3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/utils': - specifier: 2.20.3-canary-1ca-1 - version: 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + specifier: 2.20.3-canary-1ca-3 + version: 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) axios: specifier: '>=1.8.2' version: 1.8.3 @@ -2446,8 +2446,8 @@ packages: cpu: [x64] os: [win32] - '@walletconnect/core@2.20.3-canary-1ca-1': - resolution: {integrity: sha512-IHzl0WqqyPFwoyn40Zh24dToFfdh1tZpIwRGUPmyQN3i6A+PpAcOv6Qke2n3WiXpJPqrIAIoiWS4H5cRhSY8Hw==} + '@walletconnect/core@2.20.3-canary-1ca-3': + resolution: {integrity: sha512-9gq0/m1+f9vKjGetAFjDHA/I0v4uWDkFCpZW3VxfqzL5WXlqQ3jtV1RC8s9Bu1Of+HSylihxT6Gd5waJ/j9TKA==} engines: {node: '>=18'} '@walletconnect/encoding@1.0.2': @@ -2497,20 +2497,20 @@ packages: '@walletconnect/safe-json@1.0.2': resolution: {integrity: sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==} - '@walletconnect/sign-client@2.20.3-canary-1ca-1': - resolution: {integrity: sha512-mDf1qA6VdpNIaAXy3qj9ciqZEIu/roScTmzhcu/SBLrG9VPfWEK9nV+H9XavrL+X/PLlgfmeN2ywRek9yzEVNQ==} + '@walletconnect/sign-client@2.20.3-canary-1ca-3': + resolution: {integrity: sha512-bXOFOrpwjoIQvTpb7CxzVArOdG0MWpuERAeuwhqSqM44vKp9YN1rp0hIEhjWXEYe3ZCZh3/o0WwUPQ5UP/de6A==} '@walletconnect/time@1.0.2': resolution: {integrity: sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g==} - '@walletconnect/types@2.20.3-canary-1ca-1': - resolution: {integrity: sha512-OWqJsQ7nUcAVKF58MjNp6+lOL0kpFR/qCWGp/YS61fBt8Ao8v0LplV1uWhFpH+qCgmt2xJoKh7Jq8z1xmkMSug==} + '@walletconnect/types@2.20.3-canary-1ca-3': + resolution: {integrity: sha512-w2LE+8Luo4EMwsZH7CcO1Gf8q42p2pvjTN/kVW1bQyLQCjtszl+tOTDa3hc+cjqiQzaflAbVkgU25l/YSNrtzg==} - '@walletconnect/universal-provider@2.20.3-canary-1ca-1': - resolution: {integrity: sha512-kWJhRsr5fE4SSDx7QlGq6mYCNWT1teCmErKPUMjJizEDrC/+Xm2j57Us9+4l7LIbjSUhT2uN6A6F4CwbMUfyTw==} + '@walletconnect/universal-provider@2.20.3-canary-1ca-3': + resolution: {integrity: sha512-jXYn0mFj0oGnsMB9CHpxyWFFWrSuljkUlny9BzmYqCVa2QOBUK2H4l3nu8oMB8X0OaSenw9AGq0Mb9ogoKuAZA==} - '@walletconnect/utils@2.20.3-canary-1ca-1': - resolution: {integrity: sha512-EXDaiuIUxUvc0AIF3dh3hR9m9ophnM5Lh16mvGSxqXi0Qpk/9tQTDqFoPbsxs3RpPks6EQNZomFMbafIGuLJ8g==} + '@walletconnect/utils@2.20.3-canary-1ca-3': + resolution: {integrity: sha512-cgLz02yaZaJ/uM7ZRCz64BeeR6j/BlTAbZGO601atrysYSN7psjY4SRwTDi3d/DvuV7AzOaQv/3W335xKDoiJw==} '@walletconnect/window-getters@1.0.1': resolution: {integrity: sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q==} @@ -11286,8 +11286,8 @@ snapshots: '@kadena/cryptography-utils': 0.3.3 '@kadena/pactjs': 0.2.9 '@kadena/types': 0.3.3 - '@walletconnect/sign-client': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) - '@walletconnect/types': 2.20.3-canary-1ca-1 + '@walletconnect/sign-client': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-3 cross-fetch: 3.1.8(encoding@0.1.13) debug: 4.3.7 encoding: 0.1.13 @@ -11784,7 +11784,7 @@ snapshots: dependencies: '@reown/appkit-common': 1.7.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@reown/appkit-wallet': 1.7.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) - '@walletconnect/universal-provider': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/universal-provider': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) valtio: 1.13.2(@types/react@18.0.15)(react@18.3.1) viem: 2.31.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) transitivePeerDependencies: @@ -11930,7 +11930,7 @@ snapshots: '@reown/appkit-polyfills': 1.7.5 '@reown/appkit-wallet': 1.7.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) '@walletconnect/logger': 2.1.2 - '@walletconnect/universal-provider': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/universal-provider': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) valtio: 1.13.2(@types/react@18.0.15)(react@18.3.1) viem: 2.31.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) transitivePeerDependencies: @@ -11981,8 +11981,8 @@ snapshots: '@reown/appkit-ui': 1.7.5(@types/react@18.0.15)(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@reown/appkit-utils': 1.7.5(@types/react@18.0.15)(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.3)(utf-8-validate@5.0.10)(valtio@1.13.2(@types/react@18.0.15)(react@18.3.1))(zod@3.24.4) '@reown/appkit-wallet': 1.7.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) - '@walletconnect/types': 2.20.3-canary-1ca-1 - '@walletconnect/universal-provider': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-3 + '@walletconnect/universal-provider': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) bs58: 6.0.0 valtio: 1.13.2(@types/react@18.0.15)(react@18.3.1) viem: 2.29.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) @@ -12762,7 +12762,7 @@ snapshots: '@unrs/rspack-resolver-binding-win32-x64-msvc@1.2.2': optional: true - '@walletconnect/core@2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@walletconnect/core@2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-provider': 1.0.14 @@ -12775,8 +12775,8 @@ snapshots: '@walletconnect/relay-auth': 1.1.0 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.20.3-canary-1ca-1 - '@walletconnect/utils': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-3 + '@walletconnect/utils': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/window-getters': 1.0.1 es-toolkit: 1.39.3 events: 3.3.0 @@ -12907,16 +12907,16 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/sign-client@2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@walletconnect/sign-client@2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: - '@walletconnect/core': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/core': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.1.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.20.3-canary-1ca-1 - '@walletconnect/utils': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-3 + '@walletconnect/utils': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -12946,7 +12946,7 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/types@2.20.3-canary-1ca-1': + '@walletconnect/types@2.20.3-canary-1ca-3': dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 @@ -12974,7 +12974,7 @@ snapshots: - ioredis - uploadthing - '@walletconnect/universal-provider@2.20.3-canary-1ca-1(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@walletconnect/universal-provider@2.20.3-canary-1ca-3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/jsonrpc-http-connection': 1.0.8(encoding@0.1.13) @@ -12983,9 +12983,9 @@ snapshots: '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/keyvaluestorage': 1.1.1 '@walletconnect/logger': 2.1.2 - '@walletconnect/sign-client': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) - '@walletconnect/types': 2.20.3-canary-1ca-1 - '@walletconnect/utils': 2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/sign-client': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-3 + '@walletconnect/utils': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) es-toolkit: 1.39.3 events: 3.3.0 transitivePeerDependencies: @@ -13013,7 +13013,7 @@ snapshots: - utf-8-validate - zod - '@walletconnect/utils@2.20.3-canary-1ca-1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@walletconnect/utils@2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: '@msgpack/msgpack': 3.1.2 '@noble/ciphers': 1.3.0 @@ -13026,7 +13026,7 @@ snapshots: '@walletconnect/relay-auth': 1.1.0 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.20.3-canary-1ca-1 + '@walletconnect/types': 2.20.3-canary-1ca-3 '@walletconnect/window-getters': 1.0.1 '@walletconnect/window-metadata': 1.0.1 blakejs: 1.2.1 diff --git a/advanced/dapps/react-dapp-v2/src/pages/index.tsx b/advanced/dapps/react-dapp-v2/src/pages/index.tsx index c90619c4e..44f51f2f7 100644 --- a/advanced/dapps/react-dapp-v2/src/pages/index.tsx +++ b/advanced/dapps/react-dapp-v2/src/pages/index.tsx @@ -119,13 +119,8 @@ const Home: NextPage = () => { if (typeof client === "undefined") { throw new Error("WalletConnect is not initialized"); } - // Suggest existing pairings (if any). - if (pairings.length) { - openPairingModal(); - } else { - // If no existing pairings are available, trigger `WalletConnectClient.connect`. - connect(); - } + + connect(); }; const onPing = async () => { @@ -644,7 +639,7 @@ const Home: NextPage = () => { if (typeof client === "undefined") { throw new Error("WalletConnect is not initialized"); } - return ; + return ; case "request": return ( diff --git a/advanced/wallets/react-wallet-v2/package.json b/advanced/wallets/react-wallet-v2/package.json index 20692cbff..503bfe9d7 100644 --- a/advanced/wallets/react-wallet-v2/package.json +++ b/advanced/wallets/react-wallet-v2/package.json @@ -83,11 +83,11 @@ "typescript": "5.2.2" }, "resolutions": { - "@walletconnect/core": "2.20.3-canary-1ca-1", - "@walletconnect/utils": "2.20.3-canary-1ca-1", - "@walletconnect/types": "2.20.3-canary-1ca-1", - "@walletconnect/sign-client": "2.20.3-canary-1ca-1", - "@walletconnect/ethereum-provider": "2.20.3-canary-1ca-1", - "@walletconnect/universal-provider": "2.20.3-canary-1ca-1" + "@walletconnect/core": "2.20.3-canary-1ca-3", + "@walletconnect/utils": "2.20.3-canary-1ca-3", + "@walletconnect/types": "2.20.3-canary-1ca-3", + "@walletconnect/sign-client": "2.20.3-canary-1ca-3", + "@walletconnect/ethereum-provider": "2.20.3-canary-1ca-3", + "@walletconnect/universal-provider": "2.20.3-canary-1ca-3" } } diff --git a/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx b/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx index 544f3f4bf..3621ebe39 100644 --- a/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx +++ b/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx @@ -1,5 +1,5 @@ import { Col, Grid, Row, Text, styled } from '@nextui-org/react' -import { useCallback, useMemo, useState } from 'react' +import { useCallback, useEffect, useMemo, useState } from 'react' import { buildApprovedNamespaces, getSdkError } from '@walletconnect/utils' import { SessionTypes, SignClientTypes } from '@walletconnect/types' import DoneIcon from '@mui/icons-material/Done' @@ -49,7 +49,7 @@ import { SUI_CHAINS, SUI_EVENTS, SUI_SIGNING_METHODS } from '@/data/SuiData' import { suiAddresses } from '@/utils/SuiWalletUtil' import { STACKS_CHAINS, STACKS_EVENTS, STACKS_SIGNING_METHODS } from '@/data/StacksData' import { stacksAddresses, stacksWallet } from '@/utils/StacksWalletUtil' -import StacksLib from '@/lib/StacksLib' +import LoadingModal from './LoadingModal' const StyledText = styled(Text, { fontWeight: 400 @@ -366,13 +366,34 @@ export default function SessionProposalModal() { SettingsStore.setSessions(Object.values(walletkit.getActiveSessions())) } } catch (e) { + console.log('error', e) styledToast((e as Error).message, 'error') } finally { setIsLoadingApprove(false) - ModalStore.close() + if (!proposal?.isSiwx) { + ModalStore.close() + } } }, [namespaces, proposal, reorderedEip155Accounts]) + useEffect(() => { + if (namespaces) { + console.log('proposal.isSiwx', proposal.isSiwx) + + if ( + proposal.isSiwx && + (globalThis as any).autoApprove && + !(globalThis as any)?.sessionApproved + ) { + ;(globalThis as any).sessionApproved = true + console.log('auto approving...') + onApprove().finally(() => { + ;(globalThis as any).sessionApproved = false + }) + } + } + }, [namespaces]) + // Hanlde reject action // eslint-disable-next-line react-hooks/rules-of-hooks const onReject = useCallback(async () => { @@ -395,7 +416,9 @@ export default function SessionProposalModal() { }, [proposal]) console.log('notSupportedChains', notSupportedChains) console.log('supportedChains', supportedChains) - return ( + return proposal?.isSiwx && (globalThis as any).autoApprove ? ( + + ) : ( Missing request data } + const requestSession = walletkit.getActiveSessions()[requestEvent.topic] + const { topic, params } = requestEvent const { request, chainId } = params const message = request.params.message @@ -32,6 +33,7 @@ export default function SessionSignBip122Modal() { if (requestEvent) { const response = await approveBip122Request(requestEvent) try { + console.log('approve bip122 request', topic, requestSession.topic) await walletkit.respondSessionRequest({ topic, response diff --git a/advanced/wallets/react-wallet-v2/src/views/SessionSignSolanaModal.tsx b/advanced/wallets/react-wallet-v2/src/views/SessionSignSolanaModal.tsx index 74f6efc26..02e688bd2 100644 --- a/advanced/wallets/react-wallet-v2/src/views/SessionSignSolanaModal.tsx +++ b/advanced/wallets/react-wallet-v2/src/views/SessionSignSolanaModal.tsx @@ -16,15 +16,16 @@ import { base58 } from 'ethers/lib/utils' export default function SessionSignSolanaModal() { // Get request and wallet data from store const requestEvent = ModalStore.state.data?.requestEvent - const requestSession = ModalStore.state.data?.requestSession const [isLoadingApprove, setIsLoadingApprove] = useState(false) const [isLoadingReject, setIsLoadingReject] = useState(false) // Ensure request and wallet are defined - if (!requestEvent || !requestSession) { + if (!requestEvent) { return Missing request data } + const requestSession = walletkit.getActiveSessions()[requestEvent.topic] + // Get required request data const { topic, params } = requestEvent const { request, chainId } = params @@ -46,6 +47,7 @@ export default function SessionSignSolanaModal() { if (requestEvent) { setIsLoadingApprove(true) const response = await approveSolanaRequest(requestEvent) + console.log('approve solana request', topic, requestSession.topic) await walletkit.respondSessionRequest({ topic, response diff --git a/advanced/wallets/react-wallet-v2/src/views/SessionSignSuiPersonalMessageModal.tsx b/advanced/wallets/react-wallet-v2/src/views/SessionSignSuiPersonalMessageModal.tsx index 55539be32..830eba42d 100644 --- a/advanced/wallets/react-wallet-v2/src/views/SessionSignSuiPersonalMessageModal.tsx +++ b/advanced/wallets/react-wallet-v2/src/views/SessionSignSuiPersonalMessageModal.tsx @@ -13,15 +13,16 @@ import { approveSuiRequest, rejectSuiRequest } from '@/utils/SuiRequestHandlerUt export default function SessionSignSuiPersonalMessageModal() { // Get request and wallet data from store const requestEvent = ModalStore.state.data?.requestEvent - const requestSession = ModalStore.state.data?.requestSession const [isLoadingApprove, setIsLoadingApprove] = useState(false) const [isLoadingReject, setIsLoadingReject] = useState(false) // Ensure request and wallet are defined - if (!requestEvent || !requestSession) { + if (!requestEvent) { return Missing request data } + const requestSession = walletkit.getActiveSessions()[requestEvent.topic] + // Get required request data const { topic, params } = requestEvent const { request, chainId } = params @@ -34,6 +35,7 @@ export default function SessionSignSuiPersonalMessageModal() { if (requestEvent) { setIsLoadingApprove(true) const response = await approveSuiRequest(requestEvent) + console.log('approve sui personal message request', topic, requestSession.topic) await walletkit.respondSessionRequest({ topic, response diff --git a/advanced/wallets/react-wallet-v2/yarn.lock b/advanced/wallets/react-wallet-v2/yarn.lock index 800e20ff6..651f0570b 100644 --- a/advanced/wallets/react-wallet-v2/yarn.lock +++ b/advanced/wallets/react-wallet-v2/yarn.lock @@ -3753,10 +3753,10 @@ version "0.3.1" resolved "https://codeload.github.com/ecadlabs/axios-fetch-adapter/tar.gz/167684f522e90343b9f3439d9a43ac571e2396f6" -"@walletconnect/core@2.20.3-canary-1ca-1", "@walletconnect/core@2.21.3": - version "2.20.3-canary-1ca-1" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.20.3-canary-1ca-1.tgz#504e26be84184eda6d87d958248b180526a8266b" - integrity sha512-IHzl0WqqyPFwoyn40Zh24dToFfdh1tZpIwRGUPmyQN3i6A+PpAcOv6Qke2n3WiXpJPqrIAIoiWS4H5cRhSY8Hw== +"@walletconnect/core@2.20.3-canary-1ca-3", "@walletconnect/core@2.21.3": + version "2.20.3-canary-1ca-3" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.20.3-canary-1ca-3.tgz#7d4c63d64cbfba1ed1bb641b094b1e04b7dcee9e" + integrity sha512-9gq0/m1+f9vKjGetAFjDHA/I0v4uWDkFCpZW3VxfqzL5WXlqQ3jtV1RC8s9Bu1Of+HSylihxT6Gd5waJ/j9TKA== dependencies: "@walletconnect/heartbeat" "1.2.2" "@walletconnect/jsonrpc-provider" "1.0.14" @@ -3769,8 +3769,8 @@ "@walletconnect/relay-auth" "1.1.0" "@walletconnect/safe-json" "1.0.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.20.3-canary-1ca-1" - "@walletconnect/utils" "2.20.3-canary-1ca-1" + "@walletconnect/types" "2.20.3-canary-1ca-3" + "@walletconnect/utils" "2.20.3-canary-1ca-3" "@walletconnect/window-getters" "1.0.1" es-toolkit "1.39.3" events "3.3.0" @@ -3783,10 +3783,10 @@ dependencies: tslib "1.14.1" -"@walletconnect/ethereum-provider@2.20.3-canary-1ca-1": - version "2.20.3-canary-1ca-1" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.20.3-canary-1ca-1.tgz#a586765c1900ac205353b7636999fe64c4bd5936" - integrity sha512-t2XeeiosE+hgNhKN4f6PWpdfMyrZZDIl+bb00ppvI8NcOF8WVg7fnjtkkeEVwnljBFjXZNIddlaISyfH7da/Vw== +"@walletconnect/ethereum-provider@2.20.3-canary-1ca-3": + version "2.20.3-canary-1ca-3" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.20.3-canary-1ca-3.tgz#e2c7fdb1cf3916e329d2f525bb10bf30bb2e1dbe" + integrity sha512-1ZQHQ/oAPQwOyrEl5O8MjY3ZwOetKvN1/wUPYrcGrVr2JkdfCm2kTpG7zRJhBZgj/by0cBGRYXGWs2tcQ0kh5w== dependencies: "@reown/appkit" "1.7.8" "@walletconnect/jsonrpc-http-connection" "1.0.8" @@ -3794,10 +3794,10 @@ "@walletconnect/jsonrpc-types" "1.0.4" "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/keyvaluestorage" "1.1.1" - "@walletconnect/sign-client" "2.20.3-canary-1ca-1" - "@walletconnect/types" "2.20.3-canary-1ca-1" - "@walletconnect/universal-provider" "2.20.3-canary-1ca-1" - "@walletconnect/utils" "2.20.3-canary-1ca-1" + "@walletconnect/sign-client" "2.20.3-canary-1ca-3" + "@walletconnect/types" "2.20.3-canary-1ca-3" + "@walletconnect/universal-provider" "2.20.3-canary-1ca-3" + "@walletconnect/utils" "2.20.3-canary-1ca-3" events "3.3.0" "@walletconnect/events@1.0.1", "@walletconnect/events@^1.0.1": @@ -3905,19 +3905,19 @@ dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.20.3-canary-1ca-1", "@walletconnect/sign-client@2.21.3": - version "2.20.3-canary-1ca-1" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.20.3-canary-1ca-1.tgz#a14d81c55aa683ebe43bbc32e20995ee7fe728e3" - integrity sha512-mDf1qA6VdpNIaAXy3qj9ciqZEIu/roScTmzhcu/SBLrG9VPfWEK9nV+H9XavrL+X/PLlgfmeN2ywRek9yzEVNQ== +"@walletconnect/sign-client@2.20.3-canary-1ca-3", "@walletconnect/sign-client@2.21.3": + version "2.20.3-canary-1ca-3" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.20.3-canary-1ca-3.tgz#6860ef373ad32ad98b658442ddf58e8da4d46903" + integrity sha512-bXOFOrpwjoIQvTpb7CxzVArOdG0MWpuERAeuwhqSqM44vKp9YN1rp0hIEhjWXEYe3ZCZh3/o0WwUPQ5UP/de6A== dependencies: - "@walletconnect/core" "2.20.3-canary-1ca-1" + "@walletconnect/core" "2.20.3-canary-1ca-3" "@walletconnect/events" "1.0.1" "@walletconnect/heartbeat" "1.2.2" "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/logger" "2.1.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.20.3-canary-1ca-1" - "@walletconnect/utils" "2.20.3-canary-1ca-1" + "@walletconnect/types" "2.20.3-canary-1ca-3" + "@walletconnect/utils" "2.20.3-canary-1ca-3" events "3.3.0" "@walletconnect/time@1.0.2", "@walletconnect/time@^1.0.2": @@ -3927,10 +3927,10 @@ dependencies: tslib "1.14.1" -"@walletconnect/types@2.18.0", "@walletconnect/types@2.20.3-canary-1ca-1", "@walletconnect/types@2.21.0", "@walletconnect/types@2.21.3": - version "2.20.3-canary-1ca-1" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.20.3-canary-1ca-1.tgz#e8b7225ea87a0a57731680850998afd561d7629c" - integrity sha512-OWqJsQ7nUcAVKF58MjNp6+lOL0kpFR/qCWGp/YS61fBt8Ao8v0LplV1uWhFpH+qCgmt2xJoKh7Jq8z1xmkMSug== +"@walletconnect/types@2.18.0", "@walletconnect/types@2.20.3-canary-1ca-3", "@walletconnect/types@2.21.0", "@walletconnect/types@2.21.3": + version "2.20.3-canary-1ca-3" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.20.3-canary-1ca-3.tgz#a1a2cd49c7e9552927d29bee9dd80cf8370286f1" + integrity sha512-w2LE+8Luo4EMwsZH7CcO1Gf8q42p2pvjTN/kVW1bQyLQCjtszl+tOTDa3hc+cjqiQzaflAbVkgU25l/YSNrtzg== dependencies: "@walletconnect/events" "1.0.1" "@walletconnect/heartbeat" "1.2.2" @@ -3939,10 +3939,10 @@ "@walletconnect/logger" "2.1.2" events "3.3.0" -"@walletconnect/universal-provider@2.18.0", "@walletconnect/universal-provider@2.20.3-canary-1ca-1", "@walletconnect/universal-provider@2.21.0": - version "2.20.3-canary-1ca-1" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.20.3-canary-1ca-1.tgz#d50b027b9a8c2ec693ecd889c80203dff54f4e10" - integrity sha512-kWJhRsr5fE4SSDx7QlGq6mYCNWT1teCmErKPUMjJizEDrC/+Xm2j57Us9+4l7LIbjSUhT2uN6A6F4CwbMUfyTw== +"@walletconnect/universal-provider@2.18.0", "@walletconnect/universal-provider@2.20.3-canary-1ca-3", "@walletconnect/universal-provider@2.21.0": + version "2.20.3-canary-1ca-3" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.20.3-canary-1ca-3.tgz#ea1fa110c682537463a4cebb7ca4f57863802186" + integrity sha512-jXYn0mFj0oGnsMB9CHpxyWFFWrSuljkUlny9BzmYqCVa2QOBUK2H4l3nu8oMB8X0OaSenw9AGq0Mb9ogoKuAZA== dependencies: "@walletconnect/events" "1.0.1" "@walletconnect/jsonrpc-http-connection" "1.0.8" @@ -3951,16 +3951,16 @@ "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/keyvaluestorage" "1.1.1" "@walletconnect/logger" "2.1.2" - "@walletconnect/sign-client" "2.20.3-canary-1ca-1" - "@walletconnect/types" "2.20.3-canary-1ca-1" - "@walletconnect/utils" "2.20.3-canary-1ca-1" + "@walletconnect/sign-client" "2.20.3-canary-1ca-3" + "@walletconnect/types" "2.20.3-canary-1ca-3" + "@walletconnect/utils" "2.20.3-canary-1ca-3" es-toolkit "1.39.3" events "3.3.0" -"@walletconnect/utils@2.18.0", "@walletconnect/utils@2.20.3-canary-1ca-1", "@walletconnect/utils@2.21.3": - version "2.20.3-canary-1ca-1" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.20.3-canary-1ca-1.tgz#d970954a89e1eb81c6693104e74d852e54454309" - integrity sha512-EXDaiuIUxUvc0AIF3dh3hR9m9ophnM5Lh16mvGSxqXi0Qpk/9tQTDqFoPbsxs3RpPks6EQNZomFMbafIGuLJ8g== +"@walletconnect/utils@2.18.0", "@walletconnect/utils@2.20.3-canary-1ca-3", "@walletconnect/utils@2.21.3": + version "2.20.3-canary-1ca-3" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.20.3-canary-1ca-3.tgz#57994cb07615d6c0a25273f450c74860c053a141" + integrity sha512-cgLz02yaZaJ/uM7ZRCz64BeeR6j/BlTAbZGO601atrysYSN7psjY4SRwTDi3d/DvuV7AzOaQv/3W335xKDoiJw== dependencies: "@msgpack/msgpack" "3.1.2" "@noble/ciphers" "1.3.0" @@ -3973,7 +3973,7 @@ "@walletconnect/relay-auth" "1.1.0" "@walletconnect/safe-json" "1.0.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.20.3-canary-1ca-1" + "@walletconnect/types" "2.20.3-canary-1ca-3" "@walletconnect/window-getters" "1.0.1" "@walletconnect/window-metadata" "1.0.1" blakejs "1.2.1" From f064623dc197cc06b1394833ea02595c5af401d8 Mon Sep 17 00:00:00 2001 From: Gancho Radkov Date: Fri, 27 Jun 2025 14:02:23 +0300 Subject: [PATCH 4/5] chore: autoApprove to true --- .../react-wallet-v2/src/views/SessionProposalModal.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx b/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx index 3621ebe39..6c1404e10 100644 --- a/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx +++ b/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx @@ -380,6 +380,10 @@ export default function SessionProposalModal() { if (namespaces) { console.log('proposal.isSiwx', proposal.isSiwx) + if (typeof (globalThis as any).autoApprove === 'undefined') { + ;(globalThis as any).autoApprove = true + } + if ( proposal.isSiwx && (globalThis as any).autoApprove && From cca2d3048aa10ebca120ceed52503d871e88666a Mon Sep 17 00:00:00 2001 From: Gancho Radkov Date: Tue, 1 Jul 2025 12:39:11 +0300 Subject: [PATCH 5/5] refactor: multi chain 1ca --- advanced/dapps/react-dapp-v2/package.json | 22 ++--- advanced/dapps/react-dapp-v2/pnpm-lock.yaml | 94 +++++++++---------- advanced/wallets/react-wallet-v2/package.json | 12 +-- .../src/utils/MultichainRequestHandler.ts | 25 +++++ .../src/views/SessionProposalModal.tsx | 89 ++++++++++++------ advanced/wallets/react-wallet-v2/yarn.lock | 74 +++++++-------- 6 files changed, 185 insertions(+), 131 deletions(-) create mode 100644 advanced/wallets/react-wallet-v2/src/utils/MultichainRequestHandler.ts diff --git a/advanced/dapps/react-dapp-v2/package.json b/advanced/dapps/react-dapp-v2/package.json index 40b54174d..86a407937 100644 --- a/advanced/dapps/react-dapp-v2/package.json +++ b/advanced/dapps/react-dapp-v2/package.json @@ -26,13 +26,13 @@ "@solana/web3.js": "^1.36.0", "@stacks/network": "^7.0.2", "@stacks/transactions": "^7.0.6", - "@walletconnect/core": "2.20.3-canary-1ca-3", + "@walletconnect/core": "2.20.3-canary-1ca-4", "@walletconnect/encoding": "^1.0.1", "@walletconnect/jsonrpc-utils": "^1.0.8", - "@walletconnect/types": "2.20.3-canary-1ca-3", - "@walletconnect/universal-provider": "2.20.3-canary-1ca-3", - "@walletconnect/sign-client": "2.20.3-canary-1ca-3", - "@walletconnect/utils": "2.20.3-canary-1ca-3", + "@walletconnect/types": "2.20.3-canary-1ca-4", + "@walletconnect/universal-provider": "2.20.3-canary-1ca-4", + "@walletconnect/sign-client": "2.20.3-canary-1ca-4", + "@walletconnect/utils": "2.20.3-canary-1ca-4", "@reown/appkit": "1.7.5", "axios": "^1.0.0", "@mysten/sui": "^1.29.1", @@ -112,14 +112,14 @@ "next@>=9.5.5 <14.2.15": ">=14.2.15", "ansi-html@<0.0.8": ">=0.0.8", "axios@<1.8.2": ">=1.8.2", - "@walletconnect/core@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-3", + "@walletconnect/core@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-4", "@walletconnect/encoding": ">=1.0.1", "@walletconnect/jsonrpc-utils": ">=1.0.8", - "@walletconnect/types@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-3", - "@walletconnect/universal-provider@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-3", - "@walletconnect/sign-client@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-3", - "@walletconnect/utils@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-3", - "@walletconnect/ethereum-provider@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-3" + "@walletconnect/types@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-4", + "@walletconnect/universal-provider@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-4", + "@walletconnect/sign-client@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-4", + "@walletconnect/utils@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-4", + "@walletconnect/ethereum-provider@<2.21.3-canary-1ca-0": ">=2.20.3-canary-1ca-4" } } } diff --git a/advanced/dapps/react-dapp-v2/pnpm-lock.yaml b/advanced/dapps/react-dapp-v2/pnpm-lock.yaml index 99f988889..32c7ff3fe 100644 --- a/advanced/dapps/react-dapp-v2/pnpm-lock.yaml +++ b/advanced/dapps/react-dapp-v2/pnpm-lock.yaml @@ -38,14 +38,14 @@ overrides: next@>=9.5.5 <14.2.15: '>=14.2.15' ansi-html@<0.0.8: '>=0.0.8' axios@<1.8.2: '>=1.8.2' - '@walletconnect/core@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-3' + '@walletconnect/core@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-4' '@walletconnect/encoding': '>=1.0.1' '@walletconnect/jsonrpc-utils': '>=1.0.8' - '@walletconnect/types@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-3' - '@walletconnect/universal-provider@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-3' - '@walletconnect/sign-client@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-3' - '@walletconnect/utils@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-3' - '@walletconnect/ethereum-provider@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-3' + '@walletconnect/types@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-4' + '@walletconnect/universal-provider@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-4' + '@walletconnect/sign-client@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-4' + '@walletconnect/utils@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-4' + '@walletconnect/ethereum-provider@<2.21.3-canary-1ca-0': '>=2.20.3-canary-1ca-4' importers: @@ -103,8 +103,8 @@ importers: specifier: ^7.0.6 version: 7.0.6(encoding@0.1.13) '@walletconnect/core': - specifier: 2.20.3-canary-1ca-3 - version: 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + specifier: 2.20.3-canary-1ca-4 + version: 2.20.3-canary-1ca-4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/encoding': specifier: '>=1.0.1' version: 1.0.2 @@ -112,17 +112,17 @@ importers: specifier: '>=1.0.8' version: 1.0.8 '@walletconnect/sign-client': - specifier: 2.20.3-canary-1ca-3 - version: 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + specifier: 2.20.3-canary-1ca-4 + version: 2.20.3-canary-1ca-4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/types': - specifier: 2.20.3-canary-1ca-3 - version: 2.20.3-canary-1ca-3 + specifier: 2.20.3-canary-1ca-4 + version: 2.20.3-canary-1ca-4 '@walletconnect/universal-provider': - specifier: 2.20.3-canary-1ca-3 - version: 2.20.3-canary-1ca-3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + specifier: 2.20.3-canary-1ca-4 + version: 2.20.3-canary-1ca-4(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/utils': - specifier: 2.20.3-canary-1ca-3 - version: 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + specifier: 2.20.3-canary-1ca-4 + version: 2.20.3-canary-1ca-4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) axios: specifier: '>=1.8.2' version: 1.8.3 @@ -2446,8 +2446,8 @@ packages: cpu: [x64] os: [win32] - '@walletconnect/core@2.20.3-canary-1ca-3': - resolution: {integrity: sha512-9gq0/m1+f9vKjGetAFjDHA/I0v4uWDkFCpZW3VxfqzL5WXlqQ3jtV1RC8s9Bu1Of+HSylihxT6Gd5waJ/j9TKA==} + '@walletconnect/core@2.20.3-canary-1ca-4': + resolution: {integrity: sha512-U6OnPx4TDFZms2R57DwTx0s1RSnn+jUTV/I9OLNBmSnlpL0i+aMmdSOAXeT6RQaZ7d9H4U1YJVVpdHr/YoZj9g==} engines: {node: '>=18'} '@walletconnect/encoding@1.0.2': @@ -2497,20 +2497,20 @@ packages: '@walletconnect/safe-json@1.0.2': resolution: {integrity: sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==} - '@walletconnect/sign-client@2.20.3-canary-1ca-3': - resolution: {integrity: sha512-bXOFOrpwjoIQvTpb7CxzVArOdG0MWpuERAeuwhqSqM44vKp9YN1rp0hIEhjWXEYe3ZCZh3/o0WwUPQ5UP/de6A==} + '@walletconnect/sign-client@2.20.3-canary-1ca-4': + resolution: {integrity: sha512-sv0g4QgrCYmGgPkAQrb/LgUANCUtu1U3pooBgfLPJrhYFkEI1FB4gWnCn6QEC++TGjtMmrI+mKh1h/qwTmt9Vg==} '@walletconnect/time@1.0.2': resolution: {integrity: sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g==} - '@walletconnect/types@2.20.3-canary-1ca-3': - resolution: {integrity: sha512-w2LE+8Luo4EMwsZH7CcO1Gf8q42p2pvjTN/kVW1bQyLQCjtszl+tOTDa3hc+cjqiQzaflAbVkgU25l/YSNrtzg==} + '@walletconnect/types@2.20.3-canary-1ca-4': + resolution: {integrity: sha512-1rNUHVccf3aVymgS+RxsLmvGG9M8ql6aPDX11E/4v070RjETU4n65if2OAdlEwzmaGmKuZI8/2Plf+tq02h7sQ==} - '@walletconnect/universal-provider@2.20.3-canary-1ca-3': - resolution: {integrity: sha512-jXYn0mFj0oGnsMB9CHpxyWFFWrSuljkUlny9BzmYqCVa2QOBUK2H4l3nu8oMB8X0OaSenw9AGq0Mb9ogoKuAZA==} + '@walletconnect/universal-provider@2.20.3-canary-1ca-4': + resolution: {integrity: sha512-Zie/Lv4deM0y2m4nb845Diu8oOYyjRscFHW3QkFnGFK9sWXlS0/AmfkW6ZsWMPyz/Hy30jO14juJrLRLpHu3Nw==} - '@walletconnect/utils@2.20.3-canary-1ca-3': - resolution: {integrity: sha512-cgLz02yaZaJ/uM7ZRCz64BeeR6j/BlTAbZGO601atrysYSN7psjY4SRwTDi3d/DvuV7AzOaQv/3W335xKDoiJw==} + '@walletconnect/utils@2.20.3-canary-1ca-4': + resolution: {integrity: sha512-DE8XmKCErZ4ZrFkdqr3a6bhY+sOn37bv/cGTNMV0UIytMikQyx9jJKc/cz7FiB6vOb2bM71KdrqkkO5pnx+GyQ==} '@walletconnect/window-getters@1.0.1': resolution: {integrity: sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q==} @@ -11286,8 +11286,8 @@ snapshots: '@kadena/cryptography-utils': 0.3.3 '@kadena/pactjs': 0.2.9 '@kadena/types': 0.3.3 - '@walletconnect/sign-client': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) - '@walletconnect/types': 2.20.3-canary-1ca-3 + '@walletconnect/sign-client': 2.20.3-canary-1ca-4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-4 cross-fetch: 3.1.8(encoding@0.1.13) debug: 4.3.7 encoding: 0.1.13 @@ -11784,7 +11784,7 @@ snapshots: dependencies: '@reown/appkit-common': 1.7.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@reown/appkit-wallet': 1.7.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) - '@walletconnect/universal-provider': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/universal-provider': 2.20.3-canary-1ca-4(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) valtio: 1.13.2(@types/react@18.0.15)(react@18.3.1) viem: 2.31.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) transitivePeerDependencies: @@ -11930,7 +11930,7 @@ snapshots: '@reown/appkit-polyfills': 1.7.5 '@reown/appkit-wallet': 1.7.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) '@walletconnect/logger': 2.1.2 - '@walletconnect/universal-provider': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/universal-provider': 2.20.3-canary-1ca-4(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) valtio: 1.13.2(@types/react@18.0.15)(react@18.3.1) viem: 2.31.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) transitivePeerDependencies: @@ -11981,8 +11981,8 @@ snapshots: '@reown/appkit-ui': 1.7.5(@types/react@18.0.15)(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@reown/appkit-utils': 1.7.5(@types/react@18.0.15)(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.3)(utf-8-validate@5.0.10)(valtio@1.13.2(@types/react@18.0.15)(react@18.3.1))(zod@3.24.4) '@reown/appkit-wallet': 1.7.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) - '@walletconnect/types': 2.20.3-canary-1ca-3 - '@walletconnect/universal-provider': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-4 + '@walletconnect/universal-provider': 2.20.3-canary-1ca-4(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) bs58: 6.0.0 valtio: 1.13.2(@types/react@18.0.15)(react@18.3.1) viem: 2.29.3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) @@ -12762,7 +12762,7 @@ snapshots: '@unrs/rspack-resolver-binding-win32-x64-msvc@1.2.2': optional: true - '@walletconnect/core@2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@walletconnect/core@2.20.3-canary-1ca-4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-provider': 1.0.14 @@ -12775,8 +12775,8 @@ snapshots: '@walletconnect/relay-auth': 1.1.0 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.20.3-canary-1ca-3 - '@walletconnect/utils': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-4 + '@walletconnect/utils': 2.20.3-canary-1ca-4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/window-getters': 1.0.1 es-toolkit: 1.39.3 events: 3.3.0 @@ -12907,16 +12907,16 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/sign-client@2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@walletconnect/sign-client@2.20.3-canary-1ca-4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: - '@walletconnect/core': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/core': 2.20.3-canary-1ca-4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.1.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.20.3-canary-1ca-3 - '@walletconnect/utils': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-4 + '@walletconnect/utils': 2.20.3-canary-1ca-4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -12946,7 +12946,7 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/types@2.20.3-canary-1ca-3': + '@walletconnect/types@2.20.3-canary-1ca-4': dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 @@ -12974,7 +12974,7 @@ snapshots: - ioredis - uploadthing - '@walletconnect/universal-provider@2.20.3-canary-1ca-3(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@walletconnect/universal-provider@2.20.3-canary-1ca-4(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/jsonrpc-http-connection': 1.0.8(encoding@0.1.13) @@ -12983,9 +12983,9 @@ snapshots: '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/keyvaluestorage': 1.1.1 '@walletconnect/logger': 2.1.2 - '@walletconnect/sign-client': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) - '@walletconnect/types': 2.20.3-canary-1ca-3 - '@walletconnect/utils': 2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/sign-client': 2.20.3-canary-1ca-4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) + '@walletconnect/types': 2.20.3-canary-1ca-4 + '@walletconnect/utils': 2.20.3-canary-1ca-4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4) es-toolkit: 1.39.3 events: 3.3.0 transitivePeerDependencies: @@ -13013,7 +13013,7 @@ snapshots: - utf-8-validate - zod - '@walletconnect/utils@2.20.3-canary-1ca-3(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': + '@walletconnect/utils@2.20.3-canary-1ca-4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.4)': dependencies: '@msgpack/msgpack': 3.1.2 '@noble/ciphers': 1.3.0 @@ -13026,7 +13026,7 @@ snapshots: '@walletconnect/relay-auth': 1.1.0 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.20.3-canary-1ca-3 + '@walletconnect/types': 2.20.3-canary-1ca-4 '@walletconnect/window-getters': 1.0.1 '@walletconnect/window-metadata': 1.0.1 blakejs: 1.2.1 @@ -19455,7 +19455,7 @@ snapshots: buffer: 6.0.3 eventemitter3: 5.0.1 uuid: 8.3.2 - ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + ws: 8.18.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) optionalDependencies: bufferutil: 4.0.9 utf-8-validate: 5.0.10 diff --git a/advanced/wallets/react-wallet-v2/package.json b/advanced/wallets/react-wallet-v2/package.json index 503bfe9d7..2e6650ab5 100644 --- a/advanced/wallets/react-wallet-v2/package.json +++ b/advanced/wallets/react-wallet-v2/package.json @@ -83,11 +83,11 @@ "typescript": "5.2.2" }, "resolutions": { - "@walletconnect/core": "2.20.3-canary-1ca-3", - "@walletconnect/utils": "2.20.3-canary-1ca-3", - "@walletconnect/types": "2.20.3-canary-1ca-3", - "@walletconnect/sign-client": "2.20.3-canary-1ca-3", - "@walletconnect/ethereum-provider": "2.20.3-canary-1ca-3", - "@walletconnect/universal-provider": "2.20.3-canary-1ca-3" + "@walletconnect/core": "2.20.3-canary-1ca-4", + "@walletconnect/utils": "2.20.3-canary-1ca-4", + "@walletconnect/types": "2.20.3-canary-1ca-4", + "@walletconnect/sign-client": "2.20.3-canary-1ca-4", + "@walletconnect/ethereum-provider": "2.20.3-canary-1ca-4", + "@walletconnect/universal-provider": "2.20.3-canary-1ca-4" } } diff --git a/advanced/wallets/react-wallet-v2/src/utils/MultichainRequestHandler.ts b/advanced/wallets/react-wallet-v2/src/utils/MultichainRequestHandler.ts new file mode 100644 index 000000000..2787e7090 --- /dev/null +++ b/advanced/wallets/react-wallet-v2/src/utils/MultichainRequestHandler.ts @@ -0,0 +1,25 @@ +import { SignClientTypes } from '@walletconnect/types' +import { parseChainId } from '@walletconnect/utils' +import { approveEIP155Request } from './EIP155RequestHandlerUtil' +import { approveSuiRequest } from './SuiRequestHandlerUtil' +import { approveSolanaRequest } from './SolanaRequestHandlerUtil' +import { approveBip122Request } from './Bip122RequestHandlerUtil' + +export function approveMultichainRequest( + requestEvent: SignClientTypes.EventArguments['session_request'] +) { + const chainId = requestEvent.params.chainId + const { namespace } = parseChainId(chainId) + switch (namespace) { + case 'eip155': + return approveEIP155Request(requestEvent) + case 'sui': + return approveSuiRequest(requestEvent) + case 'solana': + return approveSolanaRequest(requestEvent) + case 'bip122': + return approveBip122Request(requestEvent) + default: + console.log('need to implement multichain request handler for', namespace) + } +} diff --git a/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx b/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx index 6c1404e10..fc008b869 100644 --- a/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx +++ b/advanced/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx @@ -1,4 +1,4 @@ -import { Col, Grid, Row, Text, styled } from '@nextui-org/react' +import { Col, Divider, Grid, Row, Text, styled } from '@nextui-org/react' import { useCallback, useEffect, useMemo, useState } from 'react' import { buildApprovedNamespaces, getSdkError } from '@walletconnect/utils' import { SessionTypes, SignClientTypes } from '@walletconnect/types' @@ -50,6 +50,7 @@ import { suiAddresses } from '@/utils/SuiWalletUtil' import { STACKS_CHAINS, STACKS_EVENTS, STACKS_SIGNING_METHODS } from '@/data/StacksData' import { stacksAddresses, stacksWallet } from '@/utils/StacksWalletUtil' import LoadingModal from './LoadingModal' +import { approveMultichainRequest } from '@/utils/MultichainRequestHandler' const StyledText = styled(Text, { fontWeight: 400 @@ -66,6 +67,7 @@ export default function SessionProposalModal() { const proposal = data?.data?.proposal as SignClientTypes.EventArguments['session_proposal'] const [isLoadingApprove, setIsLoadingApprove] = useState(false) const [isLoadingReject, setIsLoadingReject] = useState(false) + const [pendingRequests, setPendingRequests] = useState>({}) const { getAvailableSmartAccountsOnNamespaceChains } = useSmartAccounts() const { query } = useRouter() @@ -358,10 +360,27 @@ export default function SessionProposalModal() { }) } console.log('sessionProperties', sessionProperties) + + const pendingRequestsResults: any = {} + + for (const [id, request] of Object.entries(pendingRequests)) { + console.log('pending request', request) + const result = await approveMultichainRequest({ + topic: proposal.params.pairingTopic, + id: request.id, + params: request, + verifyContext: {} as any + }) + console.log('pending request result', result) + pendingRequestsResults[id] = result + } + await walletkit.approveSession({ id: proposal.id, namespaces, - sessionProperties + sessionProperties, + // @ts-ignore - exists in SignClient types but not in walletkit types + pendingRequestsResults }) SettingsStore.setSessions(Object.values(walletkit.getActiveSessions())) } @@ -370,31 +389,19 @@ export default function SessionProposalModal() { styledToast((e as Error).message, 'error') } finally { setIsLoadingApprove(false) - if (!proposal?.isSiwx) { - ModalStore.close() - } + ModalStore.close() } - }, [namespaces, proposal, reorderedEip155Accounts]) + }, [namespaces, proposal, reorderedEip155Accounts, pendingRequests]) useEffect(() => { if (namespaces) { - console.log('proposal.isSiwx', proposal.isSiwx) - - if (typeof (globalThis as any).autoApprove === 'undefined') { - ;(globalThis as any).autoApprove = true - } - - if ( - proposal.isSiwx && - (globalThis as any).autoApprove && - !(globalThis as any)?.sessionApproved - ) { - ;(globalThis as any).sessionApproved = true - console.log('auto approving...') - onApprove().finally(() => { - ;(globalThis as any).sessionApproved = false - }) - } + // @ts-ignore + const requests = walletkit.engine.signClient.engine.preparePendingRequests({ + pendingRequests: proposal?.params?.sessionProperties?.pending_requests as any, + namespaces + }) + console.log('prepared pending requests', requests) + setPendingRequests(requests) } }, [namespaces]) @@ -420,9 +427,7 @@ export default function SessionProposalModal() { }, [proposal]) console.log('notSupportedChains', notSupportedChains) console.log('supportedChains', supportedChains) - return proposal?.isSiwx && (globalThis as any).autoApprove ? ( - - ) : ( + return ( Non available} - Smart Accounts + {smartAccountEnabled && Smart Accounts} {smartAccountEnabled && namespaces && getAvailableSmartAccountsOnNamespaceChains(namespaces?.eip155?.chains).map( @@ -504,9 +509,11 @@ export default function SessionProposalModal() { ) })) || Non available} - - Chains - + {smartAccountEnabled && namespaces && ( + + Chains + + )} {smartAccountEnabled && namespaces && getAvailableSmartAccountsOnNamespaceChains(namespaces?.eip155?.chains).map( @@ -522,6 +529,28 @@ export default function SessionProposalModal() { } )} + + + Pending Requests ({Object.entries(pendingRequests).length}) + + {pendingRequests && + Object.entries(pendingRequests).map(([key, value]) => { + return ( + + + Method + + {value.request.method} + + + Message + + {value.request.params.message} + + + + ) + })} ) diff --git a/advanced/wallets/react-wallet-v2/yarn.lock b/advanced/wallets/react-wallet-v2/yarn.lock index 651f0570b..1e7592803 100644 --- a/advanced/wallets/react-wallet-v2/yarn.lock +++ b/advanced/wallets/react-wallet-v2/yarn.lock @@ -3753,10 +3753,10 @@ version "0.3.1" resolved "https://codeload.github.com/ecadlabs/axios-fetch-adapter/tar.gz/167684f522e90343b9f3439d9a43ac571e2396f6" -"@walletconnect/core@2.20.3-canary-1ca-3", "@walletconnect/core@2.21.3": - version "2.20.3-canary-1ca-3" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.20.3-canary-1ca-3.tgz#7d4c63d64cbfba1ed1bb641b094b1e04b7dcee9e" - integrity sha512-9gq0/m1+f9vKjGetAFjDHA/I0v4uWDkFCpZW3VxfqzL5WXlqQ3jtV1RC8s9Bu1Of+HSylihxT6Gd5waJ/j9TKA== +"@walletconnect/core@2.20.3-canary-1ca-4", "@walletconnect/core@2.21.3": + version "2.20.3-canary-1ca-4" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.20.3-canary-1ca-4.tgz#47b9620fb6526ebdfff9d24ebb4b51cd07d89016" + integrity sha512-U6OnPx4TDFZms2R57DwTx0s1RSnn+jUTV/I9OLNBmSnlpL0i+aMmdSOAXeT6RQaZ7d9H4U1YJVVpdHr/YoZj9g== dependencies: "@walletconnect/heartbeat" "1.2.2" "@walletconnect/jsonrpc-provider" "1.0.14" @@ -3769,8 +3769,8 @@ "@walletconnect/relay-auth" "1.1.0" "@walletconnect/safe-json" "1.0.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.20.3-canary-1ca-3" - "@walletconnect/utils" "2.20.3-canary-1ca-3" + "@walletconnect/types" "2.20.3-canary-1ca-4" + "@walletconnect/utils" "2.20.3-canary-1ca-4" "@walletconnect/window-getters" "1.0.1" es-toolkit "1.39.3" events "3.3.0" @@ -3783,10 +3783,10 @@ dependencies: tslib "1.14.1" -"@walletconnect/ethereum-provider@2.20.3-canary-1ca-3": - version "2.20.3-canary-1ca-3" - resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.20.3-canary-1ca-3.tgz#e2c7fdb1cf3916e329d2f525bb10bf30bb2e1dbe" - integrity sha512-1ZQHQ/oAPQwOyrEl5O8MjY3ZwOetKvN1/wUPYrcGrVr2JkdfCm2kTpG7zRJhBZgj/by0cBGRYXGWs2tcQ0kh5w== +"@walletconnect/ethereum-provider@2.20.3-canary-1ca-4": + version "2.20.3-canary-1ca-4" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.20.3-canary-1ca-4.tgz#d40276a5ed9dd70e2db860cc35b5f85d803b3542" + integrity sha512-1HgMTGdG5lBneScQCYB34HveZ83g/WclR/+B6qG4ZupiwLnhKHnCX/Zh2qfw6scQ9CAcMooEIx4WJEtRGBE5HQ== dependencies: "@reown/appkit" "1.7.8" "@walletconnect/jsonrpc-http-connection" "1.0.8" @@ -3794,10 +3794,10 @@ "@walletconnect/jsonrpc-types" "1.0.4" "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/keyvaluestorage" "1.1.1" - "@walletconnect/sign-client" "2.20.3-canary-1ca-3" - "@walletconnect/types" "2.20.3-canary-1ca-3" - "@walletconnect/universal-provider" "2.20.3-canary-1ca-3" - "@walletconnect/utils" "2.20.3-canary-1ca-3" + "@walletconnect/sign-client" "2.20.3-canary-1ca-4" + "@walletconnect/types" "2.20.3-canary-1ca-4" + "@walletconnect/universal-provider" "2.20.3-canary-1ca-4" + "@walletconnect/utils" "2.20.3-canary-1ca-4" events "3.3.0" "@walletconnect/events@1.0.1", "@walletconnect/events@^1.0.1": @@ -3905,19 +3905,19 @@ dependencies: tslib "1.14.1" -"@walletconnect/sign-client@2.20.3-canary-1ca-3", "@walletconnect/sign-client@2.21.3": - version "2.20.3-canary-1ca-3" - resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.20.3-canary-1ca-3.tgz#6860ef373ad32ad98b658442ddf58e8da4d46903" - integrity sha512-bXOFOrpwjoIQvTpb7CxzVArOdG0MWpuERAeuwhqSqM44vKp9YN1rp0hIEhjWXEYe3ZCZh3/o0WwUPQ5UP/de6A== +"@walletconnect/sign-client@2.20.3-canary-1ca-4", "@walletconnect/sign-client@2.21.3": + version "2.20.3-canary-1ca-4" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.20.3-canary-1ca-4.tgz#b7225fd6a6b73e6876cd1abeaab230515e6c4814" + integrity sha512-sv0g4QgrCYmGgPkAQrb/LgUANCUtu1U3pooBgfLPJrhYFkEI1FB4gWnCn6QEC++TGjtMmrI+mKh1h/qwTmt9Vg== dependencies: - "@walletconnect/core" "2.20.3-canary-1ca-3" + "@walletconnect/core" "2.20.3-canary-1ca-4" "@walletconnect/events" "1.0.1" "@walletconnect/heartbeat" "1.2.2" "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/logger" "2.1.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.20.3-canary-1ca-3" - "@walletconnect/utils" "2.20.3-canary-1ca-3" + "@walletconnect/types" "2.20.3-canary-1ca-4" + "@walletconnect/utils" "2.20.3-canary-1ca-4" events "3.3.0" "@walletconnect/time@1.0.2", "@walletconnect/time@^1.0.2": @@ -3927,10 +3927,10 @@ dependencies: tslib "1.14.1" -"@walletconnect/types@2.18.0", "@walletconnect/types@2.20.3-canary-1ca-3", "@walletconnect/types@2.21.0", "@walletconnect/types@2.21.3": - version "2.20.3-canary-1ca-3" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.20.3-canary-1ca-3.tgz#a1a2cd49c7e9552927d29bee9dd80cf8370286f1" - integrity sha512-w2LE+8Luo4EMwsZH7CcO1Gf8q42p2pvjTN/kVW1bQyLQCjtszl+tOTDa3hc+cjqiQzaflAbVkgU25l/YSNrtzg== +"@walletconnect/types@2.18.0", "@walletconnect/types@2.20.3-canary-1ca-4", "@walletconnect/types@2.21.0", "@walletconnect/types@2.21.3": + version "2.20.3-canary-1ca-4" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.20.3-canary-1ca-4.tgz#ba61be9bac9e3216be79f359d3ec0f2934141ad1" + integrity sha512-1rNUHVccf3aVymgS+RxsLmvGG9M8ql6aPDX11E/4v070RjETU4n65if2OAdlEwzmaGmKuZI8/2Plf+tq02h7sQ== dependencies: "@walletconnect/events" "1.0.1" "@walletconnect/heartbeat" "1.2.2" @@ -3939,10 +3939,10 @@ "@walletconnect/logger" "2.1.2" events "3.3.0" -"@walletconnect/universal-provider@2.18.0", "@walletconnect/universal-provider@2.20.3-canary-1ca-3", "@walletconnect/universal-provider@2.21.0": - version "2.20.3-canary-1ca-3" - resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.20.3-canary-1ca-3.tgz#ea1fa110c682537463a4cebb7ca4f57863802186" - integrity sha512-jXYn0mFj0oGnsMB9CHpxyWFFWrSuljkUlny9BzmYqCVa2QOBUK2H4l3nu8oMB8X0OaSenw9AGq0Mb9ogoKuAZA== +"@walletconnect/universal-provider@2.18.0", "@walletconnect/universal-provider@2.20.3-canary-1ca-4", "@walletconnect/universal-provider@2.21.0": + version "2.20.3-canary-1ca-4" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.20.3-canary-1ca-4.tgz#a04bb4d33c759ad1363abf8a057a13ec48ccf1fb" + integrity sha512-Zie/Lv4deM0y2m4nb845Diu8oOYyjRscFHW3QkFnGFK9sWXlS0/AmfkW6ZsWMPyz/Hy30jO14juJrLRLpHu3Nw== dependencies: "@walletconnect/events" "1.0.1" "@walletconnect/jsonrpc-http-connection" "1.0.8" @@ -3951,16 +3951,16 @@ "@walletconnect/jsonrpc-utils" "1.0.8" "@walletconnect/keyvaluestorage" "1.1.1" "@walletconnect/logger" "2.1.2" - "@walletconnect/sign-client" "2.20.3-canary-1ca-3" - "@walletconnect/types" "2.20.3-canary-1ca-3" - "@walletconnect/utils" "2.20.3-canary-1ca-3" + "@walletconnect/sign-client" "2.20.3-canary-1ca-4" + "@walletconnect/types" "2.20.3-canary-1ca-4" + "@walletconnect/utils" "2.20.3-canary-1ca-4" es-toolkit "1.39.3" events "3.3.0" -"@walletconnect/utils@2.18.0", "@walletconnect/utils@2.20.3-canary-1ca-3", "@walletconnect/utils@2.21.3": - version "2.20.3-canary-1ca-3" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.20.3-canary-1ca-3.tgz#57994cb07615d6c0a25273f450c74860c053a141" - integrity sha512-cgLz02yaZaJ/uM7ZRCz64BeeR6j/BlTAbZGO601atrysYSN7psjY4SRwTDi3d/DvuV7AzOaQv/3W335xKDoiJw== +"@walletconnect/utils@2.18.0", "@walletconnect/utils@2.20.3-canary-1ca-4", "@walletconnect/utils@2.21.3": + version "2.20.3-canary-1ca-4" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.20.3-canary-1ca-4.tgz#0fdec474aad61c99b34d77ce9e65b48725d62be9" + integrity sha512-DE8XmKCErZ4ZrFkdqr3a6bhY+sOn37bv/cGTNMV0UIytMikQyx9jJKc/cz7FiB6vOb2bM71KdrqkkO5pnx+GyQ== dependencies: "@msgpack/msgpack" "3.1.2" "@noble/ciphers" "1.3.0" @@ -3973,7 +3973,7 @@ "@walletconnect/relay-auth" "1.1.0" "@walletconnect/safe-json" "1.0.2" "@walletconnect/time" "1.0.2" - "@walletconnect/types" "2.20.3-canary-1ca-3" + "@walletconnect/types" "2.20.3-canary-1ca-4" "@walletconnect/window-getters" "1.0.1" "@walletconnect/window-metadata" "1.0.1" blakejs "1.2.1"