From 55f73e0ca5a160c62fca267a5552a0c11f69b3cf Mon Sep 17 00:00:00 2001 From: Jack Hamer <47187316+JackHamer09@users.noreply.github.com> Date: Fri, 6 Oct 2023 15:30:07 +0300 Subject: [PATCH] fix: upgrade web3modal to v3 (#137) --- data/wallets.ts | 4 +- package-lock.json | 381 ++++++++++-------- package.json | 7 +- pages/transaction/zksync/era/index.vue | 7 - pages/transaction/zksync/era/receive.vue | 7 - pages/transaction/zksync/era/send-lite.vue | 7 - pages/transaction/zksync/lite/index.vue | 29 -- pages/transaction/zksync/lite/receive.vue | 29 -- pages/transaction/zksync/lite/send-era.vue | 19 +- store/destinations.ts | 10 - store/onboard.ts | 111 ++--- .../mainPage/artifacts-header.feature | 2 - .../whereToSendPage/artifacts.feature | 10 - .../redirection/mainPage/redirection.feature | 1 - .../bridge-deposit-with-blockchain.feature | 2 +- tests/e2e/src/pages/login.page.ts | 2 +- tests/e2e/src/pages/main.page.ts | 4 - 17 files changed, 293 insertions(+), 339 deletions(-) diff --git a/data/wallets.ts b/data/wallets.ts index 1f4f640d..a1759c40 100644 --- a/data/wallets.ts +++ b/data/wallets.ts @@ -1,6 +1,8 @@ -type WalletEntry = { walletName: string; type: "injected" | "walletConnect" }; +type WalletEntry = { walletName: string; type: "injected" | "metaMask" | "walletConnect" }; export const confirmedSupportedWallets: WalletEntry[] = [ + { walletName: "MetaMask", type: "metaMask" }, + { walletName: "MetaMask", type: "injected" }, { walletName: "BitKeep", type: "injected" }, { walletName: "BlockWallet", type: "injected" }, diff --git a/package-lock.json b/package-lock.json index a19c89b1..7c9ef57c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,9 +23,8 @@ "@vitejs/plugin-vue": "^3.2.0", "@vueuse/core": "^10.2.0", "@vueuse/router": "^10.1.2", - "@wagmi/core": "^1.3.3", - "@web3modal/ethereum": "^2.6.2", - "@web3modal/html": "^2.6.2", + "@wagmi/core": "^1.4.3", + "@web3modal/wagmi": "^3.0.2", "cheerio": "^1.0.0-rc.12", "crypto-js": "^4.1.1", "dotenv": "^16.0.3", @@ -41,7 +40,7 @@ "sass": "^1.57.1", "semantic-release": "^21.1.1", "slugify": "^1.6.6", - "viem": "^1.2.6", + "viem": "^1.15.1", "vite": "^3.0.0", "vitest": "^0.15.2", "vue-tippy": "^6.0.0", @@ -782,9 +781,9 @@ } }, "node_modules/@coinbase/wallet-sdk": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-3.7.1.tgz", - "integrity": "sha512-LjyoDCB+7p0waQXfK+fUgcAs3Ezk6S6e+LYaoFjpJ6c9VTop3NyZF40Pi7df4z7QJohCwzuIDjz0Rhtig6Y7Pg==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-3.7.2.tgz", + "integrity": "sha512-lIGvXMsgpsQWci/XOMQIJ2nIZ8JUy/L+bvC0wkRaYarr0YylwpXrJ2gRM3hCXPS477pkyO7N/kSiAoRgEXUdJQ==", "dependencies": { "@metamask/safe-event-emitter": "2.0.0", "@solana/web3.js": "^1.70.1", @@ -2731,13 +2730,13 @@ } }, "node_modules/@motionone/animation": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.15.1.tgz", - "integrity": "sha512-mZcJxLjHor+bhcPuIFErMDNyrdb2vJur8lSfMCsuCB4UyV8ILZLvK+t+pg56erv8ud9xQGK/1OGPt10agPrCyQ==", + "version": "10.16.3", + "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.16.3.tgz", + "integrity": "sha512-QUGWpLbMFLhyqKlngjZhjtxM8IqiJQjLK0DF+XOF6od9nhSvlaeEpOY/UMCRVcZn/9Tr2rZO22EkuCIjYdI74g==", "dependencies": { - "@motionone/easing": "^10.15.1", - "@motionone/types": "^10.15.1", - "@motionone/utils": "^10.15.1", + "@motionone/easing": "^10.16.3", + "@motionone/types": "^10.16.3", + "@motionone/utils": "^10.16.3", "tslib": "^2.3.1" } }, @@ -2747,14 +2746,14 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@motionone/dom": { - "version": "10.16.2", - "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.16.2.tgz", - "integrity": "sha512-bnuHdNbge1FutZXv+k7xub9oPWcF0hsu8y1HTH/qg6av58YI0VufZ3ngfC7p2xhMJMnoh0LXFma2EGTgPeCkeg==", - "dependencies": { - "@motionone/animation": "^10.15.1", - "@motionone/generators": "^10.15.1", - "@motionone/types": "^10.15.1", - "@motionone/utils": "^10.15.1", + "version": "10.16.4", + "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.16.4.tgz", + "integrity": "sha512-HPHlVo/030qpRj9R8fgY50KTN4Ko30moWRTA3L3imrsRBmob93cTYmodln49HYFbQm01lFF7X523OkKY0DX6UA==", + "dependencies": { + "@motionone/animation": "^10.16.3", + "@motionone/generators": "^10.16.4", + "@motionone/types": "^10.16.3", + "@motionone/utils": "^10.16.3", "hey-listen": "^1.0.8", "tslib": "^2.3.1" } @@ -2765,11 +2764,11 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@motionone/easing": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.15.1.tgz", - "integrity": "sha512-6hIHBSV+ZVehf9dcKZLT7p5PEKHGhDwky2k8RKkmOvUoYP3S+dXsKupyZpqx5apjd9f+php4vXk4LuS+ADsrWw==", + "version": "10.16.3", + "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.16.3.tgz", + "integrity": "sha512-HWTMZbTmZojzwEuKT/xCdvoMPXjYSyQvuVM6jmM0yoGU6BWzsmYMeB4bn38UFf618fJCNtP9XeC/zxtKWfbr0w==", "dependencies": { - "@motionone/utils": "^10.15.1", + "@motionone/utils": "^10.16.3", "tslib": "^2.3.1" } }, @@ -2779,12 +2778,12 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@motionone/generators": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.15.1.tgz", - "integrity": "sha512-67HLsvHJbw6cIbLA/o+gsm7h+6D4Sn7AUrB/GPxvujse1cGZ38F5H7DzoH7PhX+sjvtDnt2IhFYF2Zp1QTMKWQ==", + "version": "10.16.4", + "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.16.4.tgz", + "integrity": "sha512-geFZ3w0Rm0ZXXpctWsSf3REGywmLLujEjxPYpBR0j+ymYwof0xbV6S5kGqqsDKgyWKVWpUInqQYvQfL6fRbXeg==", "dependencies": { - "@motionone/types": "^10.15.1", - "@motionone/utils": "^10.15.1", + "@motionone/types": "^10.16.3", + "@motionone/utils": "^10.16.3", "tslib": "^2.3.1" } }, @@ -2794,11 +2793,11 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@motionone/svelte": { - "version": "10.16.2", - "resolved": "https://registry.npmjs.org/@motionone/svelte/-/svelte-10.16.2.tgz", - "integrity": "sha512-38xsroKrfK+aHYhuQlE6eFcGy0EwrB43Q7RGjF73j/kRUTcLNu/LAaKiLLsN5lyqVzCgTBVt4TMT/ShWbTbc5Q==", + "version": "10.16.4", + "resolved": "https://registry.npmjs.org/@motionone/svelte/-/svelte-10.16.4.tgz", + "integrity": "sha512-zRVqk20lD1xqe+yEDZhMYgftsuHc25+9JSo+r0a0OWUJFocjSV9D/+UGhX4xgJsuwB9acPzXLr20w40VnY2PQA==", "dependencies": { - "@motionone/dom": "^10.16.2", + "@motionone/dom": "^10.16.4", "tslib": "^2.3.1" } }, @@ -2808,16 +2807,16 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@motionone/types": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.15.1.tgz", - "integrity": "sha512-iIUd/EgUsRZGrvW0jqdst8st7zKTzS9EsKkP+6c6n4MPZoQHwiHuVtTQLD6Kp0bsBLhNzKIBlHXponn/SDT4hA==" + "version": "10.16.3", + "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.16.3.tgz", + "integrity": "sha512-W4jkEGFifDq73DlaZs3HUfamV2t1wM35zN/zX7Q79LfZ2sc6C0R1baUHZmqc/K5F3vSw3PavgQ6HyHLd/MXcWg==" }, "node_modules/@motionone/utils": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.15.1.tgz", - "integrity": "sha512-p0YncgU+iklvYr/Dq4NobTRdAPv9PveRDUXabPEeOjBLSO/1FNB2phNTZxOxpi1/GZwYpAoECEa0Wam+nsmhSw==", + "version": "10.16.3", + "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.16.3.tgz", + "integrity": "sha512-WNWDksJIxQkaI9p9Z9z0+K27xdqISGNFy1SsWVGaiedTHq0iaT6iZujby8fT/ZnZxj1EOaxJtSfUPCFNU5CRoA==", "dependencies": { - "@motionone/types": "^10.15.1", + "@motionone/types": "^10.16.3", "hey-listen": "^1.0.8", "tslib": "^2.3.1" } @@ -2828,11 +2827,11 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@motionone/vue": { - "version": "10.16.2", - "resolved": "https://registry.npmjs.org/@motionone/vue/-/vue-10.16.2.tgz", - "integrity": "sha512-7/dEK/nWQXOkJ70bqb2KyNfSWbNvWqKKq1C8juj+0Mg/AorgD8O5wE3naddK0G+aXuNMqRuc4jlsYHHWHtIzVw==", + "version": "10.16.4", + "resolved": "https://registry.npmjs.org/@motionone/vue/-/vue-10.16.4.tgz", + "integrity": "sha512-z10PF9JV6SbjFq+/rYabM+8CVlMokgl8RFGvieSGNTmrkQanfHn+15XBrhG3BgUfvmTeSeyShfOHpG0i9zEdcg==", "dependencies": { - "@motionone/dom": "^10.16.2", + "@motionone/dom": "^10.16.4", "tslib": "^2.3.1" } }, @@ -4580,11 +4579,11 @@ } }, "node_modules/@safe-global/safe-gateway-typescript-sdk": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.10.0.tgz", - "integrity": "sha512-nhWjFRRgrGz4uZbyQ3Hgm4si1AixCWlnvi5WUCq/+V+e8EoA2Apj9xJEt8zzXvtELlddFqkH2sfTFy9LIjGXKg==", - "dependencies": { - "cross-fetch": "^3.1.5" + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.12.0.tgz", + "integrity": "sha512-hExCo62lScVC9/ztVqYEYL2pFxcqLTvB8fj0WtdP5FWrvbtEgD0pbVolchzD5bf85pbzvEwdAxSVS7EdCZxTNw==", + "engines": { + "node": ">=16" } }, "node_modules/@scure/base": { @@ -5047,9 +5046,9 @@ } }, "node_modules/@solana/web3.js": { - "version": "1.78.4", - "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.78.4.tgz", - "integrity": "sha512-up5VG1dK+GPhykmuMIozJZBbVqpm77vbOG6/r5dS7NBGZonwHfTLdBbsYc3rjmaQ4DpCXUa3tUc4RZHRORvZrw==", + "version": "1.78.5", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.78.5.tgz", + "integrity": "sha512-2ZHsDNqkKdglJQrIvJ3p2DmgS3cGnary3VJyqt9C1SPrpAtLYzcElr3xyXJOznyQTU/8AMw+GoF11lFoKbicKg==", "dependencies": { "@babel/runtime": "^7.22.6", "@noble/curves": "^1.0.0", @@ -5329,9 +5328,9 @@ } }, "node_modules/@types/debug": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", - "integrity": "sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.9.tgz", + "integrity": "sha512-8Hz50m2eoS56ldRlepxSBa6PWEVCtzUo/92HgLc2qTMnotJNIm7xP+UZhyWoYsyOdd5dxZ+NZLb24rsKyFs2ow==", "dependencies": { "@types/ms": "*" } @@ -5374,9 +5373,9 @@ "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==" }, "node_modules/@types/ms": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", - "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + "version": "0.7.32", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.32.tgz", + "integrity": "sha512-xPSg0jm4mqgEkNhowKgZFBNtwoEwF6gJ4Dhww+GFpm3IgtNseHQZ5IqdNwnquZEoANxyDAKDRAdVo4Z72VvD/g==" }, "node_modules/@types/node": { "version": "20.5.9", @@ -5401,9 +5400,9 @@ "dev": true }, "node_modules/@types/trusted-types": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.3.tgz", - "integrity": "sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.4.tgz", + "integrity": "sha512-IDaobHimLQhjwsQ/NMwRVfa/yL7L/wriQPMhw1ZJall0KX6E1oxk29XMDeilW5qTIg5aoiqf5Udy8U/51aNoQQ==" }, "node_modules/@types/uuid": { "version": "8.3.4", @@ -6141,9 +6140,9 @@ } }, "node_modules/@wagmi/connectors": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@wagmi/connectors/-/connectors-3.1.1.tgz", - "integrity": "sha512-ewOV40AlrXcX018qckU0V9OCsDgHhs+KZjQJZhlplqRtc2ijjS62B5kcypXkcTtfU5qXUBA9KEwPsSTxGdT4ag==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@wagmi/connectors/-/connectors-3.1.2.tgz", + "integrity": "sha512-IlLKErqCzQRBUcCvXGPowcczbWcvJtEG006gPsAoePNJEXCHEWoKASghgu+L/bqD7006Z6mW6zlTNjcSQJvFAg==", "funding": [ { "type": "gitcoin", @@ -6159,10 +6158,10 @@ "@ledgerhq/connect-kit-loader": "^1.1.0", "@safe-global/safe-apps-provider": "^0.17.1", "@safe-global/safe-apps-sdk": "^8.0.0", - "@walletconnect/ethereum-provider": "2.10.0", + "@walletconnect/ethereum-provider": "2.10.1", "@walletconnect/legacy-provider": "^2.0.0", - "@walletconnect/modal": "2.6.1", - "@walletconnect/utils": "2.10.0", + "@walletconnect/modal": "2.6.2", + "@walletconnect/utils": "2.10.1", "abitype": "0.8.7", "eventemitter3": "^4.0.7" }, @@ -6177,9 +6176,9 @@ } }, "node_modules/@wagmi/core": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@wagmi/core/-/core-1.4.1.tgz", - "integrity": "sha512-b6LDFL0vZSCNcIHjnJzv++hakavTTt1/2WEQg2S5eEnaHTp7UoQlwfCyjKeiBhRih4yF34N06ea8cyEVjyjXrw==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@wagmi/core/-/core-1.4.3.tgz", + "integrity": "sha512-CIV9jwv5ue+WpqmA3FvwGa+23cppe7oIaz6TRnlGm0Hm0wDImSaQSWqcsFyOPvleD29oOIJ8e3KnHINEvI64AA==", "funding": [ { "type": "gitcoin", @@ -6191,7 +6190,7 @@ } ], "dependencies": { - "@wagmi/connectors": "3.1.1", + "@wagmi/connectors": "3.1.2", "abitype": "0.8.7", "eventemitter3": "^4.0.7", "zustand": "^4.3.1" @@ -6207,9 +6206,9 @@ } }, "node_modules/@walletconnect/core": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.10.0.tgz", - "integrity": "sha512-Z8pdorfIMueuiBXLdnf7yloiO9JIiobuxN3j0OTal+MYc4q5/2O7d+jdD1DAXbLi1taJx3x60UXT/FPVkjIqIQ==", + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.10.1.tgz", + "integrity": "sha512-WAoXfmj+Zy5q48TnrKUjmHXJCBahzKwbul+noepRZf7JDtUAZ9IOWpUjg+UPRbfK5EiWZ0TF42S6SXidf7EHoQ==", "dependencies": { "@walletconnect/heartbeat": "1.2.1", "@walletconnect/jsonrpc-provider": "1.0.13", @@ -6222,8 +6221,8 @@ "@walletconnect/relay-auth": "^1.0.4", "@walletconnect/safe-json": "^1.0.2", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.10.0", - "@walletconnect/utils": "2.10.0", + "@walletconnect/types": "2.10.1", + "@walletconnect/utils": "2.10.1", "events": "^3.3.0", "lodash.isequal": "4.5.0", "uint8arrays": "^3.1.0" @@ -6261,18 +6260,18 @@ } }, "node_modules/@walletconnect/ethereum-provider": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@walletconnect/ethereum-provider/-/ethereum-provider-2.10.0.tgz", - "integrity": "sha512-NyTm7RcrtAiSaYQPh6G4sOtr1kg/pL5Z3EDE6rBTV3Se5pMsYvtuwMiSol7MidsQpf4ux9HFhthTO3imcoWImw==", + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@walletconnect/ethereum-provider/-/ethereum-provider-2.10.1.tgz", + "integrity": "sha512-Yhoz8EXkKzxOlBT6G+elphqCx/gkH6RxD9/ZAiy9lLc8Ng5p1gvKCVVP5zsGNE9FbkKmHd+J9JJRzn2Bw2yqtQ==", "dependencies": { "@walletconnect/jsonrpc-http-connection": "^1.0.7", "@walletconnect/jsonrpc-provider": "^1.0.13", "@walletconnect/jsonrpc-types": "^1.0.3", "@walletconnect/jsonrpc-utils": "^1.0.8", - "@walletconnect/sign-client": "2.10.0", - "@walletconnect/types": "2.10.0", - "@walletconnect/universal-provider": "2.10.0", - "@walletconnect/utils": "2.10.0", + "@walletconnect/sign-client": "2.10.1", + "@walletconnect/types": "2.10.1", + "@walletconnect/universal-provider": "2.10.1", + "@walletconnect/utils": "2.10.1", "events": "^3.3.0" }, "peerDependencies": { @@ -6451,29 +6450,29 @@ } }, "node_modules/@walletconnect/modal": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@walletconnect/modal/-/modal-2.6.1.tgz", - "integrity": "sha512-G84tSzdPKAFk1zimgV7JzIUFT5olZUVtI3GcOk77OeLYjlMfnDT23RVRHm5EyCrjkptnvpD0wQScXePOFd2Xcw==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@walletconnect/modal/-/modal-2.6.2.tgz", + "integrity": "sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA==", "dependencies": { - "@walletconnect/modal-core": "2.6.1", - "@walletconnect/modal-ui": "2.6.1" + "@walletconnect/modal-core": "2.6.2", + "@walletconnect/modal-ui": "2.6.2" } }, "node_modules/@walletconnect/modal-core": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@walletconnect/modal-core/-/modal-core-2.6.1.tgz", - "integrity": "sha512-f2hYlJ5pwzGvjyaZ6BoGR5uiMgXzWXt6w6ktt1N8lmY6PiYp8whZgqx2hTxVWwVlsGnaIfh6UHp1hGnANx0eTQ==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@walletconnect/modal-core/-/modal-core-2.6.2.tgz", + "integrity": "sha512-cv8ibvdOJQv2B+nyxP9IIFdxvQznMz8OOr/oR/AaUZym4hjXNL/l1a2UlSQBXrVjo3xxbouMxLb3kBsHoYP2CA==", "dependencies": { - "valtio": "1.11.0" + "valtio": "1.11.2" } }, "node_modules/@walletconnect/modal-ui": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@walletconnect/modal-ui/-/modal-ui-2.6.1.tgz", - "integrity": "sha512-RFUOwDAMijSK8B7W3+KoLKaa1l+KEUG0LCrtHqaB0H0cLnhEGdLR+kdTdygw+W8+yYZbkM5tXBm7MlFbcuyitA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@walletconnect/modal-ui/-/modal-ui-2.6.2.tgz", + "integrity": "sha512-rbdstM1HPGvr7jprQkyPggX7rP4XiCG85ZA+zWBEX0dVQg8PpAgRUqpeub4xQKDgY7pY/xLRXSiCVdWGqvG2HA==", "dependencies": { - "@walletconnect/modal-core": "2.6.1", - "lit": "2.7.6", + "@walletconnect/modal-core": "2.6.2", + "lit": "2.8.0", "motion": "10.16.2", "qrcode": "1.5.3" } @@ -6520,18 +6519,18 @@ } }, "node_modules/@walletconnect/sign-client": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.10.0.tgz", - "integrity": "sha512-hbDljDS53kR/It3oXD91UkcOsT6diNnW5+Zzksm0YEfwww5dop/YfNlcdnc8+jKUhWOL/YDPNQCjzsCSNlVzbw==", + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.10.1.tgz", + "integrity": "sha512-iG3eJGi1yXeG3xGeVSSMf8wDFyx239B0prLQfy1uYDtYFb2ynnH/09oqAZyKn96W5nfQzUgM2Mz157PVdloH3Q==", "dependencies": { - "@walletconnect/core": "2.10.0", + "@walletconnect/core": "2.10.1", "@walletconnect/events": "^1.0.1", "@walletconnect/heartbeat": "1.2.1", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/logger": "^2.0.1", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.10.0", - "@walletconnect/utils": "2.10.0", + "@walletconnect/types": "2.10.1", + "@walletconnect/utils": "2.10.1", "events": "^3.3.0" } }, @@ -6544,9 +6543,9 @@ } }, "node_modules/@walletconnect/types": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.10.0.tgz", - "integrity": "sha512-kSTA/WZnbKdEbvbXSW16Ty6dOSzOZCHnGg6JH7q1MuraalD2HuNg00lVVu7QAZ/Rj1Gn9DAkrgP5Wd5a8Xq//Q==", + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.10.1.tgz", + "integrity": "sha512-7pccAhajQdiH2kYywjE1XI64IqRI+4ioyGy0wvz8d0UFQ/DSG3MLKR8jHf5aTOafQQ/HRLz6xvlzN4a7gIVkUQ==", "dependencies": { "@walletconnect/events": "^1.0.1", "@walletconnect/heartbeat": "1.2.1", @@ -6557,25 +6556,25 @@ } }, "node_modules/@walletconnect/universal-provider": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.10.0.tgz", - "integrity": "sha512-jtVWf+AeTCqBcB3lCmWkv3bvSmdRCkQdo67GNoT5y6/pvVHMxfjgrJNBOUsWQMxpREpWDpZ993X0JRjsYVsMcA==", + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.10.1.tgz", + "integrity": "sha512-81QxTH/X4dRoYCz0U9iOrBYOcj7N897ONcB57wsGhEkV7Rc9htmWJq2CzeOuxvVZ+pNZkE+/aw9LrhizO1Ltxg==", "dependencies": { "@walletconnect/jsonrpc-http-connection": "^1.0.7", "@walletconnect/jsonrpc-provider": "1.0.13", "@walletconnect/jsonrpc-types": "^1.0.2", "@walletconnect/jsonrpc-utils": "^1.0.7", "@walletconnect/logger": "^2.0.1", - "@walletconnect/sign-client": "2.10.0", - "@walletconnect/types": "2.10.0", - "@walletconnect/utils": "2.10.0", + "@walletconnect/sign-client": "2.10.1", + "@walletconnect/types": "2.10.1", + "@walletconnect/utils": "2.10.1", "events": "^3.3.0" } }, "node_modules/@walletconnect/utils": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.10.0.tgz", - "integrity": "sha512-9GRyEz/7CJW+G04RvrjPET5k7hOEsB9b3fF9cWDk/iDCxSWpbkU/hv/urRB36C+gvQMAZgIZYX3dHfzJWkY/2g==", + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.10.1.tgz", + "integrity": "sha512-DM0dKgm9O58l7VqJEyV2OVv16XRePhDAReI23let6WdW1dSpw/Y/A89Lp99ZJOjLm2FxyblMRF3YRaZtHwBffw==", "dependencies": { "@stablelib/chacha20poly1305": "1.0.1", "@stablelib/hkdf": "1.0.1", @@ -6585,7 +6584,7 @@ "@walletconnect/relay-api": "^1.0.9", "@walletconnect/safe-json": "^1.0.2", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.10.0", + "@walletconnect/types": "2.10.1", "@walletconnect/window-getters": "^1.0.1", "@walletconnect/window-metadata": "^1.0.1", "detect-browser": "5.3.0", @@ -6628,42 +6627,72 @@ } }, "node_modules/@web3modal/core": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@web3modal/core/-/core-2.7.1.tgz", - "integrity": "sha512-eFWR1tK1qN4FguhaZq2VW0AVr8DC/Fox2eJnK1eTfk32hxSgUtl8wr5fVM8EoLeoapQ7Zcc0SNg/QLuLQ9t2tA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@web3modal/core/-/core-3.0.2.tgz", + "integrity": "sha512-Dr7ikLOgUPz3W66mCqu48Ca/GIn26Dj1CaRxIbKJzcHfMiumGGYgZRIElxAkGh9qaEMW+EylC3fIE8sPHFA1cg==", "dependencies": { - "valtio": "1.11.0" + "valtio": "1.11.2" } }, - "node_modules/@web3modal/ethereum": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@web3modal/ethereum/-/ethereum-2.7.1.tgz", - "integrity": "sha512-1x3qhYh9qgtvw1MDQD4VeDf2ZOsVANKRPtUty4lF+N4L8xnAIwvNKUAMA4j6T5xSsjqUfq5Tdy5mYsNxLmsWMA==", - "peerDependencies": { - "@wagmi/core": ">=1", - "viem": ">=1" + "node_modules/@web3modal/polyfills": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@web3modal/polyfills/-/polyfills-3.0.2.tgz", + "integrity": "sha512-Br1TfkqYPLdscwJx8ZBQUMZPJ1twdNygtJrdGwU5pcrjExxN80fIrBtfMuAu0yBB/4nlNVG8tw91FZJXUKK8ew==", + "dependencies": { + "buffer": "6.0.3" } }, - "node_modules/@web3modal/html": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@web3modal/html/-/html-2.7.1.tgz", - "integrity": "sha512-/psh2p6c6VVFTWUhS/dbGCM9Q0/9x/EY6MWyqLD7+3EGNcz7XTHs8YfpflHjq2rDUNt6E56wM5dT+JRKV7Vkjw==", + "node_modules/@web3modal/scaffold": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@web3modal/scaffold/-/scaffold-3.0.2.tgz", + "integrity": "sha512-pJwm5aooVGf5CEEgypuveTicbs+a7FNwm0ru98KiJ7XUivprr2Ufu0ZXVX/n3/NQcu7SDx9UnuPUTK1HeQQnrw==", "dependencies": { - "@web3modal/core": "2.7.1", - "@web3modal/ui": "2.7.1" + "@web3modal/core": "3.0.2", + "@web3modal/ui": "3.0.2", + "lit": "2.8.0" } }, "node_modules/@web3modal/ui": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@web3modal/ui/-/ui-2.7.1.tgz", - "integrity": "sha512-JpGJbLAl/Wmuyyn+JwuwtlPD8mUW2HV/gsSxKWZoElgjbfDY4vjHo9PH2G++2HhugISfzjawp43r8lP/hWgWOQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@web3modal/ui/-/ui-3.0.2.tgz", + "integrity": "sha512-xGzbYdmzy6az6FmiJ507Hh1nBjD1llaudPlpA6Gipm/4XikSCNe3wOdH0+gQaKRqvGTFaoVrtej1Vgnoil64Og==", "dependencies": { - "@web3modal/core": "2.7.1", - "lit": "2.7.6", - "motion": "10.16.2", + "lit": "2.8.0", "qrcode": "1.5.3" } }, + "node_modules/@web3modal/wagmi": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@web3modal/wagmi/-/wagmi-3.0.2.tgz", + "integrity": "sha512-hYpfbAbnt/dZkjOyJLBMyk0NKip3qW8Yj8suSDm6mf01+GBYWVw2BDYBtx5C0biQxSoxR7kWu4BGzA0qAQNPJQ==", + "dependencies": { + "@web3modal/polyfills": "3.0.2", + "@web3modal/scaffold": "3.0.2" + }, + "optionalDependencies": { + "react": ">=17", + "react-dom": ">=17", + "vue": ">=3" + }, + "peerDependencies": { + "@wagmi/core": ">=1", + "react": ">=17", + "react-dom": ">=17", + "viem": ">=1", + "vue": ">=3" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "vue": { + "optional": true + } + } + }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -13110,9 +13139,9 @@ "dev": true }, "node_modules/keccak": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.3.tgz", - "integrity": "sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", + "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", "hasInstallScript": true, "dependencies": { "node-addon-api": "^2.0.0", @@ -13456,13 +13485,13 @@ "dev": true }, "node_modules/lit": { - "version": "2.7.6", - "resolved": "https://registry.npmjs.org/lit/-/lit-2.7.6.tgz", - "integrity": "sha512-1amFHA7t4VaaDe+vdQejSVBklwtH9svGoG6/dZi9JhxtJBBlqY5D1RV7iLUYY0trCqQc4NfhYYZilZiVHt7Hxg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit/-/lit-2.8.0.tgz", + "integrity": "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==", "dependencies": { "@lit/reactive-element": "^1.6.0", "lit-element": "^3.3.0", - "lit-html": "^2.7.0" + "lit-html": "^2.8.0" } }, "node_modules/lit-element": { @@ -13714,7 +13743,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "peer": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -19147,9 +19175,9 @@ } }, "node_modules/preact": { - "version": "10.17.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.17.1.tgz", - "integrity": "sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA==", + "version": "10.18.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.18.1.tgz", + "integrity": "sha512-mKUD7RRkQQM6s7Rkmi7IFkoEHjuFqRQUaXamO61E6Nn7vqF/bo7EZCmSyrUnp2UWHw0O7XjZ2eeXis+m7tf4lg==", "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -19732,7 +19760,6 @@ "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", - "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -19740,6 +19767,19 @@ "node": ">=0.10.0" } }, + "node_modules/react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "optional": true, + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + }, + "peerDependencies": { + "react": "^18.2.0" + } + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -20425,9 +20465,9 @@ } }, "node_modules/rpc-websockets/node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "engines": { "node": ">=10.0.0" }, @@ -20578,6 +20618,15 @@ "node": ">=v12.22.7" } }, + "node_modules/scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "optional": true, + "dependencies": { + "loose-envify": "^1.1.0" + } + }, "node_modules/scrypt-js": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", @@ -23418,9 +23467,9 @@ } }, "node_modules/valtio": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/valtio/-/valtio-1.11.0.tgz", - "integrity": "sha512-65Yd0yU5qs86b5lN1eu/nzcTgQ9/6YnD6iO+DDaDbQLn1Zv2w12Gwk43WkPlUBxk5wL/6cD5YMFf7kj6HZ1Kpg==", + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/valtio/-/valtio-1.11.2.tgz", + "integrity": "sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw==", "dependencies": { "proxy-compare": "2.5.1", "use-sync-external-store": "1.2.0" @@ -23429,9 +23478,13 @@ "node": ">=12.20.0" }, "peerDependencies": { + "@types/react": ">=16.8", "react": ">=16.8" }, "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, "react": { "optional": true } @@ -23458,9 +23511,15 @@ "dev": true }, "node_modules/viem": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/viem/-/viem-1.10.4.tgz", - "integrity": "sha512-GRnz1KLWh7rDFvR0fMUBt8orVu/QbGJ3QqlLo7M71H4rig39TvjDoVyMp7eFK18+Zs6niqev1f8woX9fv3cwVg==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/viem/-/viem-1.15.1.tgz", + "integrity": "sha512-lxk8wwUK7ZivYAUZ6pH+9Y6jjrfXXjafCOoASa4lw3ULUCT2BajU4SELarlxJQimpsFd7OZD4m4iEXYLF/bt6w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wagmi-dev" + } + ], "dependencies": { "@adraffy/ens-normalize": "1.9.4", "@noble/curves": "1.2.0", diff --git a/package.json b/package.json index 3184e134..67896183 100644 --- a/package.json +++ b/package.json @@ -78,9 +78,8 @@ "@vitejs/plugin-vue": "^3.2.0", "@vueuse/core": "^10.2.0", "@vueuse/router": "^10.1.2", - "@wagmi/core": "^1.3.3", - "@web3modal/ethereum": "^2.6.2", - "@web3modal/html": "^2.6.2", + "@wagmi/core": "^1.4.3", + "@web3modal/wagmi": "^3.0.2", "cheerio": "^1.0.0-rc.12", "crypto-js": "^4.1.1", "dotenv": "^16.0.3", @@ -96,7 +95,7 @@ "sass": "^1.57.1", "semantic-release": "^21.1.1", "slugify": "^1.6.6", - "viem": "^1.2.6", + "viem": "^1.15.1", "vite": "^3.0.0", "vitest": "^0.15.2", "vue-tippy": "^6.0.0", diff --git a/pages/transaction/zksync/era/index.vue b/pages/transaction/zksync/era/index.vue index 72e32971..34ff9cb9 100644 --- a/pages/transaction/zksync/era/index.vue +++ b/pages/transaction/zksync/era/index.vue @@ -60,13 +60,6 @@ target="_blank" href="https://www.layerswap.io/?sourceExchangeName=ZKSYNCERA_MAINNET" /> - - - diff --git a/pages/transaction/zksync/lite/index.vue b/pages/transaction/zksync/lite/index.vue index 3f7c8240..960f8f5b 100644 --- a/pages/transaction/zksync/lite/index.vue +++ b/pages/transaction/zksync/lite/index.vue @@ -24,12 +24,6 @@ :to="{ name: 'transaction-zksync-lite-withdraw', query: $route.query }" :description="`Withdraw to ${destinations.ethereum.label}`" /> - - - Send to another network - - - - - Sell tokens for cash - - - diff --git a/pages/transaction/zksync/lite/send-era.vue b/pages/transaction/zksync/lite/send-era.vue index e21c1821..a5fcd9c3 100644 --- a/pages/transaction/zksync/lite/send-era.vue +++ b/pages/transaction/zksync/lite/send-era.vue @@ -3,25 +3,10 @@

Choose provider

- - - + - + diff --git a/store/destinations.ts b/store/destinations.ts index 3183bc64..b66340bf 100644 --- a/store/destinations.ts +++ b/store/destinations.ts @@ -38,16 +38,6 @@ export const useDestinationsStore = defineStore("destinations", () => { label: "Layerswap", iconUrl: "/img/layerswap.svg", }, - orbiter: { - key: "orbiter", - label: "Orbiter", - iconUrl: "/img/orbiter.svg", - }, - banxa: { - key: "banxa", - label: "Banxa", - iconUrl: "/img/banxa.svg", - }, ramp: { key: "ramp", label: "Ramp", diff --git a/store/onboard.ts b/store/onboard.ts index e2d85760..8cbf19cb 100644 --- a/store/onboard.ts +++ b/store/onboard.ts @@ -1,8 +1,20 @@ -import { configureChains, createConfig, getPublicClient, getWalletClient } from "@wagmi/core"; +import { + configureChains, + createConfig, + getAccount, + getNetwork, + getPublicClient, + getWalletClient, + InjectedConnector, + switchNetwork as switchWalletNetwork, + disconnect as walletDisconnect, + watchAccount, + watchNetwork, +} from "@wagmi/core"; import { zkSync, zkSyncTestnet } from "@wagmi/core/chains"; +import { WalletConnectConnector } from "@wagmi/core/connectors/walletConnect"; import { publicProvider } from "@wagmi/core/providers/public"; -import { EthereumClient, w3mConnectors } from "@web3modal/ethereum"; -import { Web3Modal } from "@web3modal/html"; +import { createWeb3Modal } from "@web3modal/wagmi"; import { defineStore, storeToRefs } from "pinia"; import useColorMode from "@/composables/useColorMode"; @@ -63,67 +75,72 @@ export const useOnboardStore = defineStore("onboard", () => { const { selectedNetwork, l1Network } = storeToRefs(useNetworkStore()); const { publicClient } = configureChains(extendedChains, [publicProvider()]); - const wagmiClient = createConfig({ + const metadata = { + name: "zkSync Portal", + description: + "zkSync Portal provides all the required tools for working with Era and Lite networks such as Wallet, Bridge & Faucet functionality.", + url: "https://portal.zksync.io", + icons: ["https://portal.zksync.io/icon.png"], + }; + const wagmiConfig = createConfig({ autoConnect: true, - connectors: w3mConnectors({ - projectId: env.walletConnectProjectID, - chains: extendedChains, - }), + connectors: [ + new WalletConnectConnector({ + chains: extendedChains, + options: { projectId: env.walletConnectProjectID, showQrModal: false, metadata }, + }), + new InjectedConnector({ chains: extendedChains, options: { shimDisconnect: true } }), + ], publicClient, }); - const ethereumClient = new EthereumClient(wagmiClient, extendedChains); - const account = ref(ethereumClient.getAccount()); - const network = ref(ethereumClient.getNetwork()); + const account = ref(getAccount()); + const network = ref(getNetwork()); const connectingWalletError = ref(); - const connectorName = ref(wagmiClient.connector?.name); + const connectorName = ref(wagmiConfig.connector?.name); const walletName = ref(); const walletNotSupported = computed(() => { - if (!walletName.value || !wagmiClient.connector) return false; + if (!walletName.value || !wagmiConfig.connector) return false; const isWalletNotSupported = !confirmedSupportedWallets.find( - (wallet) => wallet.walletName === walletName.value && wallet.type === wagmiClient.connector?.id + (wallet) => wallet.walletName === walletName.value && wallet.type === wagmiConfig.connector?.id ); return isWalletNotSupported; }); const identifyWalletName = async () => { - const provider = await wagmiClient.connector?.getProvider(); + const provider = await wagmiConfig.connector?.getProvider(); const name = provider?.session?.peer?.metadata?.name; - if (!name && wagmiClient.connector?.name !== "WalletConnect") { - walletName.value = wagmiClient.connector?.name.replace(/ Wallet$/, "").trim(); + if (!name && wagmiConfig.connector?.name !== "WalletConnect") { + walletName.value = wagmiConfig.connector?.name.replace(/ Wallet$/, "").trim(); } else { walletName.value = name?.replace(/ Wallet$/, "").trim(); } - if (walletName.value && wagmiClient.connector) { + if (walletName.value && wagmiConfig.connector) { const isWalletDisabled = !!disabledWallets.find( - (wallet) => wallet.walletName === walletName.value && wallet.type === wagmiClient.connector?.id + (wallet) => wallet.walletName === walletName.value && wallet.type === wagmiConfig.connector?.id ); if (isWalletDisabled) throw new Error(`Unfortunately ${walletName.value} wallet is not supported at the moment!`); } }; identifyWalletName(); - const web3modal = new Web3Modal( - { - projectId: env.walletConnectProjectID, - enableNetworkView: false, - enableAccountView: false, - themeMode: selectedColorMode.value, - explorerRecommendedWalletIds: [ - "c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96", - "971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709", - "38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662", - "1aa28414c95f5024133faf5766d376bb9c853c280d158cd3e22dc2b7b0a95a2d", - "7674bb4e353bf52886768a3ddc2a4562ce2f4191c80831291218ebd90f5f5e26", - ], - explorerExcludedWalletIds: ["bc949c5d968ae81310268bf9193f9c9fb7bb4e1283e1284af8f2bd4992535fd6"], - - termsOfServiceUrl: "https://zksync.io/terms", - privacyPolicyUrl: "https://zksync.io/privacy", - }, - ethereumClient - ); - ethereumClient.watchAccount(async (updatedAccount) => { + + const web3modal = createWeb3Modal({ + wagmiConfig, + projectId: env.walletConnectProjectID, + chains: extendedChains, + excludeWalletIds: ["bc949c5d968ae81310268bf9193f9c9fb7bb4e1283e1284af8f2bd4992535fd6"], + featuredWalletIds: [ + "971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709", + "38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662", + "1aa28414c95f5024133faf5766d376bb9c853c280d158cd3e22dc2b7b0a95a2d", + ], + termsConditionsUrl: "https://zksync.io/terms", + privacyPolicyUrl: "https://zksync.io/privacy", + themeMode: selectedColorMode.value, + }); + + watchAccount(async (updatedAccount) => { // There is a bug in @wagmi/core@0.10.11 or @web3modal/ethereum@^2.3.7 // On page update or after using `ethereumClient.disconnect` method // the account state is replaced with "connecting" state @@ -133,7 +150,7 @@ export const useOnboardStore = defineStore("onboard", () => { try { await identifyWalletName(); account.value = updatedAccount; - connectorName.value = wagmiClient.connector?.name; + connectorName.value = wagmiConfig.connector?.name; } catch (err) { disconnect(); const error = formatError(err as Error); @@ -142,18 +159,16 @@ export const useOnboardStore = defineStore("onboard", () => { } } }); - ethereumClient.watchNetwork((updatedNetwork) => { + watchNetwork((updatedNetwork) => { network.value = updatedNetwork; }); watch(selectedColorMode, (colorMode) => { - web3modal.setTheme({ - themeMode: colorMode, - }); + web3modal.setThemeMode(colorMode); }); - const openModal = () => web3modal.openModal(); + const openModal = () => web3modal.open(); const disconnect = () => { - ethereumClient.disconnect(); + walletDisconnect(); }; const isCorrectNetworkSet = computed(() => { @@ -162,7 +177,7 @@ export const useOnboardStore = defineStore("onboard", () => { }); const switchNetworkById = async (chainId: number, networkName?: string) => { try { - await ethereumClient.switchNetwork({ chainId }); + await switchWalletNetwork({ chainId }); } catch (err) { if (err instanceof Error && err.message.includes("does not support programmatic chain switching")) { throw new Error(`Please switch network manually to "${networkName}" in your ${walletName.value} wallet`); diff --git a/tests/e2e/features/artifacts/mainPage/artifacts-header.feature b/tests/e2e/features/artifacts/mainPage/artifacts-header.feature index a3354008..aeeb5bd5 100644 --- a/tests/e2e/features/artifacts/mainPage/artifacts-header.feature +++ b/tests/e2e/features/artifacts/mainPage/artifacts-header.feature @@ -44,8 +44,6 @@ Feature: Artifacts - UI Then Element with "text" "Top-up from another network" should be "visible" Then Element with "text" "Layerswap" should be "visible" Then Element with "href" "https://www.layerswap.io/?destNetwork=ZKSYNCERA_MAINNET" should be "visible" - Then Element with "text" "Orbiter" should be "visible" - Then Element with "href" "https://www.orbiter.finance/?dest=zkSync%20Era" should be "clickable" @id1352 Scenario: Check artifacts on the Receive Address (QR) page diff --git a/tests/e2e/features/artifacts/whereToSendPage/artifacts.feature b/tests/e2e/features/artifacts/whereToSendPage/artifacts.feature index 3662acca..5b58bf08 100644 --- a/tests/e2e/features/artifacts/whereToSendPage/artifacts.feature +++ b/tests/e2e/features/artifacts/whereToSendPage/artifacts.feature @@ -37,11 +37,6 @@ Feature: Artifacts - UI Then Element with "text" "Layerswap" should be "clickable" Then Element with "partial src" "/img/layerswap.svg" should be "visible" Then Element with "partial src" "/img/layerswap.svg" should be "clickable" - #Orbiter item - Then Element with "text" "Orbiter" should be "visible" - Then Element with "text" "Orbiter" should be "clickable" - Then Element with "partial src" "/img/orbiter.svg" should be "visible" - Then Element with "partial src" "/img/orbiter.svg" should be "clickable" @id1560:II @testnet Scenario Outline: Check artifacts for an "Where to send" page (Testnet) @@ -87,11 +82,6 @@ Feature: Artifacts - UI Then Element with "text" "Layerswap" should be "clickable" Then Element with "partial src" "/img/layerswap.svg" should be "visible" Then Element with "partial src" "/img/layerswap.svg" should be "clickable" - #Orbiter item - Then Element with "text" "Orbiter" should be "visible" - Then Element with "text" "Orbiter" should be "clickable" - Then Element with "partial src" "/img/orbiter.svg" should be "visible" - Then Element with "partial src" "/img/orbiter.svg" should be "clickable" @id1411:II @mainnet Scenario Outline: Check artifacts for an "Where to send" page (Mainnet) diff --git a/tests/e2e/features/redirection/mainPage/redirection.feature b/tests/e2e/features/redirection/mainPage/redirection.feature index 2b4d86fa..5da2cab3 100644 --- a/tests/e2e/features/redirection/mainPage/redirection.feature +++ b/tests/e2e/features/redirection/mainPage/redirection.feature @@ -295,7 +295,6 @@ Feature: External Redirection on the Main Page Examples: | Service name | url | | Layerswap | https://www.layerswap.io/app?sourceExchangeName=ZKSYNCERA_MAINNET | - | Orbiter | https://www.orbiter.finance/?source=zkSync%20Era&dest=Ethereum | @id1610 Scenario: Check redirection for the "Explore ecosystem" button (Withdraw Bridge) diff --git a/tests/e2e/features/transactions/deposit/bridge-deposit-with-blockchain.feature b/tests/e2e/features/transactions/deposit/bridge-deposit-with-blockchain.feature index 4af0df9d..5342499d 100644 --- a/tests/e2e/features/transactions/deposit/bridge-deposit-with-blockchain.feature +++ b/tests/e2e/features/transactions/deposit/bridge-deposit-with-blockchain.feature @@ -39,5 +39,5 @@ Feature: Deposit Then Element with "text" " Explore ecosystem " should be "visible" #id1609 Check "Explore ecosystem" button Then I click by "text" with " Explore ecosystem " value - Then New page has "https://ecosystem.zksync.io/" address + Then New page has "https://zksync.dappradar.com/" address \ No newline at end of file diff --git a/tests/e2e/src/pages/login.page.ts b/tests/e2e/src/pages/login.page.ts index 0b6c4274..bd5bd697 100644 --- a/tests/e2e/src/pages/login.page.ts +++ b/tests/e2e/src/pages/login.page.ts @@ -33,7 +33,7 @@ export class LoginPage extends BasePage { await this.world.page?.waitForSelector(this.loginBtn); await this.world.page?.locator(this.loginBtn).click(config.increasedTimeout); //click a login button - const popUp = await new MetamaskPage(this.world).catchPopUpByClick("w3m-wallet-image"); + const popUp = await new MetamaskPage(this.world).catchPopUpByClick(":text('Browser Wallet')"); await popUp?.locator(metamaskPage.unlockPasswordField).isVisible(config.defaultTimeout); await popUp?.setViewportSize(config.popUpWindowSize); const passwordFieldVisible = await popUp diff --git a/tests/e2e/src/pages/main.page.ts b/tests/e2e/src/pages/main.page.ts index ce949324..cbe8d6b1 100644 --- a/tests/e2e/src/pages/main.page.ts +++ b/tests/e2e/src/pages/main.page.ts @@ -232,10 +232,6 @@ export class MainPage extends BasePage { link = "https://www.layerswap.io/?sourceExchangeName=ZKSYNCERA_MAINNET"; const selector = `//*[contains(@href,'${link}')]` + this.externalLinkArrow; await this.verifyElement("xpath", selector, checkType); - } else if (externalLinkName === "Orbiter") { - link = "https://www.orbiter.finance/?source=zkSync%20Era"; - const selector = `//*[contains(@href,'${link}')]` + this.externalLinkArrow; - await this.verifyElement("xpath", selector, checkType); } else if (externalLinkName === "Transfer" || externalLinkName === "Withdraw") { link = "https://goerli.explorer.zksync.io/tx"; const selector = this.modalCard + `//*[contains(@href,'${link}')]` + this.externalLinkArrow;