From 6a6f3e8a2d3c0bdb95d8b41bf0a032e98a35a6a6 Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Wed, 29 May 2024 13:34:30 +0100 Subject: [PATCH 01/77] Add seif, tailwind and compass wallet connectors --- package.json | 17 +- src/assets/logos/compassWallet.svg | 8 + src/assets/logos/seifWallet.svg | 12 + .../menu/mainMenu/MainMenuRightWallet.tsx | 9 + src/config/sei/common.ts | 8 +- src/libs/web3/web3.connectors.ts | 83 +- src/libs/web3/web3.constants.ts | 5 +- src/libs/web3/web3.utils.ts | 19 + yarn.lock | 791 ++++++++++++++++-- 9 files changed, 854 insertions(+), 98 deletions(-) create mode 100644 src/assets/logos/compassWallet.svg create mode 100644 src/assets/logos/seifWallet.svg diff --git a/package.json b/package.json index 8b4b85c69..0571e155f 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@playwright/test": "^1.43.1", "@sentry/react": "^7.48.0", "@sentry/vite-plugin": "^0.7.2", + "@tailwindzone/connect-web3-react": "^1.0.0", "@tanstack/react-query": "^4.14.5", "@tanstack/react-query-devtools": "^4.14.5", "@tanstack/react-router": "^1.4.9", @@ -37,13 +38,15 @@ "@typescript-eslint/parser": "^5.59.9", "@vitejs/plugin-react": "^3.1.0", "@walletconnect/ethereum-provider": "^2.9.2", - "@web3-react/coinbase-wallet": "8.2.2", - "@web3-react/core": "8.2.2", - "@web3-react/gnosis-safe": "8.2.3", - "@web3-react/metamask": "8.2.3", - "@web3-react/network": "8.2.2", - "@web3-react/types": "8.2.2", - "@web3-react/walletconnect-v2": "^8.5.0", + "@web3-react/coinbase-wallet": "8.2.3", + "@web3-react/core": "8.2.3", + "@web3-react/eip1193": "8.2.3", + "@web3-react/empty": "^8.2.3", + "@web3-react/gnosis-safe": "8.2.4", + "@web3-react/metamask": "8.2.4", + "@web3-react/network": "8.2.3", + "@web3-react/types": "8.2.3", + "@web3-react/walletconnect-v2": "8.5.1", "autoprefixer": "^10.4.12", "body-scroll-lock": "^4.0.0-beta.0", "buffer": "^6.0.3", diff --git a/src/assets/logos/compassWallet.svg b/src/assets/logos/compassWallet.svg new file mode 100644 index 000000000..881354a54 --- /dev/null +++ b/src/assets/logos/compassWallet.svg @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/src/assets/logos/seifWallet.svg b/src/assets/logos/seifWallet.svg new file mode 100644 index 000000000..7db81fd9b --- /dev/null +++ b/src/assets/logos/seifWallet.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx b/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx index a331956c1..69271484a 100644 --- a/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx +++ b/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx @@ -3,6 +3,9 @@ import { ReactComponent as IconWallet } from 'assets/icons/wallet.svg'; import { ReactComponent as IconWarning } from 'assets/icons/warning.svg'; import { ReactComponent as IconCopy } from 'assets/icons/copy.svg'; import { ReactComponent as IconCoinbaseLogo } from 'assets/logos/coinbase.svg'; +import { ReactComponent as IconCompassWalletLogo } from 'assets/logos/compassWallet.svg'; +import { ReactComponent as IconTailwindWalletLogo } from 'assets/logos/coinbase.svg'; +import { ReactComponent as IconSeifWalletLogo } from 'assets/logos/seifWallet.svg'; import { ReactComponent as IconGnosisLogo } from 'assets/logos/gnosis.svg'; import { ReactComponent as IconImposterLogo } from 'assets/logos/imposter.svg'; import { ReactComponent as IconMetaMaskLogo } from 'assets/logos/metamask.svg'; @@ -39,6 +42,12 @@ const WalletIcon = ({ isImposter }: { isImposter: boolean }) => { return ; case 'gnosisSafe': return ; + case 'tailwindWallet': + return ; + case 'compassWallet': + return ; + case 'seifWallet': + return ; default: return ; } diff --git a/src/config/sei/common.ts b/src/config/sei/common.ts index 4cc7739f8..9c2995c21 100644 --- a/src/config/sei/common.ts +++ b/src/config/sei/common.ts @@ -12,7 +12,13 @@ export const commonConfig: AppConfig = { mode: 'development', appUrl: 'https://sei.carbondefi.xyz', carbonApi: 'https://sei-api.carbondefi.xyz/v1/', - selectableConnectionTypes: ['injected', 'coinbaseWallet'], + selectableConnectionTypes: [ + 'injected', + 'coinbaseWallet', + 'tailwindWallet', + 'compassWallet', + 'seifWallet', + ], walletConnectProjectId: '', isSimulatorEnabled: false, policiesLastUpdated: '27 May, 2024', diff --git a/src/libs/web3/web3.connectors.ts b/src/libs/web3/web3.connectors.ts index 765613a79..219342caa 100644 --- a/src/libs/web3/web3.connectors.ts +++ b/src/libs/web3/web3.connectors.ts @@ -1,22 +1,29 @@ +import { StaticJsonRpcProvider } from '@ethersproject/providers'; import { initializeConnector } from '@web3-react/core'; +import { CoinbaseWallet } from '@web3-react/coinbase-wallet'; +import { EIP1193 } from '@web3-react/eip1193'; +import { EMPTY, Empty } from '@web3-react/empty'; import { MetaMask } from '@web3-react/metamask'; import { WalletConnect } from '@web3-react/walletconnect-v2'; import { Network } from '@web3-react/network'; import { GnosisSafe } from '@web3-react/gnosis-safe'; -import { CoinbaseWallet } from '@web3-react/coinbase-wallet'; -import { - RPC_HEADERS, - RPC_URLS, - SupportedChainId, -} from 'libs/web3/web3.constants'; -import { Connection } from 'libs/web3/web3.types'; +import { TailwindConnector } from '@tailwindzone/connect-web3-react'; import iconMetaMask from 'assets/logos/metamask.svg'; import iconWalletConnect from 'assets/logos/walletConnect.svg'; import iconCoinbase from 'assets/logos/coinbase.svg'; +import iconTailwindWallet from 'assets/logos/coinbase.svg'; +import iconCompassWallet from 'assets/logos/compassWallet.svg'; +import iconSeifWallet from 'assets/logos/seifWallet.svg'; import iconGnosis from 'assets/logos/gnosis.svg'; import carbonLogo from 'assets/logos/carbon.svg'; -import { StaticJsonRpcProvider } from '@ethersproject/providers'; import config from 'config'; +import { + RPC_HEADERS, + RPC_URLS, + SupportedChainId, +} from 'libs/web3/web3.constants'; +import { Connection } from 'libs/web3/web3.types'; +import { getSeifInjectedProvider } from './web3.utils'; const onError = (error: Error) => { console.debug(`web3-react error: ${error}`); @@ -136,3 +143,63 @@ export const coinbaseWalletConnection: Connection = { name: 'Coinbase Wallet', logoUrl: iconCoinbase, }; + +// ********************************** // +// Tailwind WALLET CONNECTOR +// ********************************** // + +const [web3TailwindWallet, web3TailwindWalletHooks] = + initializeConnector( + (actions) => new TailwindConnector({ actions }) + ); +export const tailwindWalletConnection: Connection = { + connector: web3TailwindWallet, + hooks: web3TailwindWalletHooks, + type: 'tailwindWallet', + name: 'Tailwind Wallet', + logoUrl: iconTailwindWallet, +}; + +// ********************************** // +// Compass WALLET CONNECTOR +// ********************************** // + +export const [web3CompassWallet, web3CompassWalletHooks] = window.compassEvm + ? initializeConnector( + (actions) => + new EIP1193({ + actions, + provider: window.compassEvm!, + }) + ) + : initializeConnector(() => EMPTY); + +export const compassWalletConnection: Connection = { + connector: web3CompassWallet, + hooks: web3CompassWalletHooks, + type: 'compassWallet', + name: 'Compass Wallet', + logoUrl: iconCompassWallet, +}; + +// ********************************** // +// Seif WALLET CONNECTOR +// ********************************** // + +export const [web3SeifWallet, web3SeifWalletHooks] = getSeifInjectedProvider() + ? initializeConnector( + (actions) => + new EIP1193({ + actions, + provider: getSeifInjectedProvider(), + }) + ) + : initializeConnector(() => EMPTY); + +export const seifWalletConnection: Connection = { + connector: web3SeifWallet, + hooks: web3SeifWalletHooks, + type: 'seifWallet', + name: 'Seif Wallet', + logoUrl: iconSeifWallet, +}; diff --git a/src/libs/web3/web3.constants.ts b/src/libs/web3/web3.constants.ts index 771b98f26..05a40c685 100644 --- a/src/libs/web3/web3.constants.ts +++ b/src/libs/web3/web3.constants.ts @@ -47,7 +47,10 @@ export type selectableConnectionType = | 'injected' | 'walletConnect' | 'coinbaseWallet' - | 'gnosisSafe'; + | 'gnosisSafe' + | 'tailwindWallet' + | 'compassWallet' + | 'seifWallet'; export type ConnectionType = 'network' | selectableConnectionType; diff --git a/src/libs/web3/web3.utils.ts b/src/libs/web3/web3.utils.ts index 91ea59d22..d318b18f2 100644 --- a/src/libs/web3/web3.utils.ts +++ b/src/libs/web3/web3.utils.ts @@ -5,6 +5,9 @@ import { injectedConnection, networkConnection, walletConnectConnection, + tailwindWalletConnection, + compassWalletConnection, + seifWalletConnection, } from 'libs/web3/web3.connectors'; import { lsService } from 'services/localeStorage'; import { UAParser } from 'ua-parser-js'; @@ -30,6 +33,19 @@ export interface AddChainParameter { iconUrls?: string[]; } +export function getSeifInjectedProvider() { + if (typeof window === 'undefined') return; + if (window.ethereum && (window as any).ethereum['__seif']) { + return window.ethereum; + } + + if ((window as any)['__seif']) { + return (window as any)['__seif']; + } + + return; +} + export const getChainInfo = (): AddChainParameter => { return { chainId: config.network.chainId, @@ -51,6 +67,9 @@ const connections: Record = { walletConnect: walletConnectConnection, gnosisSafe: gnosisSafeConnection, network: networkConnection, + tailwindWallet: tailwindWalletConnection, + compassWallet: compassWalletConnection, + seifWallet: seifWalletConnection, }; export const getConnection = (c: ConnectionType) => connections[c]; diff --git a/yarn.lock b/yarn.lock index ca7b92449..c027be8a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2100,6 +2100,13 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" +"@keplr-wallet/types@^0.12.63": + version "0.12.95" + resolved "https://registry.yarnpkg.com/@keplr-wallet/types/-/types-0.12.95.tgz#db5e18d7fa7277b0831fb41c0e0fa0cee4ca6b6f" + integrity sha512-Wq+Sa0+Uk4hRBbA9J09jq55NkFarVCdiWUZjasIDjrpBfGisV3vtFerMyb1xGsRvj+lkO3HEMAki5h6bQ0sMtA== + dependencies: + long "^4.0.0" + "@lit-labs/ssr-dom-shim@^1.0.0", "@lit-labs/ssr-dom-shim@^1.1.0": version "1.1.1" resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.1.tgz#64df34e2f12e68e78ac57e571d25ec07fa460ca9" @@ -2265,6 +2272,98 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@parcel/watcher-android-arm64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.1.tgz#c2c19a3c442313ff007d2d7a9c2c1dd3e1c9ca84" + integrity sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg== + +"@parcel/watcher-darwin-arm64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.4.1.tgz#c817c7a3b4f3a79c1535bfe54a1c2818d9ffdc34" + integrity sha512-ln41eihm5YXIY043vBrrHfn94SIBlqOWmoROhsMVTSXGh0QahKGy77tfEywQ7v3NywyxBBkGIfrWRHm0hsKtzA== + +"@parcel/watcher-darwin-x64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.4.1.tgz#1a3f69d9323eae4f1c61a5f480a59c478d2cb020" + integrity sha512-yrw81BRLjjtHyDu7J61oPuSoeYWR3lDElcPGJyOvIXmor6DEo7/G2u1o7I38cwlcoBHQFULqF6nesIX3tsEXMg== + +"@parcel/watcher-freebsd-x64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.4.1.tgz#0d67fef1609f90ba6a8a662bc76a55fc93706fc8" + integrity sha512-TJa3Pex/gX3CWIx/Co8k+ykNdDCLx+TuZj3f3h7eOjgpdKM+Mnix37RYsYU4LHhiYJz3DK5nFCCra81p6g050w== + +"@parcel/watcher-linux-arm-glibc@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.4.1.tgz#ce5b340da5829b8e546bd00f752ae5292e1c702d" + integrity sha512-4rVYDlsMEYfa537BRXxJ5UF4ddNwnr2/1O4MHM5PjI9cvV2qymvhwZSFgXqbS8YoTk5i/JR0L0JDs69BUn45YA== + +"@parcel/watcher-linux-arm64-glibc@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.4.1.tgz#6d7c00dde6d40608f9554e73998db11b2b1ff7c7" + integrity sha512-BJ7mH985OADVLpbrzCLgrJ3TOpiZggE9FMblfO65PlOCdG++xJpKUJ0Aol74ZUIYfb8WsRlUdgrZxKkz3zXWYA== + +"@parcel/watcher-linux-arm64-musl@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.4.1.tgz#bd39bc71015f08a4a31a47cd89c236b9d6a7f635" + integrity sha512-p4Xb7JGq3MLgAfYhslU2SjoV9G0kI0Xry0kuxeG/41UfpjHGOhv7UoUDAz/jb1u2elbhazy4rRBL8PegPJFBhA== + +"@parcel/watcher-linux-x64-glibc@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.4.1.tgz#0ce29966b082fb6cdd3de44f2f74057eef2c9e39" + integrity sha512-s9O3fByZ/2pyYDPoLM6zt92yu6P4E39a03zvO0qCHOTjxmt3GHRMLuRZEWhWLASTMSrrnVNWdVI/+pUElJBBBg== + +"@parcel/watcher-linux-x64-musl@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.4.1.tgz#d2ebbf60e407170bb647cd6e447f4f2bab19ad16" + integrity sha512-L2nZTYR1myLNST0O632g0Dx9LyMNHrn6TOt76sYxWLdff3cB22/GZX2UPtJnaqQPdCRoszoY5rcOj4oMTtp5fQ== + +"@parcel/watcher-wasm@^2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-wasm/-/watcher-wasm-2.4.1.tgz#c4353e4fdb96ee14389856f7f6f6d21b7dcef9e1" + integrity sha512-/ZR0RxqxU/xxDGzbzosMjh4W6NdYFMqq2nvo2b8SLi7rsl/4jkL8S5stIikorNkdR50oVDvqb/3JT05WM+CRRA== + dependencies: + is-glob "^4.0.3" + micromatch "^4.0.5" + napi-wasm "^1.1.0" + +"@parcel/watcher-win32-arm64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.4.1.tgz#eb4deef37e80f0b5e2f215dd6d7a6d40a85f8adc" + integrity sha512-Uq2BPp5GWhrq/lcuItCHoqxjULU1QYEcyjSO5jqqOK8RNFDBQnenMMx4gAl3v8GiWa59E9+uDM7yZ6LxwUIfRg== + +"@parcel/watcher-win32-ia32@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.4.1.tgz#94fbd4b497be39fd5c8c71ba05436927842c9df7" + integrity sha512-maNRit5QQV2kgHFSYwftmPBxiuK5u4DXjbXx7q6eKjq5dsLXZ4FJiVvlcw35QXzk0KrUecJmuVFbj4uV9oYrcw== + +"@parcel/watcher-win32-x64@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.4.1.tgz#4bf920912f67cae5f2d264f58df81abfea68dadf" + integrity sha512-+DvS92F9ezicfswqrvIRM2njcYJbd5mb9CUgtrHCHmvn7pPPa+nMDRu1o1bYYz/l5IB2NVGNJWiH7h1E58IF2A== + +"@parcel/watcher@^2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.4.1.tgz#a50275151a1bb110879c6123589dba90c19f1bf8" + integrity sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA== + dependencies: + detect-libc "^1.0.3" + is-glob "^4.0.3" + micromatch "^4.0.5" + node-addon-api "^7.0.0" + optionalDependencies: + "@parcel/watcher-android-arm64" "2.4.1" + "@parcel/watcher-darwin-arm64" "2.4.1" + "@parcel/watcher-darwin-x64" "2.4.1" + "@parcel/watcher-freebsd-x64" "2.4.1" + "@parcel/watcher-linux-arm-glibc" "2.4.1" + "@parcel/watcher-linux-arm64-glibc" "2.4.1" + "@parcel/watcher-linux-arm64-musl" "2.4.1" + "@parcel/watcher-linux-x64-glibc" "2.4.1" + "@parcel/watcher-linux-x64-musl" "2.4.1" + "@parcel/watcher-win32-arm64" "2.4.1" + "@parcel/watcher-win32-ia32" "2.4.1" + "@parcel/watcher-win32-x64" "2.4.1" + "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" @@ -2650,7 +2749,7 @@ "@stablelib/constant-time" "^1.0.1" "@stablelib/wipe" "^1.0.1" -"@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": +"@stablelib/random@1.0.2", "@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.2.tgz#2dece393636489bf7e19c51229dd7900eddf742c" integrity sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w== @@ -2681,7 +2780,7 @@ resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36" integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg== -"@stablelib/x25519@^1.0.3": +"@stablelib/x25519@1.0.3", "@stablelib/x25519@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@stablelib/x25519/-/x25519-1.0.3.tgz#13c8174f774ea9f3e5e42213cbf9fc68a3c7b7fd" integrity sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw== @@ -2773,6 +2872,22 @@ "@svgr/hast-util-to-babel-ast" "^6.5.1" svg-parser "^2.0.4" +"@tailwindzone/connect-web3-react@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@tailwindzone/connect-web3-react/-/connect-web3-react-1.0.0.tgz#f035345883c7bbf726055ba7c3c9f29179d05cc7" + integrity sha512-FFAh9pwSHIsJRqjemBibwMMz/ZJLWqmhIZ0Zt3wWl3sy1IP2nYhOi8/fWBdHgEfdF+DWMdufZQCxyyiFAyGCxw== + dependencies: + "@tailwindzone/connect" "^2.4.2" + "@web3-react/core" "^8.2.3" + "@web3-react/types" "^8.2.3" + +"@tailwindzone/connect@^2.4.2": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@tailwindzone/connect/-/connect-2.4.2.tgz#b0ad35aa2d9a5396ed7c857689da9d78d976324a" + integrity sha512-9lQRZgH3onCQyCbnnYDLKVAWz+Bw1Q/TTEUoA8z1pM+olVO2yykyj1h/y72mUUcPMQsVAby3KcYg/XG7leBwIw== + dependencies: + "@keplr-wallet/types" "^0.12.63" + "@tanstack/history@1.4.9": version "1.4.9" resolved "https://registry.yarnpkg.com/@tanstack/history/-/history-1.4.9.tgz#37794f8aa96568a12b7ac40335bae06953577a87" @@ -3520,6 +3635,29 @@ resolved "https://registry.yarnpkg.com/@wagmi/chains/-/chains-1.6.0.tgz#eb992ad28dbaaab729b5bcab3e5b461e8a035656" integrity sha512-5FRlVxse5P4ZaHG3GTvxwVANSmYJas1eQrTBHhjxVtqXoorm0aLmCHbhmN8Xo1yu09PaWKlleEvfE98yH4AgIw== +"@walletconnect/core@2.13.0": + version "2.13.0" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.13.0.tgz#6b79b039930643e8ee85a0f512b143a35fdb8b52" + integrity sha512-blDuZxQenjeXcVJvHxPznTNl6c/2DO4VNrFnus+qHmO6OtT5lZRowdMtlCaCNb1q0OxzgrmBDcTOCbFcCpio/g== + dependencies: + "@walletconnect/heartbeat" "1.2.2" + "@walletconnect/jsonrpc-provider" "1.0.14" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/jsonrpc-ws-connection" "1.0.14" + "@walletconnect/keyvaluestorage" "1.1.1" + "@walletconnect/logger" "2.1.2" + "@walletconnect/relay-api" "1.0.10" + "@walletconnect/relay-auth" "1.0.4" + "@walletconnect/safe-json" "1.0.2" + "@walletconnect/time" "1.0.2" + "@walletconnect/types" "2.13.0" + "@walletconnect/utils" "2.13.0" + events "3.3.0" + isomorphic-unfetch "3.1.0" + lodash.isequal "4.5.0" + uint8arrays "3.1.0" + "@walletconnect/core@2.9.2": version "2.9.2" resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.9.2.tgz#c46734ca63771b28fd77606fd521930b7ecfc5e1" @@ -3549,6 +3687,22 @@ dependencies: tslib "1.14.1" +"@walletconnect/ethereum-provider@^2.10.1": + version "2.13.0" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.13.0.tgz#5148851983e0d55fa1c18737b2db22802c82434c" + integrity sha512-dnpW8mmLpWl1AZUYGYZpaAfGw1HFkL0WSlhk5xekx3IJJKn4pLacX2QeIOo0iNkzNQxZfux1AK4Grl1DvtzZEA== + dependencies: + "@walletconnect/jsonrpc-http-connection" "1.0.8" + "@walletconnect/jsonrpc-provider" "1.0.14" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/modal" "2.6.2" + "@walletconnect/sign-client" "2.13.0" + "@walletconnect/types" "2.13.0" + "@walletconnect/universal-provider" "2.13.0" + "@walletconnect/utils" "2.13.0" + events "3.3.0" + "@walletconnect/ethereum-provider@^2.9.2": version "2.9.2" resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.9.2.tgz#fb3a6fca279bb4e98e75baa2fb9730545d41bb99" @@ -3564,7 +3718,7 @@ "@walletconnect/utils" "2.9.2" events "^3.3.0" -"@walletconnect/events@^1.0.1": +"@walletconnect/events@1.0.1", "@walletconnect/events@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/events/-/events-1.0.1.tgz#2b5f9c7202019e229d7ccae1369a9e86bda7816c" integrity sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ== @@ -3581,6 +3735,25 @@ "@walletconnect/time" "^1.0.2" tslib "1.14.1" +"@walletconnect/heartbeat@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@walletconnect/heartbeat/-/heartbeat-1.2.2.tgz#e8dc5179db7769950c6f9cf59b23516d9b95227d" + integrity sha512-uASiRmC5MwhuRuf05vq4AT48Pq8RMi876zV8rr8cV969uTOzWdB/k+Lj5yI2PBtB1bGQisGen7MM1GcZlQTBXw== + dependencies: + "@walletconnect/events" "^1.0.1" + "@walletconnect/time" "^1.0.2" + events "^3.3.0" + +"@walletconnect/jsonrpc-http-connection@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.8.tgz#2f4c3948f074960a3edd07909560f3be13e2c7ae" + integrity sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.6" + "@walletconnect/safe-json" "^1.0.1" + cross-fetch "^3.1.4" + events "^3.3.0" + "@walletconnect/jsonrpc-http-connection@^1.0.7": version "1.0.7" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.7.tgz#a6973569b8854c22da707a759d241e4f5c2d5a98" @@ -3600,6 +3773,15 @@ "@walletconnect/safe-json" "^1.0.2" tslib "1.14.1" +"@walletconnect/jsonrpc-provider@1.0.14": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.14.tgz#696f3e3b6d728b361f2e8b853cfc6afbdf2e4e3e" + integrity sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.8" + "@walletconnect/safe-json" "^1.0.2" + events "^3.3.0" + "@walletconnect/jsonrpc-types@1.0.3", "@walletconnect/jsonrpc-types@^1.0.2", "@walletconnect/jsonrpc-types@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz#65e3b77046f1a7fa8347ae02bc1b841abe6f290c" @@ -3608,6 +3790,14 @@ keyvaluestorage-interface "^1.0.0" tslib "1.14.1" +"@walletconnect/jsonrpc-types@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.4.tgz#ce1a667d79eadf2a2d9d002c152ceb68739c230c" + integrity sha512-P6679fG/M+wuWg9TY8mh6xFSdYnFyFjwFelxyISxMDrlbXokorEVXYOxiqEbrU3x1BmBoCAJJ+vtEaEoMlpCBQ== + dependencies: + events "^3.3.0" + keyvaluestorage-interface "^1.0.0" + "@walletconnect/jsonrpc-utils@1.0.8", "@walletconnect/jsonrpc-utils@^1.0.6", "@walletconnect/jsonrpc-utils@^1.0.7", "@walletconnect/jsonrpc-utils@^1.0.8": version "1.0.8" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz#82d0cc6a5d6ff0ecc277cb35f71402c91ad48d72" @@ -3628,6 +3818,25 @@ tslib "1.14.1" ws "^7.5.1" +"@walletconnect/jsonrpc-ws-connection@1.0.14": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.14.tgz#eec700e74766c7887de2bd76c91a0206628732aa" + integrity sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.6" + "@walletconnect/safe-json" "^1.0.2" + events "^3.3.0" + ws "^7.5.1" + +"@walletconnect/keyvaluestorage@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz#dd2caddabfbaf80f6b8993a0704d8b83115a1842" + integrity sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA== + dependencies: + "@walletconnect/safe-json" "^1.0.1" + idb-keyval "^6.2.1" + unstorage "^1.9.0" + "@walletconnect/keyvaluestorage@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.0.2.tgz#92f5ca0f54c1a88a093778842ce0c874d86369c8" @@ -3636,6 +3845,14 @@ safe-json-utils "^1.1.1" tslib "1.14.1" +"@walletconnect/logger@2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@walletconnect/logger/-/logger-2.1.2.tgz#813c9af61b96323a99f16c10089bfeb525e2a272" + integrity sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw== + dependencies: + "@walletconnect/safe-json" "^1.0.2" + pino "7.11.0" + "@walletconnect/logger@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/logger/-/logger-2.0.1.tgz#7f489b96e9a1ff6bf3e58f0fbd6d69718bf844a8" @@ -3661,7 +3878,7 @@ motion "10.16.2" qrcode "1.5.3" -"@walletconnect/modal@^2.6.1": +"@walletconnect/modal@2.6.2", "@walletconnect/modal@^2.6.2": version "2.6.2" resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.6.2.tgz#4b534a836f5039eeb3268b80be7217a94dd12651" integrity sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA== @@ -3669,6 +3886,13 @@ "@walletconnect/modal-core" "2.6.2" "@walletconnect/modal-ui" "2.6.2" +"@walletconnect/relay-api@1.0.10": + version "1.0.10" + resolved "https://registry.yarnpkg.com/@walletconnect/relay-api/-/relay-api-1.0.10.tgz#5aef3cd07c21582b968136179aa75849dcc65499" + integrity sha512-tqrdd4zU9VBNqUaXXQASaexklv6A54yEyQQEXYOCr+Jz8Ket0dmPBDyg19LVSNUN2cipAghQc45/KVmfFJ0cYw== + dependencies: + "@walletconnect/jsonrpc-types" "^1.0.2" + "@walletconnect/relay-api@^1.0.9": version "1.0.9" resolved "https://registry.yarnpkg.com/@walletconnect/relay-api/-/relay-api-1.0.9.tgz#f8c2c3993dddaa9f33ed42197fc9bfebd790ecaf" @@ -3677,7 +3901,7 @@ "@walletconnect/jsonrpc-types" "^1.0.2" tslib "1.14.1" -"@walletconnect/relay-auth@^1.0.4": +"@walletconnect/relay-auth@1.0.4", "@walletconnect/relay-auth@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@walletconnect/relay-auth/-/relay-auth-1.0.4.tgz#0b5c55c9aa3b0ef61f526ce679f3ff8a5c4c2c7c" integrity sha512-kKJcS6+WxYq5kshpPaxGHdwf5y98ZwbfuS4EE/NkQzqrDFm5Cj+dP8LofzWvjrrLkZq7Afy7WrQMXdLy8Sx7HQ== @@ -3689,13 +3913,28 @@ tslib "1.14.1" uint8arrays "^3.0.0" -"@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": +"@walletconnect/safe-json@1.0.2", "@walletconnect/safe-json@^1.0.1", "@walletconnect/safe-json@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/safe-json/-/safe-json-1.0.2.tgz#7237e5ca48046e4476154e503c6d3c914126fa77" integrity sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA== dependencies: tslib "1.14.1" +"@walletconnect/sign-client@2.13.0": + version "2.13.0" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.13.0.tgz#f59993f082aec1ca5498b9519027e764c1e6d28b" + integrity sha512-En7KSvNUlQFx20IsYGsFgkNJ2lpvDvRsSFOT5PTdGskwCkUfOpB33SQJ6nCrN19gyoKPNvWg80Cy6MJI0TjNYA== + dependencies: + "@walletconnect/core" "2.13.0" + "@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.13.0" + "@walletconnect/utils" "2.13.0" + events "3.3.0" + "@walletconnect/sign-client@2.9.2": version "2.9.2" resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.9.2.tgz#ff4c81c082c2078878367d07f24bcb20b1f7ab9e" @@ -3711,13 +3950,25 @@ "@walletconnect/utils" "2.9.2" events "^3.3.0" -"@walletconnect/time@^1.0.2": +"@walletconnect/time@1.0.2", "@walletconnect/time@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@walletconnect/time/-/time-1.0.2.tgz#6c5888b835750ecb4299d28eecc5e72c6d336523" integrity sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g== dependencies: tslib "1.14.1" +"@walletconnect/types@2.13.0": + version "2.13.0" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.13.0.tgz#cdac083651f5897084fe9ed62779f11810335ac6" + integrity sha512-MWaVT0FkZwzYbD3tvk8F+2qpPlz1LUSWHuqbINUtMXnSzJtXN49Y99fR7FuBhNFtDalfuWsEK17GrNA+KnAsPQ== + dependencies: + "@walletconnect/events" "1.0.1" + "@walletconnect/heartbeat" "1.2.2" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/keyvaluestorage" "1.1.1" + "@walletconnect/logger" "2.1.2" + events "3.3.0" + "@walletconnect/types@2.9.2": version "2.9.2" resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.9.2.tgz#d5fd5a61dc0f41cbdca59d1885b85207ac7bf8c5" @@ -3730,6 +3981,21 @@ "@walletconnect/logger" "^2.0.1" events "^3.3.0" +"@walletconnect/universal-provider@2.13.0": + version "2.13.0" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.13.0.tgz#f2b597001245e4d4a06d96dd1bce8d3a8a4dcbbf" + integrity sha512-B5QvO8pnk5Bqn4aIt0OukGEQn2Auk9VbHfhQb9cGwgmSCd1GlprX/Qblu4gyT5+TjHMb1Gz5UssUaZWTWbDhBg== + dependencies: + "@walletconnect/jsonrpc-http-connection" "1.0.8" + "@walletconnect/jsonrpc-provider" "1.0.14" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/logger" "2.1.2" + "@walletconnect/sign-client" "2.13.0" + "@walletconnect/types" "2.13.0" + "@walletconnect/utils" "2.13.0" + events "3.3.0" + "@walletconnect/universal-provider@2.9.2": version "2.9.2" resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.9.2.tgz#40e54e98bc48b1f2f5f77eb5b7f05462093a8506" @@ -3745,6 +4011,26 @@ "@walletconnect/utils" "2.9.2" events "^3.3.0" +"@walletconnect/utils@2.13.0": + version "2.13.0" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.13.0.tgz#1fc1fbff0d26db0830e65d1ba8cfe1a13a0616ad" + integrity sha512-q1eDCsRHj5iLe7fF8RroGoPZpdo2CYMZzQSrw1iqL+2+GOeqapxxuJ1vaJkmDUkwgklfB22ufqG6KQnz78sD4w== + dependencies: + "@stablelib/chacha20poly1305" "1.0.1" + "@stablelib/hkdf" "1.0.1" + "@stablelib/random" "1.0.2" + "@stablelib/sha256" "1.0.1" + "@stablelib/x25519" "1.0.3" + "@walletconnect/relay-api" "1.0.10" + "@walletconnect/safe-json" "1.0.2" + "@walletconnect/time" "1.0.2" + "@walletconnect/types" "2.13.0" + "@walletconnect/window-getters" "1.0.1" + "@walletconnect/window-metadata" "1.0.1" + detect-browser "5.3.0" + query-string "7.1.3" + uint8arrays "3.1.0" + "@walletconnect/utils@2.9.2": version "2.9.2" resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.9.2.tgz#035bdb859ee81a4bcc6420f56114cc5ec3e30afb" @@ -3765,14 +4051,14 @@ query-string "7.1.3" uint8arrays "^3.1.0" -"@walletconnect/window-getters@^1.0.1": +"@walletconnect/window-getters@1.0.1", "@walletconnect/window-getters@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/window-getters/-/window-getters-1.0.1.tgz#f36d1c72558a7f6b87ecc4451fc8bd44f63cbbdc" integrity sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q== dependencies: tslib "1.14.1" -"@walletconnect/window-metadata@^1.0.1": +"@walletconnect/window-metadata@1.0.1", "@walletconnect/window-metadata@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz#2124f75447b7e989e4e4e1581d55d25bc75f7be5" integrity sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA== @@ -3780,73 +4066,88 @@ "@walletconnect/window-getters" "^1.0.1" tslib "1.14.1" -"@web3-react/coinbase-wallet@8.2.2": - version "8.2.2" - resolved "https://registry.yarnpkg.com/@web3-react/coinbase-wallet/-/coinbase-wallet-8.2.2.tgz#de01d981846cb517288ff6a1c113f9d2f9c1276e" - integrity sha512-+gCTgXODWNgXQpWSfmZluv5dxg2X6Uh1hhHxY/qsxemCJHYzboT+3ugATlrmEuHym8apDicVnGZ3jyWpHBw9dg== +"@web3-react/coinbase-wallet@8.2.3": + version "8.2.3" + resolved "https://registry.yarnpkg.com/@web3-react/coinbase-wallet/-/coinbase-wallet-8.2.3.tgz#08d9ae9c9d15313a58f0bc33d970c73b0aaf813a" + integrity sha512-hYrOwv0RzhwQuI87GBv9ZHAblgrFg7YomnObOyuH2tPZT8+cQAtgP4D293TDQhW9SR1NXxzoS0tbTECWd4yUAQ== dependencies: - "@web3-react/types" "^8.2.2" + "@web3-react/types" "^8.2.3" -"@web3-react/core@8.2.2": - version "8.2.2" - resolved "https://registry.yarnpkg.com/@web3-react/core/-/core-8.2.2.tgz#f1a76e42f30a8c36bc0cc3b6e59f5cc89b357398" - integrity sha512-4AFWqOBisBBMj22/RB3+w6px66YxtK0iVIReQj1h1Rssko2ptIHjGMLyyRInN8eVemx8QaOE481odOHfFKZkUQ== +"@web3-react/core@8.2.3", "@web3-react/core@^8.2.3": + version "8.2.3" + resolved "https://registry.yarnpkg.com/@web3-react/core/-/core-8.2.3.tgz#142899e74401bfd3a481a1b9578b2fd8f9dfde81" + integrity sha512-0ezmRKhqQpoa9ct2/3erg60zBXfC/f/liYR1mfSGKtIroRkLnPARigZSV6pI+fi8bhfGJ0RKtFWyTCCWZzdq1w== dependencies: - "@web3-react/store" "^8.2.2" - "@web3-react/types" "^8.2.2" + "@web3-react/store" "^8.2.3" + "@web3-react/types" "^8.2.3" zustand "4.4.0" optionalDependencies: "@ethersproject/providers" "^5" -"@web3-react/gnosis-safe@8.2.3": +"@web3-react/eip1193@8.2.3": + version "8.2.3" + resolved "https://registry.yarnpkg.com/@web3-react/eip1193/-/eip1193-8.2.3.tgz#d09d5a5ea98719010eb7dd845631acb1f15c51e5" + integrity sha512-PdL8PCv3zgQrnowRlBK7PIO8G7v/nc31PYgarACo8mX+l5Y4+l7+ma/kpkULXp5yLtc4qlQYlCalmXpcbtl2FA== + dependencies: + "@web3-react/types" "^8.2.3" + eventemitter3 "^4.0.7" + +"@web3-react/empty@^8.2.3": version "8.2.3" - resolved "https://registry.yarnpkg.com/@web3-react/gnosis-safe/-/gnosis-safe-8.2.3.tgz#1a5398c35f7f10c9cc2663abfb9e9da9ea201a8a" - integrity sha512-Fls7jiTaO7et9ti7zhuGWMhSiXKWhgG2hFKaV7F1uX1CEqVb2AzJrk4v4TzY0cYTgtBihvkmfnJ1nLy8f/jOWw== + resolved "https://registry.yarnpkg.com/@web3-react/empty/-/empty-8.2.3.tgz#70a0b07d7918a1f10c6dc4001b9fefc2f72face8" + integrity sha512-Uopeac2XgyJLmK8EawNmG1kferlSvklKgWzbianygriC3C3+6yHvflUBmHzYfcpZDq5gotP4JJr2bmhGAocQ5w== + dependencies: + "@web3-react/types" "^8.2.3" + +"@web3-react/gnosis-safe@8.2.4": + version "8.2.4" + resolved "https://registry.yarnpkg.com/@web3-react/gnosis-safe/-/gnosis-safe-8.2.4.tgz#1f595a64bd26506a2e537b8a6734b5bf243d4e36" + integrity sha512-4M0CFludHJXtLsKJlKBIeMZcdTO60e6psYhYm2GLy76do9K9JJvBE8U4YVFBHLpk7sWpySsrCuYcaVZyzZ/xtA== dependencies: "@safe-global/safe-apps-provider" "^0.17.1" "@safe-global/safe-apps-sdk" "^8.0.0" - "@web3-react/types" "^8.2.2" + "@web3-react/types" "^8.2.3" -"@web3-react/metamask@8.2.3": - version "8.2.3" - resolved "https://registry.yarnpkg.com/@web3-react/metamask/-/metamask-8.2.3.tgz#cf271d60ad4c91a55e514ca53908ce389956e537" - integrity sha512-Z5F3KiTkJMZR8citCb3LPQCwzOnvGzrhgfpYiBNioNNbW0Dq80eiIbpHeXeGlSQbqwHHEZOYm9LPUEM7w8aRYg== +"@web3-react/metamask@8.2.4": + version "8.2.4" + resolved "https://registry.yarnpkg.com/@web3-react/metamask/-/metamask-8.2.4.tgz#26438222c4b17964c011ea359058ba6feb6a2330" + integrity sha512-4yoqDgvcB0QKUGSk00/fUipA3z5rOXcQYAwE0CABPa5lbTRAIm5i8F0Gj8UW7QO0pQus4UtjX0+JxWdclB7UrA== dependencies: "@metamask/detect-provider" "^1.2.0" - "@web3-react/types" "^8.2.2" + "@web3-react/types" "^8.2.3" -"@web3-react/network@8.2.2": - version "8.2.2" - resolved "https://registry.yarnpkg.com/@web3-react/network/-/network-8.2.2.tgz#9ae4a6342338147593ecdb0af7566363bf2b3901" - integrity sha512-OW6+l/QTvvsKc/oTkvxCJ+hmgkLplVY+N+E/swbw4IxVhnznTrJwbWKmH2ARsuihO7BC4ps/aiFg/ologmTljA== +"@web3-react/network@8.2.3": + version "8.2.3" + resolved "https://registry.yarnpkg.com/@web3-react/network/-/network-8.2.3.tgz#edc8268877006780321fed7e632ebd86ef057eb8" + integrity sha512-OAlXo3aNhldANmHt/N88SuLrWihVQizJf0cNy1cqnbNIAg87292PnAqCZrj3Pwaq/s8hoSgapc87zl1KFJeTjA== dependencies: "@ethersproject/providers" "^5" - "@web3-react/types" "^8.2.2" + "@web3-react/types" "^8.2.3" -"@web3-react/store@^8.2.2": - version "8.2.2" - resolved "https://registry.yarnpkg.com/@web3-react/store/-/store-8.2.2.tgz#d85a560e2655919030d237e2e0e6e2529ff038e0" - integrity sha512-ITMkLzyw8tSTTEf8NcjIdewphbCpWHwK4EmwRxPCZMMRs+apZwoj3R/YNflMBoPMC+ybWKnVVpDd6CprF1TU9A== +"@web3-react/store@^8.2.3": + version "8.2.3" + resolved "https://registry.yarnpkg.com/@web3-react/store/-/store-8.2.3.tgz#64a0ddaf49f85c120e07f5089dd4d7df9346f881" + integrity sha512-qUJQ5pDsYYDra+/+glq2BmIS43HYAiEZ22sLLVh6E75WiZKRNOOqUxBDPe33KTIn718DLt51j+wd2FT+oT/kJQ== dependencies: "@ethersproject/address" "^5" - "@web3-react/types" "^8.2.2" + "@web3-react/types" "^8.2.3" zustand "4.4.0" -"@web3-react/types@8.2.2", "@web3-react/types@^8.2.2": - version "8.2.2" - resolved "https://registry.yarnpkg.com/@web3-react/types/-/types-8.2.2.tgz#1ae7f11069d9a9c711aa4152f95331747fb1e551" - integrity sha512-PrPrJNjJhUX3lL/365llAZwY0bpUm9N52OjGMFyzCIX7IR13f7WLUk/LyQa9ALneCBu3cJUVTZANuFdqdREuvw== +"@web3-react/types@8.2.3", "@web3-react/types@^8.2.3": + version "8.2.3" + resolved "https://registry.yarnpkg.com/@web3-react/types/-/types-8.2.3.tgz#e2ac1eaaa7f96b518a5535fee048bf73470f5c21" + integrity sha512-kSG90QkN+n7IOtp10nQ44oS8J7jzfH9EmqnruwBpCGybh1FM/ohyRvUKWYZNfNE4wsjTSpKsINR0/VdDsZMHyg== dependencies: zustand "4.4.0" -"@web3-react/walletconnect-v2@^8.5.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@web3-react/walletconnect-v2/-/walletconnect-v2-8.5.0.tgz#f81ef1d7e262771e6004133f6c8f9f5a27a4c3e3" - integrity sha512-iIdKWk1whh6X/dnR8DgyMuFMcvspcFVh2Ly5CNM3LM28XSTiCNMnkr3fumtc654shy9aVNy8DkbDi02oiRx6fQ== +"@web3-react/walletconnect-v2@8.5.1": + version "8.5.1" + resolved "https://registry.yarnpkg.com/@web3-react/walletconnect-v2/-/walletconnect-v2-8.5.1.tgz#bc7d43b53bb30ec524e0cc36e20e1f279bf18818" + integrity sha512-K6RjdllFpEftTDQw39fRfuVcBLNCWXDxx5oZiWDc7D2RW071C0m1WridOeUiELmCXykyDCrIjd2zAVwV4GGueA== dependencies: - "@walletconnect/ethereum-provider" "^2.9.2" - "@walletconnect/modal" "^2.6.1" - "@web3-react/types" "^8.2.2" + "@walletconnect/ethereum-provider" "^2.10.1" + "@walletconnect/modal" "^2.6.2" + "@web3-react/types" "^8.2.3" eventemitter3 "^4.0.7" JSONStream@^1.3.5: @@ -3890,6 +4191,11 @@ acorn@^8.1.0, acorn@^8.10.0, acorn@^8.8.1, acorn@^8.8.2, acorn@^8.9.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== +acorn@^8.11.3: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + aes-js@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" @@ -3967,7 +4273,7 @@ any-promise@^1.0.0: resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== -anymatch@~3.1.2: +anymatch@^3.1.3, anymatch@~3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== @@ -4537,6 +4843,21 @@ chokidar@^3.5.3: optionalDependencies: fsevents "~2.3.2" +chokidar@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + ci-info@^3.2.0: version "3.8.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" @@ -4550,6 +4871,13 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" +citty@^0.1.5, citty@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/citty/-/citty-0.1.6.tgz#0f7904da1ed4625e1a9ea7e0fa780981aab7c5e4" + integrity sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ== + dependencies: + consola "^3.2.3" + class-variance-authority@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/class-variance-authority/-/class-variance-authority-0.2.4.tgz#a9a4474e13943b506994f95fe670663135f7dba4" @@ -4570,6 +4898,15 @@ cli-truncate@^3.1.0: slice-ansi "^5.0.0" string-width "^5.0.0" +clipboardy@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-4.0.0.tgz#e73ced93a76d19dd379ebf1f297565426dffdca1" + integrity sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w== + dependencies: + execa "^8.0.1" + is-wsl "^3.1.0" + is64bit "^2.0.0" + cliui@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" @@ -4679,6 +5016,11 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +confbox@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.7.tgz#ccfc0a2bcae36a84838e83a3b7f770fb17d6c579" + integrity sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA== + confusing-browser-globals@^1.0.11: version "1.0.11" resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" @@ -4689,6 +5031,11 @@ connect-history-api-fallback@^1.6.0: resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== +consola@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f" + integrity sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ== + convert-source-map@^1.7.0: version "1.9.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" @@ -4699,6 +5046,11 @@ convert-source-map@^2.0.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== +cookie-es@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/cookie-es/-/cookie-es-1.1.0.tgz#68f8d9f48aeb5a534f3896f80e792760d3d20def" + integrity sha512-L2rLOcK0wzWSfSDA33YR+PUHDG10a8px7rUHKWbGLP4YfbsMed2KFUw5fczvDPbT98DDe3LEzviswl810apTEw== + cookie@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" @@ -4786,6 +5138,11 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +crossws@^0.2.0, crossws@^0.2.2: + version "0.2.4" + resolved "https://registry.yarnpkg.com/crossws/-/crossws-0.2.4.tgz#82a8b518bff1018ab1d21ced9e35ffbe1681ad03" + integrity sha512-DAxroI2uSOgUKLz00NX6A8U/8EE3SZHmIND+10jkVSaypvyt57J5JEOxAQOL6lQxyzi/wZbTIwssU1uy69h5Vg== + crypto-browserify@^3.12.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" @@ -5183,6 +5540,11 @@ define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +defu@^6.1.3, defu@^6.1.4: + version "6.1.4" + resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.4.tgz#4e0c9cf9ff68fe5f3d7f2765cc1a012dfdcb0479" + integrity sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg== + delaunator@5: version "5.0.0" resolved "https://registry.yarnpkg.com/delaunator/-/delaunator-5.0.0.tgz#60f052b28bd91c9b4566850ebf7756efe821d81b" @@ -5218,11 +5580,21 @@ des.js@^1.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" +destr@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/destr/-/destr-2.0.3.tgz#7f9e97cb3d16dbdca7be52aca1644ce402cfe449" + integrity sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ== + detect-browser@5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/detect-browser/-/detect-browser-5.3.0.tgz#9705ef2bddf46072d0f7265a1fe300e36fe7ceca" integrity sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w== +detect-libc@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== + didyoumean@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" @@ -5937,7 +6309,7 @@ eventemitter3@^5.0.1: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== -events@^3.3.0: +events@3.3.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -5965,6 +6337,21 @@ execa@7.2.0: signal-exit "^3.0.7" strip-final-newline "^3.0.0" +execa@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c" + integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^8.0.1" + human-signals "^5.0.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^4.1.0" + strip-final-newline "^3.0.0" + expect@^29.0.0: version "29.6.2" resolved "https://registry.yarnpkg.com/expect/-/expect-29.6.2.tgz#7b08e83eba18ddc4a2cf62b5f2d1918f5cd84521" @@ -6237,11 +6624,21 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has-proto "^1.0.1" has-symbols "^1.0.3" +get-port-please@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/get-port-please/-/get-port-please-3.1.2.tgz#502795e56217128e4183025c89a48c71652f4e49" + integrity sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ== + get-stream@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-stream@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" + integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== + get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" @@ -6369,6 +6766,22 @@ gzip-size@^6.0.0: dependencies: duplexer "^0.1.2" +h3@^1.10.2, h3@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/h3/-/h3-1.11.1.tgz#e9414ae6f2a076a345ea07256b320edb29bab9f7" + integrity sha512-AbaH6IDnZN6nmbnJOH72y3c5Wwh9P97soSVdGSBbcDACRdkC0FEWf25pzx4f/NuOCK6quHmW18yF2Wx+G4Zi1A== + dependencies: + cookie-es "^1.0.0" + crossws "^0.2.2" + defu "^6.1.4" + destr "^2.0.3" + iron-webcrypto "^1.0.0" + ohash "^1.1.3" + radix3 "^1.1.0" + ufo "^1.4.0" + uncrypto "^0.1.3" + unenv "^1.9.0" + has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" @@ -6487,6 +6900,11 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" +http-shutdown@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/http-shutdown/-/http-shutdown-1.2.2.tgz#41bc78fc767637c4c95179bc492f312c0ae64c5f" + integrity sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw== + https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -6500,6 +6918,11 @@ human-signals@^4.3.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== +human-signals@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" + integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== + humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -6519,6 +6942,11 @@ iconv-lite@0.6, iconv-lite@0.6.3: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" +idb-keyval@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/idb-keyval/-/idb-keyval-6.2.1.tgz#94516d625346d16f56f3b33855da11bfded2db33" + integrity sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg== + ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -6574,6 +7002,11 @@ internal-slot@^1.0.3, internal-slot@^1.0.4, internal-slot@^1.0.5: resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== +iron-webcrypto@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz#aa60ff2aa10550630f4c0b11fd2442becdb35a6f" + integrity sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg== + is-arguments@^1.0.4, is-arguments@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" @@ -6642,6 +7075,11 @@ is-docker@^2.0.0: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-docker@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" + integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -6671,6 +7109,13 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-inside-container@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" + integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== + dependencies: + is-docker "^3.0.0" + is-map@^2.0.1, is-map@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" @@ -6781,6 +7226,20 @@ is-wsl@^2.1.1: dependencies: is-docker "^2.0.0" +is-wsl@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" + integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== + dependencies: + is-inside-container "^1.0.0" + +is64bit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is64bit/-/is64bit-2.0.0.tgz#198c627cbcb198bbec402251f88e5e1a51236c07" + integrity sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw== + dependencies: + system-architecture "^0.1.0" + isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" @@ -6796,6 +7255,14 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isomorphic-unfetch@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" + integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q== + dependencies: + node-fetch "^2.6.1" + unfetch "^4.2.0" + isomorphic-ws@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf" @@ -7096,6 +7563,30 @@ lint-staged@^14.0.1: string-argv "0.3.2" yaml "2.3.1" +listhen@^1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/listhen/-/listhen-1.7.2.tgz#66b81740692269d5d8cafdc475020f2fc51afbae" + integrity sha512-7/HamOm5YD9Wb7CFgAZkKgVPA96WwhcTQoqtm2VTZGVbVVn3IWKRBTgrU7cchA3Q8k9iCsG8Osoi9GX4JsGM9g== + dependencies: + "@parcel/watcher" "^2.4.1" + "@parcel/watcher-wasm" "^2.4.1" + citty "^0.1.6" + clipboardy "^4.0.0" + consola "^3.2.3" + crossws "^0.2.0" + defu "^6.1.4" + get-port-please "^3.1.2" + h3 "^1.10.2" + http-shutdown "^1.2.2" + jiti "^1.21.0" + mlly "^1.6.1" + node-forge "^1.3.1" + pathe "^1.1.2" + std-env "^3.7.0" + ufo "^1.4.0" + untun "^0.1.3" + uqr "^0.1.2" + listr2@6.6.1: version "6.6.1" resolved "https://registry.yarnpkg.com/listr2/-/listr2-6.6.1.tgz#08b2329e7e8ba6298481464937099f4a2cd7f95d" @@ -7188,6 +7679,11 @@ log-update@^5.0.1: strip-ansi "^7.0.1" wrap-ansi "^8.0.1" +long@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== + loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -7202,6 +7698,11 @@ loupe@^2.3.6: dependencies: get-func-name "^2.0.0" +lru-cache@^10.2.0: + version "10.2.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878" + integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -7285,6 +7786,11 @@ mime-types@^2.1.12: dependencies: mime-db "1.52.0" +mime@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" + integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -7385,6 +7891,16 @@ mlly@^1.2.0: pkg-types "^1.0.3" ufo "^1.1.2" +mlly@^1.6.1, mlly@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.0.tgz#587383ae40dda23cadb11c3c3cc972b277724271" + integrity sha512-U9SDaXGEREBYQgfejV97coK0UL1r+qnF2SyO9A3qcI8MzKnsIFKHNVEkrDyNncQTKQQumsasmeq84eNMdBfsNQ== + dependencies: + acorn "^8.11.3" + pathe "^1.1.2" + pkg-types "^1.1.0" + ufo "^1.5.3" + motion@10.16.2: version "10.16.2" resolved "https://registry.yarnpkg.com/motion/-/motion-10.16.2.tgz#7dc173c6ad62210a7e9916caeeaf22c51e598d21" @@ -7397,6 +7913,11 @@ motion@10.16.2: "@motionone/utils" "^10.15.1" "@motionone/vue" "^10.16.2" +mri@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" + integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -7426,6 +7947,11 @@ nanoid@^3.3.7: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== +napi-wasm@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.0.tgz#bbe617823765ae9c1bc12ff5942370eae7b2ba4e" + integrity sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg== + natural-compare-lite@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" @@ -7441,6 +7967,23 @@ node-addon-api@^2.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== +node-addon-api@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.0.tgz#71f609369379c08e251c558527a107107b5e0fdb" + integrity sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g== + +node-fetch-native@^1.6.1, node-fetch-native@^1.6.2, node-fetch-native@^1.6.3: + version "1.6.4" + resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz#679fc8fd8111266d47d7e72c379f1bed9acff06e" + integrity sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ== + +node-fetch@^2.6.1: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + node-fetch@^2.6.12, node-fetch@^2.6.7: version "2.6.12" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.12.tgz#02eb8e22074018e3d5a83016649d04df0e348fba" @@ -7448,6 +7991,11 @@ node-fetch@^2.6.12, node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" +node-forge@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== + node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: version "4.6.0" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" @@ -7575,6 +8123,20 @@ object.values@^1.1.6: define-properties "^1.1.4" es-abstract "^1.20.4" +ofetch@^1.3.3: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ofetch/-/ofetch-1.3.4.tgz#7ea65ced3c592ec2b9906975ae3fe1d26a56f635" + integrity sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw== + dependencies: + destr "^2.0.3" + node-fetch-native "^1.6.3" + ufo "^1.5.3" + +ohash@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.3.tgz#f12c3c50bfe7271ce3fd1097d42568122ccdcf07" + integrity sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw== + on-exit-leak-free@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz#b39c9e3bf7690d890f4861558b0d7b90a442d209" @@ -7751,6 +8313,11 @@ pathe@^1.1.0, pathe@^1.1.1: resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.1.tgz#1dd31d382b974ba69809adc9a7a347e65d84829a" integrity sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q== +pathe@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" + integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== + pathval@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" @@ -7841,6 +8408,15 @@ pkg-types@^1.0.3: mlly "^1.2.0" pathe "^1.1.0" +pkg-types@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.1.1.tgz#07b626880749beb607b0c817af63aac1845a73f2" + integrity sha512-ko14TjmDuQJ14zsotODv7dBlwxKhUKQEhuhmbqo1uCi9BB0Z2alo/wAXg6q1dTR5TyuqYyWhjtfe/Tsh+X28jQ== + dependencies: + confbox "^0.1.7" + mlly "^1.7.0" + pathe "^1.1.2" + playwright-core@1.43.1: version "1.43.1" resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.43.1.tgz#0eafef9994c69c02a1a3825a4343e56c99c03b02" @@ -8085,6 +8661,11 @@ quick-format-unescaped@^4.0.3: resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7" integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg== +radix3@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/radix3/-/radix3-1.1.2.tgz#fd27d2af3896c6bf4bcdfab6427c69c2afc69ec0" + integrity sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA== + randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -8533,7 +9114,7 @@ signal-exit@^3.0.2, signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -signal-exit@^4.0.1: +signal-exit@^4.0.1, signal-exit@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== @@ -8618,6 +9199,11 @@ std-env@^3.3.1: resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.4.3.tgz#326f11db518db751c83fd58574f449b7c3060910" integrity sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q== +std-env@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" + integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== + stop-iteration-iterator@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz#6a60be0b4ee757d1ed5254858ec66b10c49285e4" @@ -8658,16 +9244,7 @@ string-natural-compare@^3.0.1: resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.1.0, string-width@^4.2.0: +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -8740,14 +9317,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -8857,6 +9427,11 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +system-architecture@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/system-architecture/-/system-architecture-0.1.0.tgz#71012b3ac141427d97c67c56bc7921af6bff122d" + integrity sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA== + tabbable@^6.0.1: version "6.2.0" resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-6.2.0.tgz#732fb62bc0175cfcec257330be187dcfba1f3b97" @@ -9181,6 +9756,18 @@ ufo@^1.3.0: resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.3.1.tgz#e085842f4627c41d4c1b60ebea1f75cdab4ce86b" integrity sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw== +ufo@^1.4.0, ufo@^1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" + integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== + +uint8arrays@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.0.tgz#8186b8eafce68f28bd29bd29d683a311778901e2" + integrity sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog== + dependencies: + multiformats "^9.4.2" + uint8arrays@^3.0.0, uint8arrays@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" @@ -9198,6 +9785,27 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +uncrypto@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/uncrypto/-/uncrypto-0.1.3.tgz#e1288d609226f2d02d8d69ee861fa20d8348ef2b" + integrity sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q== + +unenv@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/unenv/-/unenv-1.9.0.tgz#469502ae85be1bd3a6aa60f810972b1a904ca312" + integrity sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g== + dependencies: + consola "^3.2.3" + defu "^6.1.3" + mime "^3.0.0" + node-fetch-native "^1.6.1" + pathe "^1.1.1" + +unfetch@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" + integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" @@ -9241,6 +9849,31 @@ unplugin@1.0.1: webpack-sources "^3.2.3" webpack-virtual-modules "^0.5.0" +unstorage@^1.9.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.10.2.tgz#fb7590ada8b30e83be9318f85100158b02a76dae" + integrity sha512-cULBcwDqrS8UhlIysUJs2Dk0Mmt8h7B0E6mtR+relW9nZvsf/u4SkAYyNliPiPW7XtFNb5u3IUMkxGxFTTRTgQ== + dependencies: + anymatch "^3.1.3" + chokidar "^3.6.0" + destr "^2.0.3" + h3 "^1.11.1" + listhen "^1.7.2" + lru-cache "^10.2.0" + mri "^1.2.0" + node-fetch-native "^1.6.2" + ofetch "^1.3.3" + ufo "^1.4.0" + +untun@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/untun/-/untun-0.1.3.tgz#5d10dee37a3a5737ff03d158be877dae0a0e58a6" + integrity sha512-4luGP9LMYszMRZwsvyUd9MrxgEGZdZuZgpVQHEEX0lCYFESasVRvZd0EYpCkOIbJKHMuv0LskpXc/8Un+MJzEQ== + dependencies: + citty "^0.1.5" + consola "^3.2.3" + pathe "^1.1.1" + update-browserslist-db@^1.0.11: version "1.0.11" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" @@ -9249,6 +9882,11 @@ update-browserslist-db@^1.0.11: escalade "^3.1.1" picocolors "^1.0.0" +uqr@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/uqr/-/uqr-0.1.2.tgz#5c6cd5dcff9581f9bb35b982cb89e2c483a41d7d" + integrity sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA== + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -9539,7 +10177,7 @@ wordwrapjs@^4.0.0: reduce-flatten "^2.0.0" typical "^5.2.0" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -9557,15 +10195,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.0.1, wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 5389446434e72ec1436801229a44f08a29daec7c Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Wed, 29 May 2024 13:36:13 +0100 Subject: [PATCH 02/77] Adjust wallet icon width and height to 100% --- src/assets/logos/compassWallet.svg | 2 +- src/assets/logos/seifWallet.svg | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/assets/logos/compassWallet.svg b/src/assets/logos/compassWallet.svg index 881354a54..6fbd850ee 100644 --- a/src/assets/logos/compassWallet.svg +++ b/src/assets/logos/compassWallet.svg @@ -1,4 +1,4 @@ - + diff --git a/src/assets/logos/seifWallet.svg b/src/assets/logos/seifWallet.svg index 7db81fd9b..860057f4b 100644 --- a/src/assets/logos/seifWallet.svg +++ b/src/assets/logos/seifWallet.svg @@ -1,12 +1,14 @@ - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file From b7cbc9a6e07607bd19eb16db942d210ff791d7ab Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Wed, 29 May 2024 14:12:06 +0100 Subject: [PATCH 03/77] Fix build issues --- src/libs/web3/web3.connectors.ts | 24 ++++++++++++++---------- src/libs/web3/web3.utils.ts | 12 ++++++++++++ 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/libs/web3/web3.connectors.ts b/src/libs/web3/web3.connectors.ts index 219342caa..ad7a70c33 100644 --- a/src/libs/web3/web3.connectors.ts +++ b/src/libs/web3/web3.connectors.ts @@ -23,7 +23,10 @@ import { SupportedChainId, } from 'libs/web3/web3.constants'; import { Connection } from 'libs/web3/web3.types'; -import { getSeifInjectedProvider } from './web3.utils'; +import { + getCompassEvmInjectedProvider, + getSeifInjectedProvider, +} from './web3.utils'; const onError = (error: Error) => { console.debug(`web3-react error: ${error}`); @@ -164,15 +167,16 @@ export const tailwindWalletConnection: Connection = { // Compass WALLET CONNECTOR // ********************************** // -export const [web3CompassWallet, web3CompassWalletHooks] = window.compassEvm - ? initializeConnector( - (actions) => - new EIP1193({ - actions, - provider: window.compassEvm!, - }) - ) - : initializeConnector(() => EMPTY); +export const [web3CompassWallet, web3CompassWalletHooks] = + getCompassEvmInjectedProvider + ? initializeConnector( + (actions) => + new EIP1193({ + actions, + provider: getCompassEvmInjectedProvider(), + }) + ) + : initializeConnector(() => EMPTY); export const compassWalletConnection: Connection = { connector: web3CompassWallet, diff --git a/src/libs/web3/web3.utils.ts b/src/libs/web3/web3.utils.ts index d318b18f2..05369a838 100644 --- a/src/libs/web3/web3.utils.ts +++ b/src/libs/web3/web3.utils.ts @@ -45,6 +45,18 @@ export function getSeifInjectedProvider() { return; } +export function getCompassEvmInjectedProvider() { + if (typeof window === 'undefined') return; + if (window.ethereum && (window as any).ethereum['isCompassWallet']) { + return window.ethereum; + } + + if ((window as any)['compassEvm']) { + return (window as any)['compassEvm']; + } + + return; +} export const getChainInfo = (): AddChainParameter => { return { From 359b46e4ecf74d194a453981b522300d5326c572 Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Wed, 29 May 2024 14:20:22 +0100 Subject: [PATCH 04/77] Refactor injected wallet check --- src/libs/web3/web3.connectors.ts | 34 ++++++++++++----------- src/libs/web3/web3.utils.ts | 46 ++++++++++++++------------------ 2 files changed, 38 insertions(+), 42 deletions(-) diff --git a/src/libs/web3/web3.connectors.ts b/src/libs/web3/web3.connectors.ts index ad7a70c33..52791aef4 100644 --- a/src/libs/web3/web3.connectors.ts +++ b/src/libs/web3/web3.connectors.ts @@ -23,10 +23,7 @@ import { SupportedChainId, } from 'libs/web3/web3.constants'; import { Connection } from 'libs/web3/web3.types'; -import { - getCompassEvmInjectedProvider, - getSeifInjectedProvider, -} from './web3.utils'; +import { getInjectedProvider } from './web3.utils'; const onError = (error: Error) => { console.debug(`web3-react error: ${error}`); @@ -167,16 +164,18 @@ export const tailwindWalletConnection: Connection = { // Compass WALLET CONNECTOR // ********************************** // -export const [web3CompassWallet, web3CompassWalletHooks] = - getCompassEvmInjectedProvider - ? initializeConnector( - (actions) => - new EIP1193({ - actions, - provider: getCompassEvmInjectedProvider(), - }) - ) - : initializeConnector(() => EMPTY); +export const [web3CompassWallet, web3CompassWalletHooks] = getInjectedProvider( + 'compassEvm', + 'isCompassWallet' +) + ? initializeConnector( + (actions) => + new EIP1193({ + actions, + provider: getInjectedProvider('compassEvm', 'isCompassWallet'), + }) + ) + : initializeConnector(() => EMPTY); export const compassWalletConnection: Connection = { connector: web3CompassWallet, @@ -190,12 +189,15 @@ export const compassWalletConnection: Connection = { // Seif WALLET CONNECTOR // ********************************** // -export const [web3SeifWallet, web3SeifWalletHooks] = getSeifInjectedProvider() +export const [web3SeifWallet, web3SeifWalletHooks] = getInjectedProvider( + '__seif', + '__seif' +) ? initializeConnector( (actions) => new EIP1193({ actions, - provider: getSeifInjectedProvider(), + provider: getInjectedProvider('__seif', '__seif'), }) ) : initializeConnector(() => EMPTY); diff --git a/src/libs/web3/web3.utils.ts b/src/libs/web3/web3.utils.ts index 05369a838..009a23d4a 100644 --- a/src/libs/web3/web3.utils.ts +++ b/src/libs/web3/web3.utils.ts @@ -19,6 +19,26 @@ const { type } = parser.getDevice(); export const isMobile = type === 'mobile' || type === 'tablet'; +/** + * Get the inject wallet provider in window + * + * @param flag name of the flag in window.ethereum to check. If undefined, will not check this flag and default to walletObject + * @param walletObject name of the object in window that the injected provider will populate + * @returns Injected provider in wallet or undefined if not present + */ +export function getInjectedProvider(walletObject: string, flag?: string) { + if (typeof window === 'undefined') return; + if (window.ethereum && flag && (window as any).ethereum[walletObject]) { + return window.ethereum; + } + + if ((window as any)[walletObject]) { + return (window as any)[walletObject]; + } + + return; +} + // Interface to add new chain to injected wallets as per EIP-3085 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-3085.md) export interface AddChainParameter { chainId: number; // EIP-3085 specifies hex string but web3-react expects number @@ -32,32 +52,6 @@ export interface AddChainParameter { blockExplorerUrls?: string[]; iconUrls?: string[]; } - -export function getSeifInjectedProvider() { - if (typeof window === 'undefined') return; - if (window.ethereum && (window as any).ethereum['__seif']) { - return window.ethereum; - } - - if ((window as any)['__seif']) { - return (window as any)['__seif']; - } - - return; -} -export function getCompassEvmInjectedProvider() { - if (typeof window === 'undefined') return; - if (window.ethereum && (window as any).ethereum['isCompassWallet']) { - return window.ethereum; - } - - if ((window as any)['compassEvm']) { - return (window as any)['compassEvm']; - } - - return; -} - export const getChainInfo = (): AddChainParameter => { return { chainId: config.network.chainId, From 096f5fc72f95aaa450d57d70a0b4c1d21d4bbe4c Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Wed, 29 May 2024 15:18:27 +0100 Subject: [PATCH 05/77] Add tailwind wallet svg logo --- src/assets/logos/tailwindWallet.svg | 13 +++++++++++++ .../core/menu/mainMenu/MainMenuRightWallet.tsx | 2 +- src/libs/web3/web3.connectors.ts | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 src/assets/logos/tailwindWallet.svg diff --git a/src/assets/logos/tailwindWallet.svg b/src/assets/logos/tailwindWallet.svg new file mode 100644 index 000000000..abdb67816 --- /dev/null +++ b/src/assets/logos/tailwindWallet.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx b/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx index 69271484a..ea2da511c 100644 --- a/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx +++ b/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx @@ -4,7 +4,7 @@ import { ReactComponent as IconWarning } from 'assets/icons/warning.svg'; import { ReactComponent as IconCopy } from 'assets/icons/copy.svg'; import { ReactComponent as IconCoinbaseLogo } from 'assets/logos/coinbase.svg'; import { ReactComponent as IconCompassWalletLogo } from 'assets/logos/compassWallet.svg'; -import { ReactComponent as IconTailwindWalletLogo } from 'assets/logos/coinbase.svg'; +import { ReactComponent as IconTailwindWalletLogo } from 'assets/logos/tailwindWallet.svg'; import { ReactComponent as IconSeifWalletLogo } from 'assets/logos/seifWallet.svg'; import { ReactComponent as IconGnosisLogo } from 'assets/logos/gnosis.svg'; import { ReactComponent as IconImposterLogo } from 'assets/logos/imposter.svg'; diff --git a/src/libs/web3/web3.connectors.ts b/src/libs/web3/web3.connectors.ts index 52791aef4..f3769944a 100644 --- a/src/libs/web3/web3.connectors.ts +++ b/src/libs/web3/web3.connectors.ts @@ -11,7 +11,7 @@ import { TailwindConnector } from '@tailwindzone/connect-web3-react'; import iconMetaMask from 'assets/logos/metamask.svg'; import iconWalletConnect from 'assets/logos/walletConnect.svg'; import iconCoinbase from 'assets/logos/coinbase.svg'; -import iconTailwindWallet from 'assets/logos/coinbase.svg'; +import iconTailwindWallet from 'assets/logos/tailwindWallet.svg'; import iconCompassWallet from 'assets/logos/compassWallet.svg'; import iconSeifWallet from 'assets/logos/seifWallet.svg'; import iconGnosis from 'assets/logos/gnosis.svg'; From 700cdaf8a787c88303e5380e5911bd11b9f28d12 Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Wed, 29 May 2024 17:08:02 +0100 Subject: [PATCH 06/77] Add noConnector placeholder connector and use in tailwind, seif, and compass wallets --- package.json | 1 + src/libs/web3/noconnector.ts | 35 ++++++++++++++++++++++++++++ src/libs/web3/web3.connectors.ts | 40 +++++++++++++++++++++++++------- 3 files changed, 68 insertions(+), 8 deletions(-) create mode 100644 src/libs/web3/noconnector.ts diff --git a/package.json b/package.json index 0571e155f..697573e3b 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@playwright/test": "^1.43.1", "@sentry/react": "^7.48.0", "@sentry/vite-plugin": "^0.7.2", + "@tailwindzone/connect": "^2.4.2", "@tailwindzone/connect-web3-react": "^1.0.0", "@tanstack/react-query": "^4.14.5", "@tanstack/react-query-devtools": "^4.14.5", diff --git a/src/libs/web3/noconnector.ts b/src/libs/web3/noconnector.ts new file mode 100644 index 000000000..2ab32bf76 --- /dev/null +++ b/src/libs/web3/noconnector.ts @@ -0,0 +1,35 @@ +import { Actions, Connector } from '@web3-react/types'; + +export interface NoConnectorArgs { + actions: Actions; + name: string; + url: string; +} + +export class NoConnectorError extends Error { + public constructor(name: string) { + super(`${name} not installed, redirecting to website...`); + this.name = NoConnectorError.name; + Object.setPrototypeOf(this, NoConnectorError.prototype); + } +} + +export class NoConnector extends Connector { + /** {@inheritdoc Connector.provider} */ + public declare readonly provider: undefined; + name: string; + url: string; + + // eslint-disable-next-line no-this-before-super + constructor({ actions, name, url }: NoConnectorArgs) { + super(actions); + this.name = name; + this.url = url; + } + public activate() { + setTimeout(() => { + window.open(this.url, '_blank'); + }, 3000); + throw new NoConnectorError(this.name); + } +} diff --git a/src/libs/web3/web3.connectors.ts b/src/libs/web3/web3.connectors.ts index f3769944a..2b9756905 100644 --- a/src/libs/web3/web3.connectors.ts +++ b/src/libs/web3/web3.connectors.ts @@ -2,11 +2,11 @@ import { StaticJsonRpcProvider } from '@ethersproject/providers'; import { initializeConnector } from '@web3-react/core'; import { CoinbaseWallet } from '@web3-react/coinbase-wallet'; import { EIP1193 } from '@web3-react/eip1193'; -import { EMPTY, Empty } from '@web3-react/empty'; import { MetaMask } from '@web3-react/metamask'; import { WalletConnect } from '@web3-react/walletconnect-v2'; import { Network } from '@web3-react/network'; import { GnosisSafe } from '@web3-react/gnosis-safe'; +import { connect } from '@tailwindzone/connect'; import { TailwindConnector } from '@tailwindzone/connect-web3-react'; import iconMetaMask from 'assets/logos/metamask.svg'; import iconWalletConnect from 'assets/logos/walletConnect.svg'; @@ -23,7 +23,8 @@ import { SupportedChainId, } from 'libs/web3/web3.constants'; import { Connection } from 'libs/web3/web3.types'; -import { getInjectedProvider } from './web3.utils'; +import { getInjectedProvider } from 'libs/web3/web3.utils'; +import { NoConnector } from 'libs/web3/noconnector'; const onError = (error: Error) => { console.debug(`web3-react error: ${error}`); @@ -148,10 +149,19 @@ export const coinbaseWalletConnection: Connection = { // Tailwind WALLET CONNECTOR // ********************************** // -const [web3TailwindWallet, web3TailwindWalletHooks] = - initializeConnector( - (actions) => new TailwindConnector({ actions }) - ); +const [web3TailwindWallet, web3TailwindWalletHooks] = (await connect()) + ? initializeConnector( + (actions) => new TailwindConnector({ actions }) + ) + : initializeConnector( + (actions) => + new NoConnector({ + actions, + name: 'Tailwind Wallet', + url: 'https://www.tailwind.zone/', + }) + ); + export const tailwindWalletConnection: Connection = { connector: web3TailwindWallet, hooks: web3TailwindWalletHooks, @@ -175,7 +185,14 @@ export const [web3CompassWallet, web3CompassWalletHooks] = getInjectedProvider( provider: getInjectedProvider('compassEvm', 'isCompassWallet'), }) ) - : initializeConnector(() => EMPTY); + : initializeConnector( + (actions) => + new NoConnector({ + actions, + name: 'Compass Wallet', + url: 'https://compasswallet.io/', + }) + ); export const compassWalletConnection: Connection = { connector: web3CompassWallet, @@ -200,7 +217,14 @@ export const [web3SeifWallet, web3SeifWalletHooks] = getInjectedProvider( provider: getInjectedProvider('__seif', '__seif'), }) ) - : initializeConnector(() => EMPTY); + : initializeConnector( + (actions) => + new NoConnector({ + actions, + name: 'Seif Wallet', + url: 'https://seif.passkeywallet.com/', + }) + ); export const seifWalletConnection: Connection = { connector: web3SeifWallet, From 597163754c1a1ff19b2e5bdceec2ea068c98a066 Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Wed, 29 May 2024 17:47:22 +0100 Subject: [PATCH 07/77] Check injected wallet is not metamask for getInjectedProvider, remove error from Tailwind Wallet --- package.json | 3 +-- src/libs/web3/web3.connectors.ts | 17 ++++------------- src/libs/web3/web3.utils.ts | 11 +++++++++-- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 697573e3b..5fd13ed01 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "@playwright/test": "^1.43.1", "@sentry/react": "^7.48.0", "@sentry/vite-plugin": "^0.7.2", - "@tailwindzone/connect": "^2.4.2", "@tailwindzone/connect-web3-react": "^1.0.0", "@tanstack/react-query": "^4.14.5", "@tanstack/react-query-devtools": "^4.14.5", @@ -131,4 +130,4 @@ "devDependencies": { "@types/d3": "^7.4.3" } -} \ No newline at end of file +} diff --git a/src/libs/web3/web3.connectors.ts b/src/libs/web3/web3.connectors.ts index 2b9756905..004bd9d9e 100644 --- a/src/libs/web3/web3.connectors.ts +++ b/src/libs/web3/web3.connectors.ts @@ -6,7 +6,6 @@ import { MetaMask } from '@web3-react/metamask'; import { WalletConnect } from '@web3-react/walletconnect-v2'; import { Network } from '@web3-react/network'; import { GnosisSafe } from '@web3-react/gnosis-safe'; -import { connect } from '@tailwindzone/connect'; import { TailwindConnector } from '@tailwindzone/connect-web3-react'; import iconMetaMask from 'assets/logos/metamask.svg'; import iconWalletConnect from 'assets/logos/walletConnect.svg'; @@ -149,18 +148,10 @@ export const coinbaseWalletConnection: Connection = { // Tailwind WALLET CONNECTOR // ********************************** // -const [web3TailwindWallet, web3TailwindWalletHooks] = (await connect()) - ? initializeConnector( - (actions) => new TailwindConnector({ actions }) - ) - : initializeConnector( - (actions) => - new NoConnector({ - actions, - name: 'Tailwind Wallet', - url: 'https://www.tailwind.zone/', - }) - ); +const [web3TailwindWallet, web3TailwindWalletHooks] = + initializeConnector( + (actions) => new TailwindConnector({ actions }) + ); export const tailwindWalletConnection: Connection = { connector: web3TailwindWallet, diff --git a/src/libs/web3/web3.utils.ts b/src/libs/web3/web3.utils.ts index 009a23d4a..0fb736594 100644 --- a/src/libs/web3/web3.utils.ts +++ b/src/libs/web3/web3.utils.ts @@ -20,7 +20,9 @@ const { type } = parser.getDevice(); export const isMobile = type === 'mobile' || type === 'tablet'; /** - * Get the inject wallet provider in window + * Get the injected wallet provider in window + * Returns window.ethereum if window.ethereum exists, window.ethereum[flag], is true and window.ethereum is not metamask + * Otherwise, returns window[walletObject] * * @param flag name of the flag in window.ethereum to check. If undefined, will not check this flag and default to walletObject * @param walletObject name of the object in window that the injected provider will populate @@ -28,7 +30,12 @@ export const isMobile = type === 'mobile' || type === 'tablet'; */ export function getInjectedProvider(walletObject: string, flag?: string) { if (typeof window === 'undefined') return; - if (window.ethereum && flag && (window as any).ethereum[walletObject]) { + if ( + window.ethereum && + flag && + (window as any).ethereum[flag] && + !(window as any).ethereum?.isMetamask + ) { return window.ethereum; } From 621cbdd398de4f01a5a19ad3f7ece83b99be3c9d Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Wed, 29 May 2024 18:14:13 +0100 Subject: [PATCH 08/77] Check injected connector exists on window.ethereum. If not, redirect to metamask website --- src/libs/web3/web3.connectors.ts | 15 ++++++++++++--- src/libs/web3/web3.utils.ts | 7 +------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/libs/web3/web3.connectors.ts b/src/libs/web3/web3.connectors.ts index 004bd9d9e..5b1bcc57b 100644 --- a/src/libs/web3/web3.connectors.ts +++ b/src/libs/web3/web3.connectors.ts @@ -59,9 +59,18 @@ export const networkConnection: Connection = { // INJECTED CONNECTOR // ********************************** // -const [web3Injected, web3InjectedHooks] = initializeConnector( - (actions) => new MetaMask({ actions, onError }) -); +const [web3Injected, web3InjectedHooks] = getInjectedProvider('ethereum') + ? initializeConnector( + (actions) => new MetaMask({ actions, onError }) + ) + : initializeConnector( + (actions) => + new NoConnector({ + actions, + name: 'Metamask', + url: 'https://metamask.io/', + }) + ); export const injectedConnection: Connection = { connector: web3Injected, hooks: web3InjectedHooks, diff --git a/src/libs/web3/web3.utils.ts b/src/libs/web3/web3.utils.ts index 0fb736594..37bc231e1 100644 --- a/src/libs/web3/web3.utils.ts +++ b/src/libs/web3/web3.utils.ts @@ -30,12 +30,7 @@ export const isMobile = type === 'mobile' || type === 'tablet'; */ export function getInjectedProvider(walletObject: string, flag?: string) { if (typeof window === 'undefined') return; - if ( - window.ethereum && - flag && - (window as any).ethereum[flag] && - !(window as any).ethereum?.isMetamask - ) { + if (window.ethereum && flag && (window as any).ethereum[flag]) { return window.ethereum; } From 2fec02858548074b07059a2ecf3c2eb78b1fe3f1 Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Wed, 29 May 2024 18:17:07 +0100 Subject: [PATCH 09/77] Update tailwind logo --- src/assets/logos/tailwindWallet.svg | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/assets/logos/tailwindWallet.svg b/src/assets/logos/tailwindWallet.svg index abdb67816..154d6c96d 100644 --- a/src/assets/logos/tailwindWallet.svg +++ b/src/assets/logos/tailwindWallet.svg @@ -1,13 +1,12 @@ - + + + - - - + + + - - - \ No newline at end of file From 9bc4ed34ffaf6ed4bbe99ba3e7bcb8b27054e914 Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Wed, 29 May 2024 18:36:29 +0100 Subject: [PATCH 10/77] Remove eslint disable comment --- src/libs/web3/noconnector.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/web3/noconnector.ts b/src/libs/web3/noconnector.ts index 2ab32bf76..e0543f660 100644 --- a/src/libs/web3/noconnector.ts +++ b/src/libs/web3/noconnector.ts @@ -20,7 +20,6 @@ export class NoConnector extends Connector { name: string; url: string; - // eslint-disable-next-line no-this-before-super constructor({ actions, name, url }: NoConnectorArgs) { super(actions); this.name = name; From 2b993ae3f17b24053690b3799eff6a17786b28c7 Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Wed, 29 May 2024 18:37:23 +0100 Subject: [PATCH 11/77] Replace multicall3 address by the official deployment one --- src/config/sei/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/sei/common.ts b/src/config/sei/common.ts index 6a177707a..83785d6bf 100644 --- a/src/config/sei/common.ts +++ b/src/config/sei/common.ts @@ -55,7 +55,7 @@ export const commonConfig: AppConfig = { voucher: '0xA4682A2A5Fe02feFF8Bd200240A41AD0E6EaF8d5', }, utils: { - multicall: '0xe033Bed7cae4114Af84Be1e9F1CA7DEa07Dfe1Cf', + multicall: '0xcA11bde05977b3631167028862bE2a173976CA11', }, }, tokenListOverride: [ From b92cd935605735ec160110c1271ca7d28deae0d7 Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Mon, 3 Jun 2024 14:39:58 +0100 Subject: [PATCH 12/77] Update tailwind wallet connector --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5fd13ed01..7fa4c12f3 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@playwright/test": "^1.43.1", "@sentry/react": "^7.48.0", "@sentry/vite-plugin": "^0.7.2", - "@tailwindzone/connect-web3-react": "^1.0.0", + "@tailwindzone/connect-web3-react": "^1.1.0", "@tanstack/react-query": "^4.14.5", "@tanstack/react-query-devtools": "^4.14.5", "@tanstack/react-router": "^1.4.9", @@ -130,4 +130,4 @@ "devDependencies": { "@types/d3": "^7.4.3" } -} +} \ No newline at end of file From 7d367d64f32687bbaa526627ff88974df9b7f46e Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Mon, 3 Jun 2024 14:42:45 +0100 Subject: [PATCH 13/77] Rename selectableConnection to selectedConnection to avoid confusion --- src/config/ethereum/common.ts | 2 +- src/config/sei/common.ts | 2 +- src/config/types.ts | 2 +- src/libs/modals/modals/WalletModal/ModalWalletContent.tsx | 4 ++-- src/libs/web3/Web3ReactWrapper.tsx | 4 ++-- src/libs/web3/index.ts | 2 +- src/libs/web3/web3.constants.ts | 8 ++++++-- 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/config/ethereum/common.ts b/src/config/ethereum/common.ts index 7214f3e77..6c20c5e76 100644 --- a/src/config/ethereum/common.ts +++ b/src/config/ethereum/common.ts @@ -25,7 +25,7 @@ export const commonConfig: AppConfig = { mode: 'development', appUrl: 'https://app.carbondefi.xyz', carbonApi: 'https://api.carbondefi.xyz/v1/', - selectableConnectionTypes: [ + selectedConnectionTypes: [ 'injected', 'walletConnect', 'coinbaseWallet', diff --git a/src/config/sei/common.ts b/src/config/sei/common.ts index 83785d6bf..cff3c9e68 100644 --- a/src/config/sei/common.ts +++ b/src/config/sei/common.ts @@ -12,7 +12,7 @@ export const commonConfig: AppConfig = { mode: 'development', appUrl: 'https://sei.carbondefi.xyz', carbonApi: 'https://sei-api.carbondefi.xyz/v1/', - selectableConnectionTypes: [ + selectedConnectionTypes: [ 'injected', 'coinbaseWallet', 'tailwindWallet', diff --git a/src/config/types.ts b/src/config/types.ts index f8db02277..e1acb592f 100644 --- a/src/config/types.ts +++ b/src/config/types.ts @@ -5,7 +5,7 @@ export interface AppConfig { mode: 'development' | 'production'; appUrl: string; carbonApi: string; - selectableConnectionTypes: selectableConnectionType[]; + selectedConnectionTypes: selectableConnectionType[]; walletConnectProjectId: string; isSimulatorEnabled: boolean; sentryDSN?: string; diff --git a/src/libs/modals/modals/WalletModal/ModalWalletContent.tsx b/src/libs/modals/modals/WalletModal/ModalWalletContent.tsx index 8df4bcd5f..367adc1bb 100644 --- a/src/libs/modals/modals/WalletModal/ModalWalletContent.tsx +++ b/src/libs/modals/modals/WalletModal/ModalWalletContent.tsx @@ -1,6 +1,6 @@ import { FC, useState } from 'react'; import { NewTabLink, Link } from 'libs/routing'; -import { Connection, selectableConnectionTypes } from 'libs/web3'; +import { Connection, selectedConnectionTypes } from 'libs/web3'; import { getConnection } from 'libs/web3/web3.utils'; import { Imager } from 'components/common/imager/Imager'; import { Checkbox } from 'components/common/Checkbox/Checkbox'; @@ -64,7 +64,7 @@ export const ModalWalletContent: FC = ({ onClick, isLoading }) => { - {selectableConnectionTypes.map(getConnection).map((c) => ( + {selectedConnectionTypes.map(getConnection).map((c) => ( Wallet Logo; + + switch (selectedWallet) { + case 'MetaMask': + return ; + case 'WalletConnect': + return ; + case 'Coinbase Wallet': + return ; + case 'Safe': + return ; + case 'Tailwind Wallet': + return ; + case 'Compass Wallet': + return ; + case 'Seif Wallet': + return ; + default: + return ; + } +}; diff --git a/src/components/common/approval/ApproveToken.tsx b/src/components/common/approval/ApproveToken.tsx index 88410f6f5..eca73ecd6 100644 --- a/src/components/common/approval/ApproveToken.tsx +++ b/src/components/common/approval/ApproveToken.tsx @@ -5,7 +5,7 @@ import { Switch } from 'components/common/switch'; import { ApprovalTokenResult } from 'hooks/useApproval'; import { LogoImager } from 'components/common/imager/Imager'; import { QueryKey, useQueryClient } from 'libs/queries'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { useNotifications } from 'hooks/useNotifications'; import { useTokens } from 'hooks/useTokens'; import { carbonEvents } from 'services/events'; @@ -33,7 +33,7 @@ export const ApproveToken: FC = ({ context, }) => { const { dispatchNotification } = useNotifications(); - const { user } = useWeb3(); + const { user } = useWagmi(); const { getTokenById } = useTokens(); const token = getTokenById(data?.address || ''); const mutation = useSetUserApproval(); diff --git a/src/components/core/MainContent.tsx b/src/components/core/MainContent.tsx index c4e677fe0..1afc9e941 100644 --- a/src/components/core/MainContent.tsx +++ b/src/components/core/MainContent.tsx @@ -1,5 +1,5 @@ import { FC, useEffect, useRef } from 'react'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { ErrorUnsupportedNetwork } from 'components/core/error/ErrorUnsupportedNetwork'; import { ErrorNetworkConnection } from 'components/core/error/ErrorNetworkConnection'; import { useTokens } from 'hooks/useTokens'; @@ -23,7 +23,7 @@ const paths: Record = { }; export const MainContent: FC = () => { - const web3 = useWeb3(); + const web3 = useWagmi(); const { location } = useRouterState(); const prevPathnameRef = useRef(''); const tokens = useTokens(); diff --git a/src/components/core/error/ErrorUnsupportedNetwork.tsx b/src/components/core/error/ErrorUnsupportedNetwork.tsx index b491452e8..e755c1fa6 100644 --- a/src/components/core/error/ErrorUnsupportedNetwork.tsx +++ b/src/components/core/error/ErrorUnsupportedNetwork.tsx @@ -1,11 +1,11 @@ import { ReactComponent as IconWarning } from 'assets/icons/warning.svg'; import { Button } from 'components/common/button'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { ErrorWrapper } from 'components/core/error/ErrorWrapper'; import config from 'config'; export const ErrorUnsupportedNetwork = () => { - const { disconnect, switchNetwork } = useWeb3(); + const { disconnect, switchNetwork } = useWagmi(); const networkName = config.network.name; diff --git a/src/components/core/error/ErrorUserBlocked.tsx b/src/components/core/error/ErrorUserBlocked.tsx index dc6f645e3..9e7d8468c 100644 --- a/src/components/core/error/ErrorUserBlocked.tsx +++ b/src/components/core/error/ErrorUserBlocked.tsx @@ -1,11 +1,11 @@ -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { NewTabLink, externalLinks } from 'libs/routing'; import { ErrorWrapper } from 'components/core/error/ErrorWrapper'; import { Button } from 'components/common/button'; import { ReactComponent as IconWarning } from 'assets/icons/warning.svg'; export const ErrorUserBlocked = () => { - const { disconnect } = useWeb3(); + const { disconnect } = useWagmi(); return ( { - const { user } = useWeb3(); + const { user } = useWagmi(); const { openModal } = useModal(); const { hasPendingTx, notifications } = useNotifications(); diff --git a/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx b/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx index ea2da511c..e50cf3e07 100644 --- a/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx +++ b/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx @@ -2,61 +2,32 @@ import { ReactComponent as IconDisconnect } from 'assets/icons/disconnect.svg'; import { ReactComponent as IconWallet } from 'assets/icons/wallet.svg'; import { ReactComponent as IconWarning } from 'assets/icons/warning.svg'; import { ReactComponent as IconCopy } from 'assets/icons/copy.svg'; -import { ReactComponent as IconCoinbaseLogo } from 'assets/logos/coinbase.svg'; -import { ReactComponent as IconCompassWalletLogo } from 'assets/logos/compassWallet.svg'; -import { ReactComponent as IconTailwindWalletLogo } from 'assets/logos/tailwindWallet.svg'; -import { ReactComponent as IconSeifWalletLogo } from 'assets/logos/seifWallet.svg'; -import { ReactComponent as IconGnosisLogo } from 'assets/logos/gnosis.svg'; -import { ReactComponent as IconImposterLogo } from 'assets/logos/imposter.svg'; -import { ReactComponent as IconMetaMaskLogo } from 'assets/logos/metamask.svg'; -import { ReactComponent as IconWalletConnectLogo } from 'assets/logos/walletConnect.svg'; import { Button } from 'components/common/button'; import { buttonStyles } from 'components/common/button/buttonStyles'; import { DropdownMenu, useMenuCtx } from 'components/common/dropdownMenu'; import { useModal } from 'hooks/useModal'; - -import { useWeb3 } from 'libs/web3'; -import { getConnection } from 'libs/web3/web3.utils'; +import { useWagmi } from 'libs/wagmi'; import { FC, useMemo, useEffect } from 'react'; import { carbonEvents } from 'services/events'; import { useStore } from 'store'; import { cn, shortenString } from 'utils/helpers'; import { useGetEnsFromAddress } from 'libs/queries/chain/ens'; import config from 'config'; +import { WalletIcon } from 'components/common/WalletIcon'; const iconProps = { className: 'w-20' }; -const WalletIcon = ({ isImposter }: { isImposter: boolean }) => { - const { selectedWallet } = useStore(); - - if (isImposter) { - return ; - } - - switch (selectedWallet) { - case 'injected': - return ; - case 'walletConnect': - return ; - case 'coinbaseWallet': - return ; - case 'gnosisSafe': - return ; - case 'tailwindWallet': - return ; - case 'compassWallet': - return ; - case 'seifWallet': - return ; - default: - return ; - } -}; - export const MainMenuRightWallet: FC = () => { - const { user, isSupportedNetwork, isImposter, isUserBlocked } = useWeb3(); - const { selectedWallet, isManualConnection } = useStore(); + const { + user, + isSupportedNetwork, + isImposter, + isUserBlocked, + currentConnector, + } = useWagmi(); + const { isManualConnection } = useStore(); const { openModal } = useModal(); + const selectedWallet = currentConnector?.name; const onClickOpenModal = () => { carbonEvents.navigation.navWalletConnectClick(undefined); @@ -71,7 +42,7 @@ export const MainMenuRightWallet: FC = () => { if (!isManualConnection.current) { carbonEvents.wallet.walletConnected({ address: user, - name: getConnection(selectedWallet)?.name || '', + name: selectedWallet || '', }); } else { isManualConnection.current = false; // Expect an auto wallet connection next @@ -97,8 +68,22 @@ export const MainMenuRightWallet: FC = () => { if (isUserBlocked) return ; if (!isSupportedNetwork) return ; if (!user) return ; - return ; - }, [isSupportedNetwork, isUserBlocked, user, isImposter]); + return ( + + ); + }, [ + isUserBlocked, + isSupportedNetwork, + user, + isImposter, + selectedWallet, + currentConnector?.icon, + ]); if (user) { return ( @@ -143,7 +128,7 @@ export const MainMenuRightWallet: FC = () => { const ConnectedMenu: FC = () => { const { toaster } = useStore(); const { setMenuOpen } = useMenuCtx(); - const { user, disconnect, isSupportedNetwork, switchNetwork } = useWeb3(); + const { user, disconnect, isSupportedNetwork, switchNetwork } = useWagmi(); const onDisconnect = async () => { await disconnect(); diff --git a/src/components/debug/DebugBalance.tsx b/src/components/debug/DebugBalance.tsx index 0b67219b9..ce8776dfa 100644 --- a/src/components/debug/DebugBalance.tsx +++ b/src/components/debug/DebugBalance.tsx @@ -1,8 +1,8 @@ -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { useCallback, useEffect, useState } from 'react'; export const DebugBalance = () => { - const { provider, user } = useWeb3(); + const { provider, user } = useWagmi(); const [balance, setBalance] = useState(''); const fetchGasToken = useCallback(async () => { diff --git a/src/components/debug/DebugCreateStrategy.tsx b/src/components/debug/DebugCreateStrategy.tsx index 69303e171..01ca21217 100644 --- a/src/components/debug/DebugCreateStrategy.tsx +++ b/src/components/debug/DebugCreateStrategy.tsx @@ -10,7 +10,7 @@ import { FAUCET_TOKENS } from 'utils/tenderly'; import config from 'config'; import { formatNumber, wait } from 'utils/helpers'; import { useMemo, useRef, useState } from 'react'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { useQueryClient } from '@tanstack/react-query'; import { useModal } from 'hooks/useModal'; import { Input, Label } from 'components/common/inputField'; @@ -36,7 +36,7 @@ const spender = config.addresses.carbon.carbonController; export const DebugCreateStrategy = () => { const count = useRef(0); - const { user } = useWeb3(); + const { user } = useWagmi(); const { openModal } = useModal(); const queryClient = useQueryClient(); const createMutation = useCreateStrategyQuery(); diff --git a/src/components/debug/DebugImposter.tsx b/src/components/debug/DebugImposter.tsx index 0abe8e90b..cedca2ff0 100644 --- a/src/components/debug/DebugImposter.tsx +++ b/src/components/debug/DebugImposter.tsx @@ -1,11 +1,11 @@ -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { useState } from 'react'; import { lsService } from 'services/localeStorage'; import { InputUserAccount } from 'components/common/inputField'; import { Button } from 'components/common/button'; export const DebugImposter = () => { - const { handleImposterAccount } = useWeb3(); + const { handleImposterAccount } = useWagmi(); const [input, setInput] = useState( lsService.getItem('imposterAccount') || '' ); diff --git a/src/components/debug/DebugResetDefault.tsx b/src/components/debug/DebugResetDefault.tsx index 003662e9e..d20930c90 100644 --- a/src/components/debug/DebugResetDefault.tsx +++ b/src/components/debug/DebugResetDefault.tsx @@ -1,8 +1,8 @@ -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { Button } from 'components/common/button'; export const DebugResetDefault = () => { - const { handleTenderlyRPC, handleImposterAccount } = useWeb3(); + const { handleTenderlyRPC, handleImposterAccount } = useWagmi(); const handleOnClick = () => { handleTenderlyRPC(); @@ -12,7 +12,7 @@ export const DebugResetDefault = () => { return (

Reset to defaults

diff --git a/src/components/debug/DebugTenderlyFaucet.tsx b/src/components/debug/DebugTenderlyFaucet.tsx index 0bef6d450..3d5907b22 100644 --- a/src/components/debug/DebugTenderlyFaucet.tsx +++ b/src/components/debug/DebugTenderlyFaucet.tsx @@ -3,7 +3,7 @@ import { tenderlyFaucetTransferETH, tenderlyFaucetTransferTKN, } from 'utils/tenderly'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { useGetTokenBalances } from 'libs/queries/chain/balance'; import { useQueryClient } from '@tanstack/react-query'; import config from 'config'; @@ -25,7 +25,7 @@ TOKENS.push({ }); export const DebugTenderlyFaucet = () => { - const { user } = useWeb3(); + const { user } = useWagmi(); const queryClient = useQueryClient(); const queries = useGetTokenBalances(TOKENS); diff --git a/src/components/debug/DebugTenderlyRPC.tsx b/src/components/debug/DebugTenderlyRPC.tsx index 8b82ae0e7..e3511ae56 100644 --- a/src/components/debug/DebugTenderlyRPC.tsx +++ b/src/components/debug/DebugTenderlyRPC.tsx @@ -1,4 +1,4 @@ -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { useState, FormEvent } from 'react'; import { lsService } from 'services/localeStorage'; import { Button } from 'components/common/button'; @@ -8,7 +8,7 @@ import config from 'config'; export const DebugTenderlyRPC = () => { const { handleTenderlyRPC, isUncheckedSigner, setIsUncheckedSigner } = - useWeb3(); + useWagmi(); const [urlInput, setUrlInput] = useState( lsService.getItem('tenderlyRpc') || '' ); diff --git a/src/components/debug/DebugTransferNFT.tsx b/src/components/debug/DebugTransferNFT.tsx index 2a91646a9..071aa5c67 100644 --- a/src/components/debug/DebugTransferNFT.tsx +++ b/src/components/debug/DebugTransferNFT.tsx @@ -1,12 +1,12 @@ import { useState } from 'react'; import { Button } from 'components/common/button'; import { Input, InputUserAccount, Label } from 'components/common/inputField'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { QueryKey, useQueryClient } from 'libs/queries'; import { useContract } from 'hooks/useContract'; export const DebugTransferNFT = () => { - const { user } = useWeb3(); + const { user } = useWagmi(); const [inputId, setInputId] = useState(''); const [inputRecipient, setInputRecipient] = useState(''); const cache = useQueryClient(); diff --git a/src/components/debug/DebugWeb3.tsx b/src/components/debug/DebugWeb3.tsx index f546aa7fa..e92dfc165 100644 --- a/src/components/debug/DebugWeb3.tsx +++ b/src/components/debug/DebugWeb3.tsx @@ -1,6 +1,5 @@ -import { useWeb3 } from 'libs/web3'; +import { useWagmi, IS_TENDERLY_FORK } from 'libs/wagmi'; import { shortenString } from 'utils/helpers'; -import { IS_TENDERLY_FORK } from 'libs/web3/web3.constants'; export const DebugWeb3 = () => { const { @@ -10,7 +9,7 @@ export const DebugWeb3 = () => { isNetworkActive, networkError, isUserBlocked, - } = useWeb3(); + } = useWagmi(); return (
= (props) => { const inputRef = useRef(null); const inputId = useId(); - const { user } = useWeb3(); + const { user } = useWagmi(); const { className, token, diff --git a/src/components/strategies/create/CreateOverlapping.tsx b/src/components/strategies/create/CreateOverlapping.tsx index be170f460..cfa92b0f9 100644 --- a/src/components/strategies/create/CreateOverlapping.tsx +++ b/src/components/strategies/create/CreateOverlapping.tsx @@ -34,7 +34,7 @@ import { OverlappingMarketPrice, } from '../overlapping/OverlappingMarketPrice'; import { UserMarketPrice } from '../UserMarketPrice'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { formatNumber } from 'utils/helpers'; interface Props { @@ -57,7 +57,7 @@ const getInitialPrices = (marketPrice: string | number) => { export const CreateOverlapping: FC = (props) => { const { base, quote, order0, order1, spread, setSpread } = props; - const { user } = useWeb3(); + const { user } = useWagmi(); const externalPrice = useMarketPrice({ base, quote }); const [marketPrice, setMarketPrice] = useState(externalPrice ?? 0); const baseBalance = useGetTokenBalance(base).data; diff --git a/src/components/strategies/create/CreateStrategyOrders.tsx b/src/components/strategies/create/CreateStrategyOrders.tsx index f2bd05977..d2094a4a7 100644 --- a/src/components/strategies/create/CreateStrategyOrders.tsx +++ b/src/components/strategies/create/CreateStrategyOrders.tsx @@ -1,6 +1,6 @@ import { FormEvent, useEffect, useMemo, useRef, useState } from 'react'; import { m } from 'libs/motion'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { Button } from 'components/common/button'; import { BuySellBlock } from 'components/strategies/create/BuySellBlock'; import { items } from 'components/strategies/create/variants'; @@ -38,7 +38,7 @@ export const CreateStrategyOrders = ({ setSpread, }: UseStrategyCreateReturn) => { const formRef = useRef(null); - const { user } = useWeb3(); + const { user } = useWagmi(); const [approvedWarnings, setApprovedWarnings] = useState(false); const [disabled, setDisabled] = useState(true); const [showWarningApproval, setShowWarningApproval] = useState(false); diff --git a/src/components/strategies/create/useCreateStrategy.tsx b/src/components/strategies/create/useCreateStrategy.tsx index 9628b913e..9ad916c14 100644 --- a/src/components/strategies/create/useCreateStrategy.tsx +++ b/src/components/strategies/create/useCreateStrategy.tsx @@ -9,7 +9,7 @@ import { StrategySettings, } from 'libs/routing'; import { Token } from 'libs/tokens'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { OrderCreate, useOrder } from 'components/strategies/create/useOrder'; import { useDuplicateStrategy } from 'components/strategies/create/useDuplicateStrategy'; import { useStrategyEventData } from 'components/strategies/create/useStrategyEventData'; @@ -63,7 +63,7 @@ export const useCreateStrategy = () => { strategyType = templateStrategy.strategyType, } = search; - const { user, provider } = useWeb3(); + const { user, provider } = useWagmi(); const { openModal } = useModal(); const [showGraph, setShowGraph] = useState(false); diff --git a/src/components/strategies/edit/EditStrategyBudgetContent.tsx b/src/components/strategies/edit/EditStrategyBudgetContent.tsx index cc2e1a2a8..72f33cc4b 100644 --- a/src/components/strategies/edit/EditStrategyBudgetContent.tsx +++ b/src/components/strategies/edit/EditStrategyBudgetContent.tsx @@ -11,7 +11,7 @@ import { useModal } from 'hooks/useModal'; import { useEditStrategy } from '../create/useEditStrategy'; import { useStrategyEventData } from '../create/useStrategyEventData'; import { carbonEvents } from 'services/events'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { useFiatCurrency } from 'hooks/useFiatCurrency'; import { FormEvent, useMemo } from 'react'; import { getStatusTextByTxStatus } from '../utils'; @@ -47,7 +47,7 @@ export const EditStrategyBudgetContent = ({ const order1: OrderCreate = useOrder(strategy.order1); const buyBalance = strategy.order0.balance; const sellBalance = strategy.order1.balance; - const { provider } = useWeb3(); + const { provider } = useWagmi(); const { getFiatValue: getFiatValueBase } = useFiatCurrency(strategy.base); const { getFiatValue: getFiatValueQuote } = useFiatCurrency(strategy.quote); const buyBudgetUsd = getFiatValueQuote(buyBalance, true).toString(); diff --git a/src/components/strategies/edit/EditStrategyPricesContent.tsx b/src/components/strategies/edit/EditStrategyPricesContent.tsx index e80e1e402..0418e9611 100644 --- a/src/components/strategies/edit/EditStrategyPricesContent.tsx +++ b/src/components/strategies/edit/EditStrategyPricesContent.tsx @@ -19,7 +19,7 @@ import { EditPriceOverlappingStrategy } from 'components/strategies/edit/overlap import { cn } from 'utils/helpers'; import { useEditStrategy } from '../create/useEditStrategy'; import { useModal } from 'hooks/useModal'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { getDeposit, strategyBudgetChanges, strategyHasChanged } from './utils'; import style from 'components/strategies/common/form.module.css'; @@ -54,7 +54,7 @@ export const EditStrategyPricesContent = ({ : strategy.order1 ); - const { provider } = useWeb3(); + const { provider } = useWagmi(); const { approval } = useEditStrategy( strategy, getDeposit(strategy.order0.balance, order0.budget), diff --git a/src/components/strategies/overlapping/OverlappingBudget.tsx b/src/components/strategies/overlapping/OverlappingBudget.tsx index 8b8bdceb4..5493df9b9 100644 --- a/src/components/strategies/overlapping/OverlappingBudget.tsx +++ b/src/components/strategies/overlapping/OverlappingBudget.tsx @@ -2,7 +2,7 @@ import { FC } from 'react'; import { Token } from 'libs/tokens'; import { useGetTokenBalance } from 'libs/queries'; import { BudgetInput, BudgetAction } from '../common/BudgetInput'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; interface Props { base: Token; @@ -44,7 +44,7 @@ export const OverlappingBudget: FC = (props) => { error, warning, } = props; - const { user } = useWeb3(); + const { user } = useWagmi(); const baseBalance = useGetTokenBalance(base).data; const quoteBalance = useGetTokenBalance(quote).data; diff --git a/src/components/strategies/useDeleteStrategy.ts b/src/components/strategies/useDeleteStrategy.ts index 3e91f6a3d..7a99d5730 100644 --- a/src/components/strategies/useDeleteStrategy.ts +++ b/src/components/strategies/useDeleteStrategy.ts @@ -5,12 +5,12 @@ import { useDeleteStrategyQuery, useQueryClient, } from 'libs/queries'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { Dispatch, SetStateAction } from 'react'; import { ONE_AND_A_HALF_SECONDS_IN_MS } from 'utils/time'; export const useDeleteStrategy = () => { - const { user } = useWeb3(); + const { user } = useWagmi(); const { dispatchNotification } = useNotifications(); const deleteMutation = useDeleteStrategyQuery(); const cache = useQueryClient(); diff --git a/src/components/strategies/useUpdateStrategy.ts b/src/components/strategies/useUpdateStrategy.ts index dc8e2042a..5826503c0 100644 --- a/src/components/strategies/useUpdateStrategy.ts +++ b/src/components/strategies/useUpdateStrategy.ts @@ -8,14 +8,14 @@ import { useUpdateStrategyQuery, } from 'libs/queries'; import { useNavigate } from 'libs/routing'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { useState } from 'react'; import { ONE_AND_A_HALF_SECONDS_IN_MS } from 'utils/time'; import { handleTxStatusAndRedirectToOverview } from './create/utils'; import { isOverlappingStrategy } from './overlapping/utils'; export const useUpdateStrategy = () => { - const { user } = useWeb3(); + const { user } = useWagmi(); const { dispatchNotification } = useNotifications(); const updateMutation = useUpdateStrategyQuery(); const cache = useQueryClient(); diff --git a/src/components/trade/tradeWidget/TradeWidgetBuySell.tsx b/src/components/trade/tradeWidget/TradeWidgetBuySell.tsx index 4a2189c6c..b433c2be1 100644 --- a/src/components/trade/tradeWidget/TradeWidgetBuySell.tsx +++ b/src/components/trade/tradeWidget/TradeWidgetBuySell.tsx @@ -2,7 +2,7 @@ import { SafeDecimal } from 'libs/safedecimal'; import { FormEvent, useEffect, useId, useMemo, JSX } from 'react'; import { carbonEvents } from 'services/events'; import { Token } from 'libs/tokens'; -import { IS_TENDERLY_FORK, useWeb3 } from 'libs/web3'; +import { IS_TENDERLY_FORK, useWagmi } from 'libs/wagmi'; import { UseQueryResult } from 'libs/queries'; import { useFiatCurrency } from 'hooks/useFiatCurrency'; import useInitEffect from 'hooks/useInitEffect'; @@ -24,7 +24,7 @@ export interface TradeWidgetBuySellProps extends FormAttributes { export const TradeWidgetBuySell = (props: TradeWidgetBuySellProps) => { const id = useId(); - const { user } = useWeb3(); + const { user } = useWagmi(); const { sourceInput, setSourceInput, diff --git a/src/components/trade/tradeWidget/useBuySell.ts b/src/components/trade/tradeWidget/useBuySell.ts index 5fb3d7a21..beb0c2dd3 100644 --- a/src/components/trade/tradeWidget/useBuySell.ts +++ b/src/components/trade/tradeWidget/useBuySell.ts @@ -1,7 +1,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { SafeDecimal } from 'libs/safedecimal'; import { carbonEvents } from 'services/events'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { useGetTradeLiquidity, useGetTradeData, @@ -21,7 +21,7 @@ export const useBuySell = ({ sourceBalanceQuery, buy = false, }: TradeWidgetBuySellProps) => { - const { user, provider } = useWeb3(); + const { user, provider } = useWagmi(); const { openModal } = useModal(); const { selectedFiatCurrency } = useFiatCurrency(); const sourceTokenPriceQuery = useGetTokenPrice(source.address); diff --git a/src/components/trade/tradeWidget/useTradeAction.ts b/src/components/trade/tradeWidget/useTradeAction.ts index fa275b19a..6456ed1c4 100644 --- a/src/components/trade/tradeWidget/useTradeAction.ts +++ b/src/components/trade/tradeWidget/useTradeAction.ts @@ -1,4 +1,4 @@ -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { Dispatch, SetStateAction, useCallback, useMemo } from 'react'; import config from 'config'; import { PopulatedTransaction } from 'ethers'; @@ -37,7 +37,7 @@ export const useTradeAction = ({ } = useStore(); const { dispatchNotification } = useNotifications(); const cache = useQueryClient(); - const { user, signer } = useWeb3(); + const { user, signer } = useWagmi(); const calcMinReturn = useCallback( (amount: string) => { diff --git a/src/components/trade/useTradePairs.ts b/src/components/trade/useTradePairs.ts index 5587e94db..cd8f9b642 100644 --- a/src/components/trade/useTradePairs.ts +++ b/src/components/trade/useTradePairs.ts @@ -3,13 +3,13 @@ import { TradePair } from 'libs/modals/modals/ModalTradeTokenList'; import { useModal } from 'hooks/useModal'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { lsService } from 'services/localeStorage'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { toPairSlug } from 'utils/pairSearch'; import { usePairs } from 'hooks/usePairs'; import config from 'config'; export const useTradePairs = () => { - const { user } = useWeb3(); + const { user } = useWagmi(); const { openModal } = useModal(); const navigate = useNavigate(); diff --git a/src/config/ethereum/common.ts b/src/config/ethereum/common.ts index 6c20c5e76..b47ade49c 100644 --- a/src/config/ethereum/common.ts +++ b/src/config/ethereum/common.ts @@ -25,12 +25,7 @@ export const commonConfig: AppConfig = { mode: 'development', appUrl: 'https://app.carbondefi.xyz', carbonApi: 'https://api.carbondefi.xyz/v1/', - selectedConnectionTypes: [ - 'injected', - 'walletConnect', - 'coinbaseWallet', - 'gnosisSafe', - ], + selectedConnections: ['MetaMask', 'WalletConnect', 'Coinbase Wallet', 'safe'], walletConnectProjectId: 'f9d8863ab6c03f2293d7d56d7c0c0853', isSimulatorEnabled: true, policiesLastUpdated: '18 April, 2023', diff --git a/src/config/sei/common.ts b/src/config/sei/common.ts index cff3c9e68..7b254d47b 100644 --- a/src/config/sei/common.ts +++ b/src/config/sei/common.ts @@ -12,12 +12,14 @@ export const commonConfig: AppConfig = { mode: 'development', appUrl: 'https://sei.carbondefi.xyz', carbonApi: 'https://sei-api.carbondefi.xyz/v1/', - selectedConnectionTypes: [ - 'injected', - 'coinbaseWallet', - 'tailwindWallet', - 'compassWallet', - 'seifWallet', + selectedConnections: [ + 'MetaMask', + 'Coinbase Wallet', + 'WalletConnect', + 'safe', + 'Compass Wallet', + // 'Tailwind Wallet', + // 'Seif Wallet', ], walletConnectProjectId: '', isSimulatorEnabled: false, diff --git a/src/config/types.ts b/src/config/types.ts index 614f0df7d..c46b02593 100644 --- a/src/config/types.ts +++ b/src/config/types.ts @@ -1,11 +1,11 @@ import { TokenList } from 'libs/tokens'; -import { SelectableConnectionType } from 'libs/wagmi/web3.constants'; +import { SelectableConnectionType } from 'libs/wagmi'; export interface AppConfig { mode: 'development' | 'production'; appUrl: string; carbonApi: string; - selectedConnectionTypes: SelectableConnectionType[]; + selectedConnections: SelectableConnectionType[]; walletConnectProjectId: string; isSimulatorEnabled: boolean; sentryDSN?: string; diff --git a/src/hooks/useCarbonInit.ts b/src/hooks/useCarbonInit.ts index 0e0ac8997..220bc56f0 100644 --- a/src/hooks/useCarbonInit.ts +++ b/src/hooks/useCarbonInit.ts @@ -9,8 +9,7 @@ import { lsService } from 'services/localeStorage'; import { carbonSDK } from 'libs/sdk'; import { useModal } from 'hooks/useModal'; import { QueryKey } from 'libs/queries'; -import { RPC_URLS, RPC_HEADERS } from 'libs/web3'; -import { SupportedChainId } from 'libs/web3/web3.constants'; +import { RPC_URLS, RPC_HEADERS, SupportedChainId } from 'libs/wagmi'; import { buildTokenPairKey, setIntervalUsingTimeout } from 'utils/helpers'; import { carbonApi } from 'utils/carbonApi'; diff --git a/src/hooks/useContract.ts b/src/hooks/useContract.ts index 7b59bdc0a..b904b3cf0 100644 --- a/src/hooks/useContract.ts +++ b/src/hooks/useContract.ts @@ -1,10 +1,10 @@ -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { Token__factory, Voucher__factory } from 'abis/types'; import { useCallback, useMemo } from 'react'; import config from 'config'; export const useContract = () => { - const { provider, signer } = useWeb3(); + const { provider, signer } = useWagmi(); const Token = useCallback( (address: string) => ({ diff --git a/src/hooks/useIsStrategyOwner.ts b/src/hooks/useIsStrategyOwner.ts index 13e9a1d5f..2d0dfaa49 100644 --- a/src/hooks/useIsStrategyOwner.ts +++ b/src/hooks/useIsStrategyOwner.ts @@ -1,8 +1,8 @@ import { useGetUserStrategies } from 'libs/queries'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; export const useIsStrategyOwner = (strategyId: string) => { - const { user } = useWeb3(); + const { user } = useWagmi(); const query = useGetUserStrategies({ user }); return query.data?.some((strategy) => strategy.id === strategyId); }; diff --git a/src/hooks/useNotifications.ts b/src/hooks/useNotifications.ts index 97f127f20..5c0592cd1 100644 --- a/src/hooks/useNotifications.ts +++ b/src/hooks/useNotifications.ts @@ -1,4 +1,4 @@ -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { useStore } from 'store'; import { DispatchNotification, @@ -12,7 +12,7 @@ import { uuid } from 'utils/helpers'; import { dayjs } from 'libs/dayjs'; export const useNotifications = () => { - const { user, provider } = useWeb3(); + const { user, provider } = useWagmi(); const { notifications: { notifications, setNotifications, alerts, hasPendingTx }, } = useStore(); diff --git a/src/hooks/useTokens.ts b/src/hooks/useTokens.ts index c4b3cca8e..c716a2ffd 100644 --- a/src/hooks/useTokens.ts +++ b/src/hooks/useTokens.ts @@ -3,10 +3,10 @@ import { useCallback, useState } from 'react'; import { Token } from 'libs/tokens'; import { lsService } from 'services/localeStorage'; import { useStore } from 'store'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; export const useTokens = () => { - const { user } = useWeb3(); + const { user } = useWagmi(); const { tokens: { tokensMap, importedTokens, setImportedTokens, ...props }, } = useStore(); diff --git a/src/index.tsx b/src/index.tsx index 02f88099d..42a16debe 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -4,7 +4,7 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import reportWebVitals from 'reportWebVitals'; import { StoreProvider } from 'store'; -import { Web3ReactWrapper } from 'libs/web3'; +import { WagmiReactWrapper } from 'libs/wagmi'; import { LazyMotion } from 'libs/motion'; import { QueryProvider } from 'libs/queries'; import { RouterProvider, router } from 'libs/routing'; @@ -20,11 +20,11 @@ root.render( - + - + diff --git a/src/libs/modals/modals/ModalTradeRouting/useModalTradeRouting.ts b/src/libs/modals/modals/ModalTradeRouting/useModalTradeRouting.ts index 8efc93fad..783fe4224 100644 --- a/src/libs/modals/modals/ModalTradeRouting/useModalTradeRouting.ts +++ b/src/libs/modals/modals/ModalTradeRouting/useModalTradeRouting.ts @@ -6,7 +6,7 @@ import { useState, } from 'react'; import { Action } from '@bancor/carbon-sdk'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { ModalTradeRoutingData } from 'libs/modals/modals/ModalTradeRouting/ModalTradeRouting'; import { useGetTradeActionsQuery } from 'libs/queries/sdk/tradeActions'; import { useModal } from 'hooks/useModal'; @@ -35,7 +35,7 @@ export const useModalTradeRouting = ({ setIsAwaiting, }, }: Props) => { - const { user, provider } = useWeb3(); + const { user, provider } = useWagmi(); const { openModal, closeModal } = useModal(); const { useGetTokenPrice } = useFiatCurrency(); const sourceFiatPrice = useGetTokenPrice(source.address); diff --git a/src/libs/modals/modals/WalletModal/ModalWallet.tsx b/src/libs/modals/modals/WalletModal/ModalWallet.tsx index 1a7a19551..a1a19c521 100644 --- a/src/libs/modals/modals/WalletModal/ModalWallet.tsx +++ b/src/libs/modals/modals/WalletModal/ModalWallet.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react'; import { useModal } from 'hooks/useModal'; import { ModalFC } from 'libs/modals/modals.types'; -import { useWeb3, Connection } from 'libs/web3'; +import { useWagmi, Connector } from 'libs/wagmi'; import { ModalWalletError } from 'libs/modals/modals/WalletModal/ModalWalletError'; import { ModalWalletContent } from 'libs/modals/modals/WalletModal/ModalWalletContent'; import { carbonEvents } from 'services/events'; @@ -10,9 +10,9 @@ import { useStore } from 'store'; export const ModalWallet: ModalFC = ({ id }) => { const { closeModal } = useModal(); - const { connect, user } = useWeb3(); + const { connect, user } = useWagmi(); const [selectedConnection, setSelectedConnection] = - useState(null); + useState(null); const [connectionError, setConnectionError] = useState(''); const [isConnected, setIsConnected] = useState(false); const { isManualConnection } = useStore(); @@ -37,10 +37,10 @@ export const ModalWallet: ModalFC = ({ id }) => { const isLoading = selectedConnection !== null && !connectionError; const isError = selectedConnection !== null && connectionError; - const onClickConnect = async (c: Connection) => { + const onClickConnect = async (c: Connector) => { setSelectedConnection(c); try { - await connect(c.type); + await connect(c); closeModal(id); setIsConnected(true); isManualConnection.current = true; @@ -55,7 +55,7 @@ export const ModalWallet: ModalFC = ({ id }) => { {isError ? (
diff --git a/src/libs/modals/modals/WalletModal/ModalWalletContent.tsx b/src/libs/modals/modals/WalletModal/ModalWalletContent.tsx index 367adc1bb..19c7a89eb 100644 --- a/src/libs/modals/modals/WalletModal/ModalWalletContent.tsx +++ b/src/libs/modals/modals/WalletModal/ModalWalletContent.tsx @@ -1,14 +1,14 @@ import { FC, useState } from 'react'; import { NewTabLink, Link } from 'libs/routing'; -import { Connection, selectedConnectionTypes } from 'libs/web3'; -import { getConnection } from 'libs/web3/web3.utils'; +import { Connector, useWagmi } from 'libs/wagmi'; import { Imager } from 'components/common/imager/Imager'; import { Checkbox } from 'components/common/Checkbox/Checkbox'; import iconLedger from 'assets/logos/ledger.svg'; import iconTrezor from 'assets/logos/trezor.svg'; +import { WalletIcon } from 'components/common/WalletIcon'; type Props = { - onClick: (c: Connection) => Promise; + onClick: (c: Connector) => Promise; isLoading?: boolean; }; @@ -32,6 +32,8 @@ const EXT_LINKS = [ export const ModalWalletContent: FC = ({ onClick, isLoading }) => { const [checked, setChecked] = useState(false); + const { connectors } = useWagmi(); + const isDisabled = isLoading || !checked; return ( @@ -64,17 +66,24 @@ export const ModalWalletContent: FC = ({ onClick, isLoading }) => {
- {selectedConnectionTypes.map(getConnection).map((c) => ( - - ))} + {connectors.map((c) => { + return ( + + ); + })} {EXT_LINKS.map(({ url, name, logoUrl }) => ( { - const { user } = useWeb3(); + const { user } = useWagmi(); const { alerts, notifications, checkStatus, setNotifications } = useNotifications(); diff --git a/src/libs/queries/chain/approval.ts b/src/libs/queries/chain/approval.ts index b6704d672..900490ab6 100644 --- a/src/libs/queries/chain/approval.ts +++ b/src/libs/queries/chain/approval.ts @@ -1,4 +1,4 @@ -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { useMutation, useQueries } from '@tanstack/react-query'; import { NULL_APPROVAL_CONTRACTS, UNLIMITED_WEI } from 'utils/approval'; import { expandToken, shrinkToken } from 'utils/tokens'; @@ -17,7 +17,7 @@ export type GetUserApprovalProps = Pick< }; export const useGetUserApproval = (data: GetUserApprovalProps[]) => { - const { user } = useWeb3(); + const { user } = useWagmi(); const { Token } = useContract(); return useQueries({ @@ -60,7 +60,7 @@ export type SetUserApprovalProps = GetUserApprovalProps & { }; export const useSetUserApproval = () => { - const { user } = useWeb3(); + const { user } = useWagmi(); const { Token } = useContract(); return useMutation( diff --git a/src/libs/queries/chain/balance.ts b/src/libs/queries/chain/balance.ts index 070d102cf..6f83e815d 100644 --- a/src/libs/queries/chain/balance.ts +++ b/src/libs/queries/chain/balance.ts @@ -1,5 +1,5 @@ import { useQueries, useQuery } from '@tanstack/react-query'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { Token } from 'libs/tokens'; import { shrinkToken } from 'utils/tokens'; import config from 'config'; @@ -13,7 +13,7 @@ export const useGetTokenBalance = ( const address = token?.address; const decimals = token?.decimals; const { Token } = useContract(); - const { user, provider } = useWeb3(); + const { user, provider } = useWagmi(); return useQuery( QueryKey.balance(user!, address!), @@ -51,7 +51,7 @@ export const useGetTokenBalance = ( export const useGetTokenBalances = ( tokens: Pick[] ) => { - const { user, provider } = useWeb3(); + const { user, provider } = useWagmi(); const { Token } = useContract(); return useQueries({ diff --git a/src/libs/queries/chain/ens.ts b/src/libs/queries/chain/ens.ts index 777d861df..5e820ddee 100644 --- a/src/libs/queries/chain/ens.ts +++ b/src/libs/queries/chain/ens.ts @@ -1,11 +1,11 @@ import { useQuery } from '@tanstack/react-query'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { QueryKey } from 'libs/queries/queryKey'; import { ONE_DAY_IN_MS } from 'utils/time'; import { utils } from 'ethers'; export const useGetEnsFromAddress = (address: string) => { - const { provider } = useWeb3(); + const { provider } = useWagmi(); return useQuery( QueryKey.ensFromAddress(address), @@ -30,7 +30,7 @@ export const useGetEnsFromAddress = (address: string) => { }; export const useGetAddressFromEns = (ens: string) => { - const { provider } = useWeb3(); + const { provider } = useWagmi(); return useQuery( QueryKey.ensToAddress(ens), diff --git a/src/libs/queries/sdk/strategy.ts b/src/libs/queries/sdk/strategy.ts index 6dcf71549..e0e831cd8 100644 --- a/src/libs/queries/sdk/strategy.ts +++ b/src/libs/queries/sdk/strategy.ts @@ -1,7 +1,7 @@ import { useMutation, useQuery } from '@tanstack/react-query'; import { Token as TokenContract } from 'abis/types'; import { utils } from 'ethers'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { Token } from 'libs/tokens'; import { fetchTokenData } from 'libs/tokens/tokenHelperFn'; import { QueryKey } from 'libs/queries/queryKey'; @@ -277,7 +277,7 @@ export interface DeleteStrategyParams { } export const useCreateStrategyQuery = () => { - const { signer } = useWeb3(); + const { signer } = useWagmi(); return useMutation( async ({ base, quote, order0, order1 }: CreateStrategyParams) => { @@ -314,7 +314,7 @@ export const useCreateStrategyQuery = () => { }; export const useUpdateStrategyQuery = () => { - const { signer } = useWeb3(); + const { signer } = useWagmi(); return useMutation( async ({ @@ -340,7 +340,7 @@ export const useUpdateStrategyQuery = () => { }; export const useDeleteStrategyQuery = () => { - const { signer } = useWeb3(); + const { signer } = useWagmi(); return useMutation(async ({ id }: DeleteStrategyParams) => { const unsignedTx = await carbonSDK.deleteStrategy(id); diff --git a/src/libs/web3/Web3Provider.tsx b/src/libs/wagmi/WagmiProvider.tsx similarity index 68% rename from src/libs/web3/Web3Provider.tsx rename to src/libs/wagmi/WagmiProvider.tsx index 3e86c7833..62ec0dacb 100644 --- a/src/libs/web3/Web3Provider.tsx +++ b/src/libs/wagmi/WagmiProvider.tsx @@ -1,11 +1,12 @@ -import { useWeb3React } from '@web3-react/core'; import { createContext, FC, ReactNode, useContext, useMemo } from 'react'; -import { CarbonWeb3ProviderContext } from 'libs/web3/web3.types'; -import { useWeb3Network } from 'libs/web3/useWeb3Network'; -import { useWeb3Imposter } from 'libs/web3/useWeb3Imposter'; -import { useWeb3Tenderly } from 'libs/web3/useWeb3Tenderly'; -import { useWeb3User } from 'libs/web3/useWeb3User'; +import { CarbonWeb3ProviderContext } from 'libs/wagmi/web3.types'; +import { useWagmiTenderly } from 'libs/wagmi/useWagmiTenderly'; +import { useWagmiNetwork } from 'libs/wagmi/useWagmiNetwork'; +import { useWagmiImposter } from 'libs/wagmi/useWagmiImposter'; +import { useWagmiUser } from 'libs/wagmi/useWagmiUser'; +import { wagmiConfig } from 'libs/wagmi/config'; import config from 'config'; +import { getAccount } from '@wagmi/core'; // ********************************** // // WEB3 CONTEXT @@ -17,6 +18,8 @@ const defaultValue: CarbonWeb3ProviderContext = { isNetworkActive: false, provider: undefined, signer: undefined, + currentConnector: undefined, + connectors: [], chainId: 1, handleTenderlyRPC: () => {}, disconnect: async () => {}, @@ -32,7 +35,7 @@ const defaultValue: CarbonWeb3ProviderContext = { const CarbonWeb3CTX = createContext(defaultValue); -export const useWeb3 = () => useContext(CarbonWeb3CTX); +export const useWagmi = () => useContext(CarbonWeb3CTX); // ********************************** // // WEB3 PROVIDER @@ -41,36 +44,29 @@ export const useWeb3 = () => useContext(CarbonWeb3CTX); export const CarbonWeb3Provider: FC<{ children: ReactNode }> = ({ children, }) => { - const { - account: walletAccount, - provider: walletProvider, - chainId, - connector, - } = useWeb3React(); + const { address: walletAccount, chainId } = getAccount(wagmiConfig); - const { provider, isNetworkActive, networkError, switchNetwork } = - useWeb3Network(); + const { provider, connectors, isNetworkActive, networkError, switchNetwork } = + useWagmiNetwork(); const { imposterAccount, handleImposterAccount, isImposter } = - useWeb3Imposter(); + useWagmiImposter(); - const { handleTenderlyRPC } = useWeb3Tenderly(); + const { handleTenderlyRPC } = useWagmiTenderly(); const { user, signer, + currentConnector, connect, disconnect, isUserBlocked, isUncheckedSigner, setIsUncheckedSigner, - } = useWeb3User({ + } = useWagmiUser({ walletAccount, - walletProvider, - provider, handleImposterAccount, imposterAccount, - connector, }); const isSupportedNetwork = useMemo( @@ -88,6 +84,8 @@ export const CarbonWeb3Provider: FC<{ children: ReactNode }> = ({ isNetworkActive, provider, signer, + currentConnector, + connectors, chainId, handleTenderlyRPC, handleImposterAccount, diff --git a/src/libs/wagmi/WagmiReactWrapper.tsx b/src/libs/wagmi/WagmiReactWrapper.tsx new file mode 100644 index 000000000..316c0729e --- /dev/null +++ b/src/libs/wagmi/WagmiReactWrapper.tsx @@ -0,0 +1,14 @@ +import { FC, ReactNode } from 'react'; +import { CarbonWeb3Provider } from 'libs/wagmi/WagmiProvider'; +import { wagmiConfig } from 'libs/wagmi/config'; +import { WagmiProvider } from 'wagmi'; + +export const WagmiReactWrapper: FC<{ children: ReactNode }> = ({ + children, +}) => { + return ( + + {children} + + ); +}; diff --git a/src/libs/wagmi/chains.ts b/src/libs/wagmi/chains.ts new file mode 100644 index 000000000..8dc24cb6c --- /dev/null +++ b/src/libs/wagmi/chains.ts @@ -0,0 +1,35 @@ +import { type Chain } from 'viem'; +import config from 'config'; +import { RPC_HEADERS, RPC_URLS, SupportedChainId } from './web3.constants'; +import { http } from 'wagmi'; + +export const currentChain: Chain = { + id: config.network.chainId, + name: config.network.name, + nativeCurrency: { + name: config.network.gasToken.name, + symbol: config.network.gasToken.symbol, + decimals: config.network.gasToken.decimals, + }, + rpcUrls: { + default: { + http: [config.network.rpc.url], + }, + }, + blockExplorers: { + default: { + name: config.network.blockExplorer.name, + url: config.network.blockExplorer.url, + }, + }, +}; + +export const configChains: [Chain, ...Chain[]] = [currentChain]; + +export const configTransports = { + [currentChain.id]: http(RPC_URLS[SupportedChainId.MAINNET], { + fetchOptions: { + headers: RPC_HEADERS[SupportedChainId.MAINNET], + }, + }), +}; diff --git a/src/libs/wagmi/config.ts b/src/libs/wagmi/config.ts new file mode 100644 index 000000000..47874a7ac --- /dev/null +++ b/src/libs/wagmi/config.ts @@ -0,0 +1,16 @@ +import { createConfig } from 'wagmi'; +import { configConnectors } from './connectors'; +import { configChains, configTransports } from './chains'; + +export const wagmiConfig = createConfig({ + chains: configChains, + syncConnectedChain: true, + connectors: configConnectors, + transports: configTransports, +}); + +declare module 'wagmi' { + interface Register { + config: typeof wagmiConfig; + } +} diff --git a/src/libs/wagmi/connectors.ts b/src/libs/wagmi/connectors.ts new file mode 100644 index 000000000..fbed296fb --- /dev/null +++ b/src/libs/wagmi/connectors.ts @@ -0,0 +1,64 @@ +import carbonLogo from 'assets/logos/carbon.svg'; +import { createStore } from 'mipd'; +import { CreateConnectorFn } from 'wagmi'; + +import { + injected, + metaMask, + coinbaseWallet, + walletConnect, + safe, +} from 'wagmi/connectors'; +import config from 'config'; +import { + SelectableConnectionType, + selectedConnections, +} from './web3.constants'; + +const getDefaultConnector = (connectorType: SelectableConnectionType) => { + switch (connectorType) { + case 'Compass Wallet': + case 'Tailwind Wallet': + case 'Seif Wallet': + return injected({ + shimDisconnect: false, + }); + case 'MetaMask': + return metaMask({ + extensionOnly: false, + dappMetadata: { + name: 'CarbonDeFi', + url: config.appUrl, + iconUrl: carbonLogo, + }, + }); + case 'Coinbase Wallet': + return coinbaseWallet({ + appName: 'Carbon DeFi', + appLogoUrl: carbonLogo, + }); + case 'WalletConnect': + return walletConnect({ + projectId: config.walletConnectProjectId, + qrModalOptions: { + themeMode: 'dark', + }, + }); + case 'safe': + return safe({ shimDisconnect: false }); + } +}; + +const getConfigConnectors = (): CreateConnectorFn[] => { + const store = createStore(); + const injectedProviderNames = store + .getProviders() + .map((provider) => provider.info.name); + const missingConnectors = selectedConnections.filter( + (connection) => !injectedProviderNames.includes(connection) + ); + store.destroy(); + return missingConnectors.map(getDefaultConnector); +}; + +export const configConnectors = getConfigConnectors(); diff --git a/src/libs/wagmi/ethers.ts b/src/libs/wagmi/ethers.ts new file mode 100644 index 000000000..de15dc5ba --- /dev/null +++ b/src/libs/wagmi/ethers.ts @@ -0,0 +1,36 @@ +import { Config, getClient } from '@wagmi/core'; +import { providers } from 'ethers'; +import type { Account, Client, Chain, Transport } from 'viem'; + +function clientToProvider(client: Client) { + const { chain, transport } = client; + const network = { + chainId: chain.id, + name: chain.name, + ensAddress: chain.contracts?.ensRegistry?.address, + }; + return new providers.Web3Provider(transport, network); +} + +/** Action to convert a viem Public Client to an ethers.js Provider. */ +export function getEthersProvider( + config: Config, + { chainId }: { chainId?: number } = {} +) { + const client = getClient(config, { chainId }); + if (!client) return; + return clientToProvider(client); +} + +export function clientToSigner(client?: Client) { + if (!client) return; + const { account, chain, transport } = client; + const network = { + chainId: chain.id, + name: chain.name, + ensAddress: chain.contracts?.ensRegistry?.address, + }; + const provider = new providers.Web3Provider(transport, network); + const signer = provider.getSigner(account.address); + return signer; +} diff --git a/src/libs/wagmi/index.ts b/src/libs/wagmi/index.ts new file mode 100644 index 000000000..1f5ab2e7b --- /dev/null +++ b/src/libs/wagmi/index.ts @@ -0,0 +1,13 @@ +export { + type SelectableConnectionType, + EnumConnectionType, + selectedConnections, + IS_TENDERLY_FORK, + RPC_URLS, + RPC_HEADERS, + SupportedChainId, +} from 'libs/wagmi/web3.constants'; +export { useWagmi } from 'libs/wagmi/WagmiProvider'; +export { WagmiReactWrapper } from 'libs/wagmi/WagmiReactWrapper'; +export type { Connector } from 'wagmi'; +export { useAccount } from 'wagmi'; diff --git a/src/libs/web3/useWeb3Imposter.ts b/src/libs/wagmi/useWagmiImposter.ts similarity index 93% rename from src/libs/web3/useWeb3Imposter.ts rename to src/libs/wagmi/useWagmiImposter.ts index a370f6fa5..156e69dc8 100644 --- a/src/libs/web3/useWeb3Imposter.ts +++ b/src/libs/wagmi/useWagmiImposter.ts @@ -1,7 +1,7 @@ import { useCallback, useMemo, useState } from 'react'; import { lsService } from 'services/localeStorage'; -export const useWeb3Imposter = () => { +export const useWagmiImposter = () => { const [imposterAccount, setImposterAccount] = useState( lsService.getItem('imposterAccount') || '' ); diff --git a/src/libs/wagmi/useWagmiNetwork.tsx b/src/libs/wagmi/useWagmiNetwork.tsx new file mode 100644 index 000000000..518274909 --- /dev/null +++ b/src/libs/wagmi/useWagmiNetwork.tsx @@ -0,0 +1,61 @@ +import { getChainInfo } from 'libs/wagmi/web3.utils'; +import { useSwitchChain } from 'wagmi'; +import { getEthersProvider } from 'libs/wagmi/ethers'; +import { wagmiConfig } from 'libs/wagmi/config'; +import { StaticJsonRpcProvider } from '@ethersproject/providers'; +import { getConnectors } from '@wagmi/core'; +import { RPC_URLS, RPC_HEADERS, SupportedChainId } from 'libs/wagmi'; +import { useCallback, useEffect, useMemo, useState } from 'react'; + +export const useWagmiNetwork = () => { + const { switchChain } = useSwitchChain(); + const chainId = getChainInfo().chainId; + + const provider = getEthersProvider(wagmiConfig, { chainId }); + + const [isNetworkActive, setIsNetworkActive] = useState(false); + + const [networkError, setNetworkError] = useState(); + + const switchNetwork = () => switchChain({ chainId }); + + const networkProvider = useMemo(() => { + return new StaticJsonRpcProvider( + { + url: RPC_URLS[SupportedChainId.MAINNET], + headers: RPC_HEADERS[SupportedChainId.MAINNET], + skipFetchSetup: true, + }, + chainId + ); + }, [chainId]); + + const activateNetwork = useCallback(async () => { + if (networkError || isNetworkActive) { + return; + } + + try { + await networkProvider.getNetwork(); + setIsNetworkActive(true); + } catch (e: any) { + const msg = e.message || 'Could not activate network: UNKNOWN ERROR'; + console.error('activateNetwork failed.', msg); + setNetworkError(msg); + } + }, [isNetworkActive, networkError, networkProvider]); + + useEffect(() => { + void activateNetwork(); + }, [activateNetwork]); + + const connectors = getConnectors(wagmiConfig); + + return { + provider, + connectors, + isNetworkActive, + networkError, + switchNetwork, + }; +}; diff --git a/src/libs/web3/useWeb3Tenderly.ts b/src/libs/wagmi/useWagmiTenderly.ts similarity index 95% rename from src/libs/web3/useWeb3Tenderly.ts rename to src/libs/wagmi/useWagmiTenderly.ts index 9b1c1ed80..ca4736776 100644 --- a/src/libs/web3/useWeb3Tenderly.ts +++ b/src/libs/wagmi/useWagmiTenderly.ts @@ -1,6 +1,6 @@ import { lsService } from 'services/localeStorage'; -export const useWeb3Tenderly = () => { +export const useWagmiTenderly = () => { const handleTenderlyRPC = ( url?: string, carbonController?: string, diff --git a/src/libs/wagmi/useWagmiUser.ts b/src/libs/wagmi/useWagmiUser.ts new file mode 100644 index 000000000..356d241bc --- /dev/null +++ b/src/libs/wagmi/useWagmiUser.ts @@ -0,0 +1,114 @@ +import { useCallback, useMemo, useState } from 'react'; +import { IS_TENDERLY_FORK } from 'libs/wagmi/web3.constants'; +import { + useConnect, + useDisconnect, + Config, + useConnectorClient, + Connector, + useAccount, +} from 'wagmi'; +import { type DisconnectErrorType } from '@wagmi/core'; +import { isAccountBlocked } from 'utils/restrictedAccounts'; +import { lsService } from 'services/localeStorage'; +import { useStore } from 'store'; +import { getChainInfo } from './web3.utils'; +import { clientToSigner } from './ethers'; +import { getUncheckedSigner } from 'utils/tenderly'; + +type Props = { + imposterAccount: string; + walletAccount?: string; + handleImposterAccount: (account?: string) => void; +}; + +export const useWagmiUser = ({ + imposterAccount, + walletAccount, + handleImposterAccount, +}: Props) => { + const { isCountryBlocked } = useStore(); + const [isUncheckedSigner, _setIsUncheckedSigner] = useState( + lsService.getItem('isUncheckedSigner') || false + ); + const { connect: _connect } = useConnect(); + const { disconnect: _disconnect } = useDisconnect(); + + const setIsUncheckedSigner = useCallback( + (value: boolean) => { + _setIsUncheckedSigner(value); + lsService.setItem('isUncheckedSigner', value); + }, + [_setIsUncheckedSigner] + ); + + const user = useMemo( + () => imposterAccount || walletAccount, + [imposterAccount, walletAccount] + ); + + const isUserBlocked = useMemo(() => isAccountBlocked(user), [user]); + + const { connector: currentConnector } = useAccount(); + + const { data: client } = useConnectorClient({ + chainId: getChainInfo().chainId, + }); + + const signer = useMemo(() => { + if (!IS_TENDERLY_FORK || !isUncheckedSigner) { + return clientToSigner(client); + } else { + if (user) return getUncheckedSigner(user); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [client, IS_TENDERLY_FORK, user, isUncheckedSigner]); + + const connect = useCallback( + async (connector: Connector) => { + if (isCountryBlocked || isCountryBlocked === null) { + throw new Error('Your country is restricted from using this app.'); + } + _connect( + { + connector, + chainId: getChainInfo().chainId, + }, + { + onError: (error) => { + throw new Error( + `Error connecting ${connector.name}` + error.message + ); + }, + } + ); + }, + [isCountryBlocked, _connect] + ); + + const disconnect = useCallback(async () => { + _disconnect( + {}, + { + onSuccess: () => { + console.log('Successfully deactivated connector'); + handleImposterAccount(); + }, + onError: (error: DisconnectErrorType) => { + throw new Error(`Error disconnecting` + error.message); + }, + } + ); + }, [_disconnect, handleImposterAccount]); + + return { + user, + signer, + currentConnector, + connect, + disconnect, + isUserBlocked, + isUncheckedSigner, + setIsUncheckedSigner, + }; +}; diff --git a/src/libs/wagmi/web3.constants.ts b/src/libs/wagmi/web3.constants.ts new file mode 100644 index 000000000..65b1764d6 --- /dev/null +++ b/src/libs/wagmi/web3.constants.ts @@ -0,0 +1,66 @@ +import { ChainIdMapTo } from 'libs/wagmi/web3.types'; +import { lsService } from 'services/localeStorage'; +import config from 'config'; + +const TENDERLY_RPC = lsService.getItem('tenderlyRpc'); +const CHAIN_RPC_URL = TENDERLY_RPC || config.network.rpc.url; +const CHAIN_RPC_HEADERS = TENDERLY_RPC ? {} : config.network.rpc.headers || {}; +const CHAIN_ID = config.network.chainId; + +if (typeof CHAIN_RPC_URL === 'undefined') { + throw new Error(`rpcUrl must be defined in config folder`); +} + +export const IS_TENDERLY_FORK = !!TENDERLY_RPC; + +export type SelectableConnectionType = + | 'MetaMask' + | 'WalletConnect' + | 'Coinbase Wallet' + | 'safe' + | 'Tailwind Wallet' + | 'Compass Wallet' + | 'Seif Wallet'; + +// [START] Used for localstorage migration: Remove it after Nov 2023 +export enum EnumConnectionType { + METAMASK, + COINBASE_WALLET, + WALLET_CONNECT, + GNOSIS_SAFE, +} +const connectionTypeMapping: Record< + EnumConnectionType, + SelectableConnectionType +> = { + [EnumConnectionType.METAMASK]: 'MetaMask', + [EnumConnectionType.COINBASE_WALLET]: 'Coinbase Wallet', + [EnumConnectionType.WALLET_CONNECT]: 'WalletConnect', + [EnumConnectionType.GNOSIS_SAFE]: 'safe', +}; +const isEnumConnectionType = ( + type: SelectableConnectionType | EnumConnectionType +): type is EnumConnectionType => type in connectionTypeMapping; + +export const getConnectionTypeFromLS = () => { + const type = lsService.getItem('connectionType'); + if (type === undefined) return; + return isEnumConnectionType(type) ? connectionTypeMapping[type] : type; +}; +// [END] + +export enum SupportedChainId { + MAINNET = CHAIN_ID, +} + +export const selectedConnections: SelectableConnectionType[] = + config.selectedConnections; + +export const RPC_URLS: ChainIdMapTo = { + [SupportedChainId.MAINNET]: CHAIN_RPC_URL, +}; +export const RPC_HEADERS: { + [chainId: string]: Record; +} = { + [SupportedChainId.MAINNET]: CHAIN_RPC_HEADERS, +}; diff --git a/src/libs/web3/web3.types.ts b/src/libs/wagmi/web3.types.ts similarity index 64% rename from src/libs/web3/web3.types.ts rename to src/libs/wagmi/web3.types.ts index d21549a89..33e5da83e 100644 --- a/src/libs/web3/web3.types.ts +++ b/src/libs/wagmi/web3.types.ts @@ -1,24 +1,11 @@ -import { Connector } from '@web3-react/types'; -import { Web3ReactHooks } from '@web3-react/core'; import { JsonRpcProvider, JsonRpcSigner, StaticJsonRpcProvider, Web3Provider, } from '@ethersproject/providers'; -import { - ConnectionType, - SupportedChainId, - injectedProviders, -} from 'libs/web3/web3.constants'; - -export interface Connection { - connector: Connector; - hooks: Web3ReactHooks; - type: ConnectionType; - name: string; - logoUrl?: string; -} +import { SupportedChainId } from 'libs/wagmi/web3.constants'; +import { Connector } from 'libs/wagmi'; export type ChainIdMapTo = { [key in SupportedChainId]: T; @@ -31,6 +18,8 @@ export interface CarbonWeb3ProviderContext { networkError: string | undefined; provider?: Web3Provider | StaticJsonRpcProvider; signer: JsonRpcSigner | undefined; + currentConnector: Connector | undefined; + connectors: readonly Connector[]; handleTenderlyRPC: ( url?: string, carbonController?: string, @@ -38,7 +27,7 @@ export interface CarbonWeb3ProviderContext { ) => void; handleImposterAccount: (account: string) => void; disconnect: () => Promise; - connect: (type: ConnectionType) => Promise; + connect: (type: Connector) => Promise; isImposter: boolean; isSupportedNetwork: boolean; switchNetwork: () => void; @@ -46,6 +35,3 @@ export interface CarbonWeb3ProviderContext { isUncheckedSigner: boolean; setIsUncheckedSigner: (value: boolean) => void; } - -export type InjectedProvider = - (typeof injectedProviders)[keyof typeof injectedProviders]; diff --git a/src/libs/wagmi/web3.utils.ts b/src/libs/wagmi/web3.utils.ts new file mode 100644 index 000000000..08f5e6ea0 --- /dev/null +++ b/src/libs/wagmi/web3.utils.ts @@ -0,0 +1,28 @@ +import config from 'config'; +// Interface to add new chain to injected wallets as per EIP-3085 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-3085.md) +interface AddChainParameter { + chainId: number; // EIP-3085 specifies hex string but web3-react expects number + chainName: string; + nativeCurrency: { + name: string; + symbol: string; + decimals: number; // EIP-3085 specifies generic string but web3-react expects 18 + }; + rpcUrls: string[]; + blockExplorerUrls?: string[]; + iconUrls?: string[]; +} +export const getChainInfo = (): AddChainParameter => { + return { + chainId: config.network.chainId, + chainName: config.network.name, + nativeCurrency: { + name: config.network.gasToken.name, + symbol: config.network.gasToken.symbol, + decimals: config.network.gasToken.decimals, + }, + iconUrls: [config.network.gasToken.logoURI], + rpcUrls: [config.network.rpc.url], + blockExplorerUrls: [config.network.blockExplorer.url], + }; +}; diff --git a/src/libs/web3/Web3ReactWrapper.tsx b/src/libs/web3/Web3ReactWrapper.tsx deleted file mode 100644 index 53965b78d..000000000 --- a/src/libs/web3/Web3ReactWrapper.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { Web3ReactHooks, Web3ReactProvider } from '@web3-react/core'; -import { FC, ReactNode } from 'react'; -import { Connector } from '@web3-react/types'; -import { CarbonWeb3Provider } from 'libs/web3/Web3Provider'; -import { getConnection } from 'libs/web3/web3.utils'; -import { selectedConnectionTypes } from './web3.constants'; - -// ********************************** // -// WEB3 REACT LIBRARY WRAPPER -// ********************************** // - -const connectors: [Connector, Web3ReactHooks][] = selectedConnectionTypes - .map(getConnection) - .map(({ hooks, connector }) => [connector, hooks]); - -const key = 'Web3ReactProviderKey'; - -export const Web3ReactWrapper: FC<{ children: ReactNode }> = ({ children }) => { - return ( - - {children} - - ); -}; diff --git a/src/libs/web3/connectors/SafeEIP1193.ts b/src/libs/web3/connectors/SafeEIP1193.ts deleted file mode 100644 index a06e39c03..000000000 --- a/src/libs/web3/connectors/SafeEIP1193.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { EIP1193 } from '@web3-react/eip1193'; -import { - Actions, - AddEthereumChainParameter, - Provider, - ProviderConnectInfo, - ProviderRpcError, - RequestArguments, -} from '@web3-react/types'; -import { getInjectedProvider, hasInjectedProvider } from './getProvider'; -import { InjectedProvider } from '../web3.types'; - -const emptyProvider: Provider = { - request: async (_args: RequestArguments) => Promise.resolve(undefined), - on: (_eventName: string | symbol, _listener: (...args: any[]) => void) => - emptyProvider, - removeListener: ( - _eventName: string | symbol, - _listener: (...args: any[]) => void - ) => emptyProvider, -}; - -function parseChainId(chainId: string | number) { - return typeof chainId === 'string' ? Number.parseInt(chainId, 16) : chainId; -} - -export interface SafeEIP1193ConstructorArgs { - actions: Actions; - injectedProvider: InjectedProvider; - onError?: (error: Error) => void; -} - -export class SafeEIP1193 extends EIP1193 { - private providerName: InjectedProvider['name']; - private hasProvider: boolean; - provider: Provider; - - constructor({ - actions, - injectedProvider, - onError, - }: SafeEIP1193ConstructorArgs) { - const provider = getInjectedProvider(injectedProvider) || emptyProvider; - super({ actions, provider, onError }); - this.provider = provider; - this.hasProvider = hasInjectedProvider(injectedProvider); - this.providerName = injectedProvider.name; - } - - public async activate( - desiredChainIdOrChainParameters?: number | AddEthereumChainParameter - ) { - if (!this.hasProvider) { - throw new Error(`${this.providerName} not installed.`); - } - return this.isomorphicInitialize().then(async () => { - super.activate().then(async () => { - if (desiredChainIdOrChainParameters) - return this.switchOrAddChain(desiredChainIdOrChainParameters); - }); - }); - } - - private async isomorphicInitialize(): Promise { - this.provider.on('connect', ({ chainId }: ProviderConnectInfo): void => { - this.actions.update({ chainId: parseChainId(chainId) }); - }); - - this.provider.on('disconnect', (error: ProviderRpcError): void => { - this.actions.resetState(); - this.onError?.(error); - }); - - this.provider.on('chainChanged', (chainId: string): void => { - this.actions.update({ chainId: parseChainId(chainId) }); - }); - - this.provider.on('accountsChanged', (accounts: string[]): void => { - this.actions.update({ accounts }); - }); - } - - private async requestAccounts(): Promise { - return this.provider - .request({ method: 'eth_requestAccounts' }) - .catch(() => - this.provider.request({ method: 'eth_accounts' }) - ) as Promise; - } - - private async switchOrAddChain( - desiredChainIdOrChainParameters: number | AddEthereumChainParameter - ): Promise { - const cancelActivation = this.actions.startActivation(); - - return this.isomorphicInitialize() - .then(async () => { - const accounts = await this.requestAccounts(); - - const chainId = (await this.provider.request({ - method: 'eth_chainId', - params: [], - })) as string; - const receivedChainId = parseChainId(chainId); - const desiredChainId = - typeof desiredChainIdOrChainParameters === 'number' - ? desiredChainIdOrChainParameters - : desiredChainIdOrChainParameters?.chainId; - - // if there's no desired chain, or it's equal to the received, update - if ( - !desiredChainId || - (!isNaN(receivedChainId) && receivedChainId === desiredChainId) - ) - return this.actions.update({ chainId: receivedChainId, accounts }); - - const desiredChainIdHex = `0x${desiredChainId.toString(16)}`; - - return this.provider - .request({ - method: 'wallet_switchEthereumChain', - params: [{ chainId: desiredChainIdHex }], - }) - .catch((error: ProviderRpcError) => { - const errorCode = - (error.data as any)?.originalError?.code || error.code; - - // 4901 indicates that the provider is connected to other chains, just not the requested one - // https://eips.ethereum.org/EIPS/eip-1193 - // 4902 indicates that the chain has not been added to MetaMask and wallet_addEthereumChain needs to be called - // https://docs.metamask.io/guide/rpc-api.html#wallet-switchethereumchain - if ( - (errorCode === 4901 || errorCode === 4902) && - typeof desiredChainIdOrChainParameters !== 'number' - ) { - // if we're here, we can try to add a new network - return this.provider.request({ - method: 'wallet_addEthereumChain', - params: [ - { - ...desiredChainIdOrChainParameters, - chainId: desiredChainIdHex, - }, - ], - }); - } - - throw error; - }) - .then(() => this.activate(desiredChainId)); - }) - .catch((error) => { - cancelActivation(); - throw error; - }); - } - - public async connectEagerly() { - if (!this.hasProvider) - throw new Error(`${this.providerName} not installed.`); - try { - return this.isomorphicInitialize().then(() => super.connectEagerly()); - } catch (error) { - console.debug('Could not connect eagerly', error); - this.actions.resetState(); - } - } -} diff --git a/src/libs/web3/connectors/getProvider.ts b/src/libs/web3/connectors/getProvider.ts deleted file mode 100644 index 7a8f58478..000000000 --- a/src/libs/web3/connectors/getProvider.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { InjectedProvider } from '../web3.types'; - -/* - * Returns the explicit window provider that matches the flag and the flag is true - */ -function getExplicitInjectedProvider(flag: InjectedProvider['flag']) { - if ( - typeof window === 'undefined' || - typeof (window as any).ethereum === 'undefined' - ) - return; - const providers = window.ethereum.providers; - - if (providers) - return providers.find((provider: { [x: string]: any }) => provider[flag]); - - if (window.ethereum[flag]) return window.ethereum; - - return; -} - -/* - * Gets the `window.namespace` window provider if it exists - */ -function getWindowProviderNamespace(namespace: string) { - const providerSearch = (provider: any, namespace: string): any => { - const [property, ...path] = namespace.split('.'); - const _provider = provider[property]; - if (_provider) { - if (path.length === 0) return _provider; - return providerSearch(_provider, path.join('.')); - } - }; - if (typeof window !== 'undefined') return providerSearch(window, namespace); -} - -/* - * Checks if the explicit provider or window ethereum exists - */ -export function hasInjectedProvider({ flag, namespace }: InjectedProvider) { - if (namespace && typeof getWindowProviderNamespace(namespace) !== 'undefined') - return true; - if (flag && typeof getExplicitInjectedProvider(flag) !== 'undefined') - return true; - return false; -} - -/* - * Returns an injected provider that favors the flag match, but falls back to window.ethereum - */ -export function getInjectedProvider({ flag, namespace }: InjectedProvider) { - if ( - typeof window === 'undefined' || - typeof (window as any).ethereum === 'undefined' - ) - return; - if (namespace) { - // prefer custom eip1193 namespaces - const windowProvider = getWindowProviderNamespace(namespace); - if (windowProvider) return windowProvider; - } - const providers = window.ethereum.providers; - if (flag) { - const provider = getExplicitInjectedProvider(flag); - if (provider) return provider; - } - if (typeof providers !== 'undefined' && providers.length > 0) - return providers[0]; - return window.ethereum; -} diff --git a/src/libs/web3/index.ts b/src/libs/web3/index.ts deleted file mode 100644 index 8585d4709..000000000 --- a/src/libs/web3/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export { - type ConnectionType, - EnumConnectionType, - selectedConnectionTypes, - IS_TENDERLY_FORK, - RPC_URLS, - RPC_HEADERS, -} from 'libs/web3/web3.constants'; -export { useWeb3 } from 'libs/web3/Web3Provider'; -export { Web3ReactWrapper } from 'libs/web3/Web3ReactWrapper'; -export type { Connection } from 'libs/web3/web3.types'; diff --git a/src/libs/web3/useWeb3Network.tsx b/src/libs/web3/useWeb3Network.tsx deleted file mode 100644 index dd2e04714..000000000 --- a/src/libs/web3/useWeb3Network.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import { useWeb3React } from '@web3-react/core'; -import { - attemptToConnectWallet, - getConnection, - getChainInfo, - isNativeAppBrowser, -} from 'libs/web3/web3.utils'; -import { useCallback, useEffect, useState } from 'react'; -import { useStore } from 'store'; -import useAsyncEffect from 'use-async-effect'; -import { getConnectionTypeFromLS } from './web3.constants'; -import { carbonEvents } from 'services/events'; - -export const useWeb3Network = () => { - const { isCountryBlocked, setSelectedWallet } = useStore(); - - const { connector } = useWeb3React(); - - const network = getConnection('network'); - - const provider = network.hooks.useProvider(); - - const [isNetworkActive, setIsNetworkActive] = useState(false); - - const [networkError, setNetworkError] = useState(); - - const switchNetwork = useCallback(async () => { - await connector.activate(getChainInfo()); - }, [connector]); - - const activateNetwork = useCallback(async () => { - if (networkError || isNetworkActive) { - return; - } - - try { - await network.connector.activate(); - setIsNetworkActive(true); - } catch (e: any) { - const msg = e.message || 'Could not activate network: UNKNOWN ERROR'; - console.error('activateNetwork failed.', msg); - setNetworkError(msg); - } - }, [isNetworkActive, network.connector, networkError]); - - useEffect(() => { - void activateNetwork(); - }, [activateNetwork]); - - useAsyncEffect(async () => { - if (isCountryBlocked === false) { - // Attempt to autologin to native app browser - if (isNativeAppBrowser) { - const { success } = await attemptToConnectWallet( - isNativeAppBrowser.type, - isNativeAppBrowser.activate - ); - if (success) { - setSelectedWallet(isNativeAppBrowser.type); - return; // If successfully connected, stop further connection attempts - } - } - - // Attempt to autologin to normal previous session, if exists - const storedConnection = getConnectionTypeFromLS(); - if (storedConnection !== undefined) { - const { success } = await attemptToConnectWallet(storedConnection); - if (success) { - setSelectedWallet(storedConnection); - } - } - - if (!isNativeAppBrowser && storedConnection === undefined) { - carbonEvents.wallet.walletDisconnected(undefined); - } - } - }, [isCountryBlocked]); - - return { provider, isNetworkActive, networkError, switchNetwork }; -}; diff --git a/src/libs/web3/useWeb3User.ts b/src/libs/web3/useWeb3User.ts deleted file mode 100644 index 2bece8fe3..000000000 --- a/src/libs/web3/useWeb3User.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { useCallback, useMemo, useState } from 'react'; -import { ConnectionType, IS_TENDERLY_FORK } from 'libs/web3/web3.constants'; -import { getConnection } from 'libs/web3/web3.utils'; -import { Web3Provider } from '@ethersproject/providers'; -import { Connector } from '@web3-react/types'; -import { isAccountBlocked } from 'utils/restrictedAccounts'; -import { lsService } from 'services/localeStorage'; -import { useStore } from 'store'; - -type Props = { - imposterAccount: string; - walletAccount?: string; - provider?: Web3Provider; - walletProvider?: Web3Provider; - connector: Connector; - handleImposterAccount: (account?: string) => void; -}; - -export const useWeb3User = ({ - imposterAccount, - walletAccount, - provider, - walletProvider, - connector, - handleImposterAccount, -}: Props) => { - const { isCountryBlocked, setSelectedWallet } = useStore(); - const [isUncheckedSigner, _setIsUncheckedSigner] = useState( - lsService.getItem('isUncheckedSigner') || false - ); - - const setIsUncheckedSigner = useCallback( - (value: boolean) => { - _setIsUncheckedSigner(value); - lsService.setItem('isUncheckedSigner', value); - }, - [_setIsUncheckedSigner] - ); - - const user = useMemo( - () => imposterAccount || walletAccount, - [imposterAccount, walletAccount] - ); - - const isUserBlocked = useMemo(() => isAccountBlocked(user), [user]); - - const signer = useMemo(() => { - if (!IS_TENDERLY_FORK || !isUncheckedSigner) { - return walletProvider?.getSigner(user); - } - return provider?.getUncheckedSigner(user); - }, [provider, user, walletProvider, isUncheckedSigner]); - - const connect = useCallback( - async (type: ConnectionType) => { - if (isCountryBlocked || isCountryBlocked === null) { - throw new Error('Your country is restricted from using this app.'); - } - const { connector } = getConnection(type); - await connector.activate(); - lsService.setItem('connectionType', type); - setSelectedWallet(type); - }, - [isCountryBlocked, setSelectedWallet] - ); - - const disconnect = useCallback(async () => { - try { - if (!connector.deactivate) { - throw new Error('connector does not have a deactivate method'); - } - await connector.deactivate(); - console.log('successfully deactivated connector'); - } catch (e) { - console.warn( - 'failed to deactivate connector, attempting to reset state instead.', - e - ); - try { - await connector.resetState(); - console.log('successfully reset connector state'); - } catch (e) { - console.error( - 'failed to reset connector state, user not logged out', - e - ); - } finally { - handleImposterAccount(); - lsService.removeItem('connectionType'); - setSelectedWallet(null); - } - } - }, [connector, handleImposterAccount, setSelectedWallet]); - - return { - user, - signer, - connect, - disconnect, - isUserBlocked, - isUncheckedSigner, - setIsUncheckedSigner, - }; -}; diff --git a/src/libs/web3/web3.connectors.ts b/src/libs/web3/web3.connectors.ts deleted file mode 100644 index 4abfa97d5..000000000 --- a/src/libs/web3/web3.connectors.ts +++ /dev/null @@ -1,223 +0,0 @@ -import { StaticJsonRpcProvider } from '@ethersproject/providers'; -import { initializeConnector } from '@web3-react/core'; -import { CoinbaseWallet } from '@web3-react/coinbase-wallet'; -import { WalletConnect } from '@web3-react/walletconnect-v2'; -import { Network } from '@web3-react/network'; -import { GnosisSafe } from '@web3-react/gnosis-safe'; -import { TailwindConnector } from '@tailwindzone/connect-web3-react'; -import iconMetaMask from 'assets/logos/metamask.svg'; -import iconWalletConnect from 'assets/logos/walletConnect.svg'; -import iconCoinbase from 'assets/logos/coinbase.svg'; -import iconTailwindWallet from 'assets/logos/tailwindWallet.svg'; -import iconCompassWallet from 'assets/logos/compassWallet.svg'; -import iconSeifWallet from 'assets/logos/seifWallet.svg'; -import iconGnosis from 'assets/logos/gnosis.svg'; -import carbonLogo from 'assets/logos/carbon.svg'; -import config from 'config'; -import { - RPC_HEADERS, - RPC_URLS, - SelectedConnectionTypes, - SupportedChainId, -} from 'libs/web3/web3.constants'; -import { Connection } from 'libs/web3/web3.types'; -import { SafeEIP1193 } from './connectors/SafeEIP1193'; -import { injectedProviders } from 'libs/web3/web3.constants'; - -const onError = (error: Error) => { - console.debug(`web3-react error: ${error}`); -}; - -// Takes a connector name and returns an initialized web3-react connector -export function createConnection( - connector: SelectedConnectionTypes -): Connection { - switch (connector) { - case 'network': - // ********************************** // - // NETWORK CONNECTOR - // ********************************** // - - const [web3Network, web3NetworkHooks] = initializeConnector( - (actions) => - new Network({ - actions, - urlMap: { - ...RPC_URLS, - [SupportedChainId.MAINNET]: new StaticJsonRpcProvider({ - url: RPC_URLS[SupportedChainId.MAINNET], - headers: RPC_HEADERS[SupportedChainId.MAINNET], - skipFetchSetup: true, - }), - }, - defaultChainId: SupportedChainId.MAINNET, - }) - ); - return { - connector: web3Network, - hooks: web3NetworkHooks, - type: 'network', - name: 'Network', - }; - case 'injected': - // ********************************** // - // METAMASK CONNECTOR - // ********************************** // - - const [web3MetaMask, web3MetaMaskHooks] = - initializeConnector( - (actions) => - new SafeEIP1193({ - actions, - injectedProvider: injectedProviders.metamask, - onError, - }) - ); - return { - connector: web3MetaMask, - hooks: web3MetaMaskHooks, - type: connector, - name: 'MetaMask', - logoUrl: iconMetaMask, - }; - - case 'gnosisSafe': - // ********************************** // - // GNOSIS CONNECTOR - // ********************************** // - - const [web3GnosisSafe, web3GnosisSafeHooks] = - initializeConnector( - (actions) => new GnosisSafe({ actions }) - ); - return { - connector: web3GnosisSafe, - hooks: web3GnosisSafeHooks, - type: connector, - name: 'Gnosis Safe', - logoUrl: iconGnosis, - }; - - case 'walletConnect': - // ********************************** // - // WALLETCONNECT CONNECTOR - // ********************************** // - - const [web3WalletConnect, web3WalletConnectHooks] = - initializeConnector( - (actions) => - new WalletConnect({ - actions, - options: { - projectId: config.walletConnectProjectId, - rpc: RPC_URLS, - showQrModal: true, - chains: [SupportedChainId.MAINNET], - metadata: { - name: 'Carbon', - description: - 'Trade tokens or create automated onchain trading strategies', - url: config.appUrl, - icons: [`${config.appUrl}/logo512.png`], - }, - }, - onError, - }) - ); - return { - connector: web3WalletConnect, - hooks: web3WalletConnectHooks, - type: connector, - name: 'WalletConnect', - logoUrl: iconWalletConnect, - }; - - case 'coinbaseWallet': - // ********************************** // - // COINBASE WALLET CONNECTOR - // ********************************** // - - const [web3CoinbaseWallet, web3CoinbaseWalletHooks] = - initializeConnector( - (actions) => - new CoinbaseWallet({ - actions, - options: { - url: RPC_URLS[SupportedChainId.MAINNET], - appName: 'Carbon', - appLogoUrl: carbonLogo, - reloadOnDisconnect: false, - }, - onError, - }) - ); - return { - connector: web3CoinbaseWallet, - hooks: web3CoinbaseWalletHooks, - type: connector, - name: 'Coinbase Wallet', - logoUrl: iconCoinbase, - }; - - case 'tailwindWallet': - // ********************************** // - // Tailwind WALLET CONNECTOR - // ********************************** // - - const [web3TailwindWallet, web3TailwindWalletHooks] = - initializeConnector( - (actions) => new TailwindConnector({ actions }) - ); - return { - connector: web3TailwindWallet, - hooks: web3TailwindWalletHooks, - type: connector, - name: 'Tailwind Wallet', - logoUrl: iconTailwindWallet, - }; - - case 'compassWallet': - // ********************************** // - // Compass WALLET CONNECTOR - // ********************************** // - - const [web3CompassWallet, web3CompassWalletHooks] = - initializeConnector( - (actions) => - new SafeEIP1193({ - actions, - injectedProvider: injectedProviders.compassWallet, - onError, - }) - ); - return { - connector: web3CompassWallet, - hooks: web3CompassWalletHooks, - type: connector, - name: 'Compass Wallet', - logoUrl: iconCompassWallet, - }; - - case 'seifWallet': - // ********************************** // - // Seif WALLET CONNECTOR - // ********************************** // - - const [web3SeifWallet, web3SeifWalletHooks] = - initializeConnector( - (actions) => - new SafeEIP1193({ - actions, - injectedProvider: injectedProviders.seifWallet, - onError, - }) - ); - return { - connector: web3SeifWallet, - hooks: web3SeifWalletHooks, - type: connector, - name: 'Seif Wallet', - logoUrl: iconSeifWallet, - }; - } -} diff --git a/src/libs/web3/web3.constants.ts b/src/libs/web3/web3.constants.ts deleted file mode 100644 index 27226a4bd..000000000 --- a/src/libs/web3/web3.constants.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { ChainIdMapTo } from 'libs/web3/web3.types'; -import { lsService } from 'services/localeStorage'; -import config from 'config'; - -const TENDERLY_RPC = lsService.getItem('tenderlyRpc'); -const CHAIN_RPC_URL = TENDERLY_RPC || config.network.rpc.url; -const CHAIN_RPC_HEADERS = TENDERLY_RPC ? {} : config.network.rpc.headers || {}; -const CHAIN_ID = TENDERLY_RPC ? 1 : config.network.chainId; - -if (typeof CHAIN_RPC_URL === 'undefined') { - throw new Error(`rpcUrl must be defined in config folder`); -} - -export const IS_TENDERLY_FORK = !!TENDERLY_RPC; - -export enum SupportedChainId { - MAINNET = CHAIN_ID, -} - -// [START] Used for localstorage migration: Remove it after Nov 2023 -export enum EnumConnectionType { - INJECTED, - COINBASE_WALLET, - WALLET_CONNECT, - NETWORK, - GNOSIS_SAFE, -} -const connectionTypeMapping: Record = { - [EnumConnectionType.INJECTED]: 'injected', - [EnumConnectionType.COINBASE_WALLET]: 'coinbaseWallet', - [EnumConnectionType.WALLET_CONNECT]: 'walletConnect', - [EnumConnectionType.NETWORK]: 'network', - [EnumConnectionType.GNOSIS_SAFE]: 'gnosisSafe', -}; -const isEnumConnectionType = ( - type: ConnectionType | EnumConnectionType -): type is EnumConnectionType => type in connectionTypeMapping; - -export const getConnectionTypeFromLS = () => { - const type = lsService.getItem('connectionType'); - if (type === undefined) return; - return isEnumConnectionType(type) ? connectionTypeMapping[type] : type; -}; -// [END] - -export type SelectableConnectionType = - | 'injected' - | 'walletConnect' - | 'coinbaseWallet' - | 'gnosisSafe' - | 'tailwindWallet' - | 'compassWallet' - | 'seifWallet'; - -export type ConnectionType = 'network' | SelectableConnectionType; - -export const selectedConnectionTypes: SelectableConnectionType[] = - config.selectedConnectionTypes; - -export type SelectedConnectionTypes = - | 'network' - | (typeof selectedConnectionTypes)[number]; - -export const injectedProviders = { - metamask: { name: 'MetaMask', namespace: 'ethereum', flag: 'isMetaMask' }, - compassWallet: { - name: 'Compass Wallet', - namespace: 'compassEvm', - flag: 'isCompassEvm', - }, - seifWallet: { name: 'Seif Wallet', namespace: '__seif', flag: '__seif' }, -} as const; - -export const RPC_URLS: ChainIdMapTo = { - [SupportedChainId.MAINNET]: CHAIN_RPC_URL, -}; -export const RPC_HEADERS: { - [chainId: string]: { [key in SupportedChainId]: string | number }; -} = { - [SupportedChainId.MAINNET]: CHAIN_RPC_HEADERS, -}; diff --git a/src/libs/web3/web3.utils.ts b/src/libs/web3/web3.utils.ts deleted file mode 100644 index 3f3c46b30..000000000 --- a/src/libs/web3/web3.utils.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { - ConnectionType, - SelectedConnectionTypes, - selectedConnectionTypes, -} from 'libs/web3/web3.constants'; -import { createConnection } from 'libs/web3/web3.connectors'; -import { lsService } from 'services/localeStorage'; -import { UAParser } from 'ua-parser-js'; -import { Connection } from './web3.types'; -import config from 'config'; - -const parser = new UAParser(window.navigator.userAgent); -const { type } = parser.getDevice(); - -export const isMobile = type === 'mobile' || type === 'tablet'; - -// Interface to add new chain to injected wallets as per EIP-3085 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-3085.md) -interface AddChainParameter { - chainId: number; // EIP-3085 specifies hex string but web3-react expects number - chainName: string; - nativeCurrency: { - name: string; - symbol: string; - decimals: number; // EIP-3085 specifies generic string but web3-react expects 18 - }; - rpcUrls: string[]; - blockExplorerUrls?: string[]; - iconUrls?: string[]; -} -export const getChainInfo = (): AddChainParameter => { - return { - chainId: config.network.chainId, - chainName: config.network.name, - nativeCurrency: { - name: config.network.gasToken.name, - symbol: config.network.gasToken.symbol, - decimals: config.network.gasToken.decimals, - }, - iconUrls: [config.network.gasToken.logoURI], - rpcUrls: [config.network.rpc.url], - blockExplorerUrls: [config.network.blockExplorer.url], - }; -}; - -type Connections = Record; - -const networkConnection = createConnection('network'); - -const getConnections: [ConnectionType, Connection][] = [ - ...selectedConnectionTypes.map( - (c) => [c, createConnection(c)] as [ConnectionType, Connection] - ), - ['network', networkConnection], -]; - -const connections: Connections = Object.fromEntries( - getConnections -) as Connections; - -export const getConnection = (c: SelectedConnectionTypes) => connections[c]; - -export const attemptToConnectWallet = async ( - t: SelectedConnectionTypes, - activate?: boolean -): Promise<{ success: boolean }> => { - const connection = getConnection(t); - if (!connection) return { success: false }; - const { connector: c, name } = connection; - try { - if (activate) { - await c.activate(); - } else { - await c.connectEagerly?.(); - } - lsService.setItem('connectionType', t); - console.log(`connected to ${name}`); - return { success: true }; - } catch (e: any) { - console.error(`error connecting to ${name}`, e); - return { - success: false, - }; - } -}; - -export const IS_IN_IFRAME = window?.self !== window.top; - -export const IS_METAMASK_WALLET = Boolean( - window?.ethereum && window?.ethereum?.isMetaMask -); - -export const IS_COINBASE_WALLET = - // @ts-ignore - Boolean(window?.ethereum && window?.ethereum.isCoinbaseWallet); - -export const IS_METAMASK_BROWSER = isMobile && IS_METAMASK_WALLET; - -export const IS_COINBASE_BROWSER = isMobile && IS_COINBASE_WALLET; - -const NATIVE_APP_BROWSERS = [ - { - enabled: IS_IN_IFRAME, - type: 'gnosisSafe', - activate: true, - }, - { - enabled: IS_COINBASE_BROWSER, - type: 'coinbaseWallet', - activate: true, - }, - { - enabled: IS_METAMASK_BROWSER, - type: 'injected', - activate: true, - }, -] as const; - -export const isNativeAppBrowser = NATIVE_APP_BROWSERS.find((x) => x.enabled); diff --git a/src/pages/strategies/activity/index.tsx b/src/pages/strategies/activity/index.tsx index 24e7813d7..4e23a7450 100644 --- a/src/pages/strategies/activity/index.tsx +++ b/src/pages/strategies/activity/index.tsx @@ -1,10 +1,10 @@ import { ActivityProvider } from 'components/activity/ActivityProvider'; import { ActivitySection } from 'components/activity/ActivitySection'; import { StrategyCreateFirst } from 'components/strategies/overview/StrategyCreateFirst'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; export const StrategiesActivityPage = () => { - const { user } = useWeb3(); + const { user } = useWagmi(); return ( { - const { user } = useWeb3(); + const { user } = useWagmi(); const { data: strategies, isLoading } = useGetUserStrategies({ user }); const { strategyId } = useParams({ from: '/strategies/edit/$strategyId' }); const [strategy, setStrategy] = useState(); diff --git a/src/pages/strategies/index.tsx b/src/pages/strategies/index.tsx index 442b96ad8..934a4d44d 100644 --- a/src/pages/strategies/index.tsx +++ b/src/pages/strategies/index.tsx @@ -3,7 +3,7 @@ import { StrategyTab, } from 'components/strategies/StrategyPageTabs'; import { useBreakpoints } from 'hooks/useBreakpoints'; -import { useWeb3 } from 'libs/web3'; +import { useWagmi } from 'libs/wagmi'; import { WalletConnect } from 'components/common/walletConnect'; import { StrategyPageTitleWidget } from 'components/strategies/overview/StrategyPageTitleWidget'; import { useGetUserStrategies } from 'libs/queries'; @@ -18,7 +18,7 @@ import { StrategyProvider } from 'hooks/useStrategies'; export const StrategiesPage = () => { const { pathname } = useRouterState().location; const { belowBreakpoint } = useBreakpoints(); - const { user } = useWeb3(); + const { user } = useWagmi(); const query = useGetUserStrategies({ user }); const match = useMatchRoute(); const isStrategiesPage = match({ to: '/' }); diff --git a/src/services/localeStorage/index.ts b/src/services/localeStorage/index.ts index bedd1a852..98efea77d 100644 --- a/src/services/localeStorage/index.ts +++ b/src/services/localeStorage/index.ts @@ -1,4 +1,4 @@ -import { ConnectionType, EnumConnectionType } from 'libs/web3'; +import { SelectableConnectionType, EnumConnectionType } from 'libs/wagmi'; import { ManagedLocalStorage } from 'utils/managedLocalStorage'; import { Token } from 'libs/tokens'; import { Notification } from 'libs/notifications'; @@ -19,7 +19,7 @@ import { FiatSymbol } from 'utils/carbonApi'; // ************************** / interface LocalStorageSchema { - connectionType: ConnectionType | EnumConnectionType; + connectionType: SelectableConnectionType | EnumConnectionType; tenderlyRpc: string; carbonApi: string; imposterAccount: string; diff --git a/src/store/StoreProvider.tsx b/src/store/StoreProvider.tsx index 733d9f439..ce60d4202 100644 --- a/src/store/StoreProvider.tsx +++ b/src/store/StoreProvider.tsx @@ -1,10 +1,7 @@ -import { ConnectionType } from 'libs/web3'; import { createContext, - Dispatch, FC, ReactNode, - SetStateAction, useCallback, useContext, useRef, @@ -68,8 +65,6 @@ interface StoreContext { fiatCurrency: FiatCurrencyStore; innerHeight: number; setInnerHeight: (value: number) => void; - selectedWallet: ConnectionType | null; - setSelectedWallet: Dispatch>; isManualConnection: React.MutableRefObject; toaster: ToastStore; simDisclaimerLastSeen?: number; @@ -92,8 +87,6 @@ const defaultValue: StoreContext = { fiatCurrency: defaultFiatCurrencyStore, innerHeight: 0, setInnerHeight: () => {}, - selectedWallet: null, - setSelectedWallet: () => {}, isManualConnection: { current: false }, toaster: defaultToastStore, simDisclaimerLastSeen: undefined, @@ -113,9 +106,6 @@ export const useStore = () => { export const StoreProvider: FC<{ children: ReactNode }> = ({ children }) => { const [countryBlocked, setCountryBlocked] = useState(null); const [innerHeight, setInnerHeight] = useState(window.innerHeight); - const [selectedWallet, setSelectedWallet] = useState( - null - ); const isManualConnection = useRef(false); const sdk = useSDKStore(); const tradeSettings = useTradeSettingsStore(); @@ -156,8 +146,6 @@ export const StoreProvider: FC<{ children: ReactNode }> = ({ children }) => { fiatCurrency, innerHeight, setInnerHeight, - selectedWallet, - setSelectedWallet, toaster, simDisclaimerLastSeen, setSimDisclaimerLastSeen, diff --git a/yarn.lock b/yarn.lock index c027be8a9..682cb5701 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,6 +12,11 @@ resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.3.2.tgz#a6abc715fb6884851fca9dad37fc34739a04fd11" integrity sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw== +"@adraffy/ens-normalize@1.10.0": + version "1.10.0" + resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7" + integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q== + "@adraffy/ens-normalize@1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.9.0.tgz#223572538f6bea336750039bb43a4016dcc8182d" @@ -1240,6 +1245,13 @@ dependencies: regenerator-runtime "^0.13.11" +"@babel/runtime@^7.19.4", "@babel/runtime@^7.20.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.6.tgz#5b76eb89ad45e2e4a0a8db54c456251469a3358e" + integrity sha512-Ja18XcETdEl5mzzACGd+DKgaGJzPTCow7EglgwTmHdwokzDFYh/MHua6lU6DV/hjF2IaOJ4oX2nqnjG7RElKOw== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/runtime@^7.21.0": version "7.23.8" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.8.tgz#8ee6fe1ac47add7122902f257b8ddf55c898f650" @@ -1325,6 +1337,18 @@ resolved "https://registry.yarnpkg.com/@cloudflare/workers-types/-/workers-types-4.20230801.0.tgz#d23ec9671a08d91ad027fb4c783e94dee275d279" integrity sha512-RzRUR+J/T3h58qbTZHYntYsnZXu3JnrlZIhqP2hhdyfoZAZ/+ko4wX0foAqlYHi+kXWaWtySHBuMcx6ec6TXlQ== +"@coinbase/wallet-sdk@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@coinbase/wallet-sdk/-/wallet-sdk-4.0.2.tgz#403b2194ecc9bcf8b8fd217ec5cd6529013b58f4" + integrity sha512-WMUeFbtS0rn8zavjAmNhFWq1r3TV7E5KuSij1Sar0/XuOC+nhj96uqSlIApAHdhuScoKZBq39VYsAQCHzOC6/w== + dependencies: + buffer "^6.0.3" + clsx "^1.2.1" + eventemitter3 "^5.0.1" + keccak "^3.0.3" + preact "^10.16.0" + sha.js "^2.4.11" + "@coinbase/wallet-sdk@^3.6.3": version "3.7.1" resolved "https://registry.yarnpkg.com/@coinbase/wallet-sdk/-/wallet-sdk-3.7.1.tgz#44b3b7a925ff5cc974e4cbf7a44199ffdcf03541" @@ -1617,6 +1641,38 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.46.0.tgz#3f7802972e8b6fe3f88ed1aabc74ec596c456db6" integrity sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA== +"@ethereumjs/common@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-3.2.0.tgz#b71df25845caf5456449163012074a55f048e0a0" + integrity sha512-pksvzI0VyLgmuEF2FA/JR/4/y6hcPq8OUail3/AvycBaW1d5VSauOZzqGvJ3RTmR4MU35lWE8KseKOsEhrFRBA== + dependencies: + "@ethereumjs/util" "^8.1.0" + crc-32 "^1.2.0" + +"@ethereumjs/rlp@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-4.0.1.tgz#626fabfd9081baab3d0a3074b0c7ecaf674aaa41" + integrity sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw== + +"@ethereumjs/tx@^4.1.2", "@ethereumjs/tx@^4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-4.2.0.tgz#5988ae15daf5a3b3c815493bc6b495e76009e853" + integrity sha512-1nc6VO4jtFd172BbSnTnDQVr9IYBFl1y4xPzZdtkrkKIncBCkdbgfdRV+MiTkJYAtTxvV12GRZLqBFT1PNK6Yw== + dependencies: + "@ethereumjs/common" "^3.2.0" + "@ethereumjs/rlp" "^4.0.1" + "@ethereumjs/util" "^8.1.0" + ethereum-cryptography "^2.0.0" + +"@ethereumjs/util@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/util/-/util-8.1.0.tgz#299df97fb6b034e0577ce9f94c7d9d1004409ed4" + integrity sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA== + dependencies: + "@ethereumjs/rlp" "^4.0.1" + ethereum-cryptography "^2.0.0" + micro-ftch "^0.3.1" + "@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.0", "@ethersproject/abi@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" @@ -1656,7 +1712,7 @@ "@ethersproject/logger" "^5.7.0" "@ethersproject/properties" "^5.7.0" -"@ethersproject/address@5.7.0", "@ethersproject/address@^5", "@ethersproject/address@^5.7.0": +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== @@ -1808,7 +1864,7 @@ dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5", "@ethersproject/providers@^5.7.1", "@ethersproject/providers@^5.7.2": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.1", "@ethersproject/providers@^5.7.2": version "5.7.2" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== @@ -2100,13 +2156,6 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@keplr-wallet/types@^0.12.63": - version "0.12.95" - resolved "https://registry.yarnpkg.com/@keplr-wallet/types/-/types-0.12.95.tgz#db5e18d7fa7277b0831fb41c0e0fa0cee4ca6b6f" - integrity sha512-Wq+Sa0+Uk4hRBbA9J09jq55NkFarVCdiWUZjasIDjrpBfGisV3vtFerMyb1xGsRvj+lkO3HEMAki5h6bQ0sMtA== - dependencies: - long "^4.0.0" - "@lit-labs/ssr-dom-shim@^1.0.0", "@lit-labs/ssr-dom-shim@^1.1.0": version "1.1.1" resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.1.tgz#64df34e2f12e68e78ac57e571d25ec07fa460ca9" @@ -2119,16 +2168,131 @@ dependencies: "@lit-labs/ssr-dom-shim" "^1.0.0" -"@metamask/detect-provider@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@metamask/detect-provider/-/detect-provider-1.2.0.tgz#3667a7531f2a682e3c3a43eaf3a1958bdb42a696" - integrity sha512-ocA76vt+8D0thgXZ7LxFPyqw3H7988qblgzddTDA6B8a/yU0uKV42QR/DhA+Jh11rJjxW0jKvwb5htA6krNZDQ== +"@metamask/eth-json-rpc-provider@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@metamask/eth-json-rpc-provider/-/eth-json-rpc-provider-1.0.1.tgz#3fd5316c767847f4ca107518b611b15396a5a32c" + integrity sha512-whiUMPlAOrVGmX8aKYVPvlKyG4CpQXiNNyt74vE1xb5sPvmx5oA7B/kOi/JdBvhGQq97U1/AVdXEdk2zkP8qyA== + dependencies: + "@metamask/json-rpc-engine" "^7.0.0" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^5.0.1" + +"@metamask/json-rpc-engine@^7.0.0", "@metamask/json-rpc-engine@^7.3.2": + version "7.3.3" + resolved "https://registry.yarnpkg.com/@metamask/json-rpc-engine/-/json-rpc-engine-7.3.3.tgz#f2b30a2164558014bfcca45db10f5af291d989af" + integrity sha512-dwZPq8wx9yV3IX2caLi9q9xZBw2XeIoYqdyihDDDpuHVCEiqadJLwqM3zy+uwf6F1QYQ65A8aOMQg1Uw7LMLNg== + dependencies: + "@metamask/rpc-errors" "^6.2.1" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^8.3.0" + +"@metamask/json-rpc-middleware-stream@^6.0.2": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@metamask/json-rpc-middleware-stream/-/json-rpc-middleware-stream-6.0.2.tgz#75852ce481f8f9f091edbfc04ffdf964f8f3cabd" + integrity sha512-jtyx3PRfc1kqoLpYveIVQNwsxYKefc64/LCl9h9Da1m3nUKEvypbYuXSIwi237qvOjKmNHQKsDOZg6f4uBf62Q== + dependencies: + "@metamask/json-rpc-engine" "^7.3.2" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^8.3.0" + readable-stream "^3.6.2" + +"@metamask/object-multiplex@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@metamask/object-multiplex/-/object-multiplex-2.0.0.tgz#aa6e4aa7b4e2f457ea4bb51cd7281d931e0aa35d" + integrity sha512-+ItrieVZie3j2LfYE0QkdW3dsEMfMEp419IGx1zyeLqjRZ14iQUPRO0H6CGgfAAoC0x6k2PfCAGRwJUA9BMrqA== + dependencies: + once "^1.4.0" + readable-stream "^3.6.2" + +"@metamask/onboarding@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@metamask/onboarding/-/onboarding-1.0.1.tgz#14a36e1e175e2f69f09598e2008ab6dc1b3297e6" + integrity sha512-FqHhAsCI+Vacx2qa5mAFcWNSrTcVGMNjzxVgaX8ECSny/BJ9/vgXP9V7WF/8vb9DltPeQkxr+Fnfmm6GHfmdTQ== + dependencies: + bowser "^2.9.0" + +"@metamask/providers@^15.0.0": + version "15.0.0" + resolved "https://registry.yarnpkg.com/@metamask/providers/-/providers-15.0.0.tgz#e8957bb89d2f3379b32b60117d79a141e44db2bc" + integrity sha512-FXvL1NQNl6I7fMOJTfQYcBlBZ33vSlm6w80cMpmn8sJh0Lb7wcBpe02UwBsNlARnI+Qsr26XeDs6WHUHQh8CuA== + dependencies: + "@metamask/json-rpc-engine" "^7.3.2" + "@metamask/json-rpc-middleware-stream" "^6.0.2" + "@metamask/object-multiplex" "^2.0.0" + "@metamask/rpc-errors" "^6.2.1" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^8.3.0" + detect-browser "^5.2.0" + extension-port-stream "^3.0.0" + fast-deep-equal "^3.1.3" + is-stream "^2.0.0" + readable-stream "^3.6.2" + webextension-polyfill "^0.10.0" + +"@metamask/rpc-errors@^6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@metamask/rpc-errors/-/rpc-errors-6.2.1.tgz#f5daf429ededa7cb83069dc621bd5738fe2a1d80" + integrity sha512-VTgWkjWLzb0nupkFl1duQi9Mk8TGT9rsdnQg6DeRrYEFxtFOh0IF8nAwxM/4GWqDl6uIB06lqUBgUrAVWl62Bw== + dependencies: + "@metamask/utils" "^8.3.0" + fast-safe-stringify "^2.0.6" "@metamask/safe-event-emitter@2.0.0", "@metamask/safe-event-emitter@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz#af577b477c683fad17c619a78208cede06f9605c" integrity sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q== +"@metamask/safe-event-emitter@^3.0.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-3.1.1.tgz#e89b840a7af8097a8ed4953d8dc8470d1302d3ef" + integrity sha512-ihb3B0T/wJm1eUuArYP4lCTSEoZsClHhuWyfo/kMX3m/odpqNcPfsz5O2A3NT7dXCAgWPGDQGPqygCpgeniKMw== + +"@metamask/sdk-communication-layer@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@metamask/sdk-communication-layer/-/sdk-communication-layer-0.20.2.tgz#7f7fd334b2d26abd1a5a1ec1ffadf823a9589344" + integrity sha512-TN+whYbCClFSkx52Ild1RcjoRyz8YZgwNvZeooIcZIvCfBM6U9W5273KGiY7WLc/oO4KKmFk17d7vMO4gNvhhw== + dependencies: + bufferutil "^4.0.8" + date-fns "^2.29.3" + debug "^4.3.4" + utf-8-validate "^6.0.3" + uuid "^8.3.2" + +"@metamask/sdk-install-modal-web@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@metamask/sdk-install-modal-web/-/sdk-install-modal-web-0.20.2.tgz#1cf0eb3c26291de7598190878fa9a893c4eb2d66" + integrity sha512-0QiaZhV15AGdN1zU2jfTI32eC3YkwEpzDfR9+oiZ9bd2G72c6lYBhTsmDGUd01aP6A+bqJR5PjI8Wh2AWtoLeA== + dependencies: + qr-code-styling "^1.6.0-rc.1" + +"@metamask/sdk@0.20.3": + version "0.20.3" + resolved "https://registry.yarnpkg.com/@metamask/sdk/-/sdk-0.20.3.tgz#73851d68ffe5d45c1872c024182922530b187b7a" + integrity sha512-HZ9NwA+LxiXzuy0YWbWsuD4xejQtp85bhcCAf8UgpA/0dOyF3RS4dKDdBBXSyRgk3RWPjeJgHxioaH4CmBmiRA== + dependencies: + "@metamask/onboarding" "^1.0.1" + "@metamask/providers" "^15.0.0" + "@metamask/sdk-communication-layer" "0.20.2" + "@metamask/sdk-install-modal-web" "0.20.2" + "@types/dom-screen-wake-lock" "^1.0.0" + bowser "^2.9.0" + cross-fetch "^4.0.0" + debug "^4.3.4" + eciesjs "^0.3.15" + eth-rpc-errors "^4.0.3" + eventemitter2 "^6.4.7" + i18next "22.5.1" + i18next-browser-languagedetector "7.1.0" + obj-multiplex "^1.0.0" + pump "^3.0.0" + qrcode-terminal-nooctal "^0.12.1" + react-native-webview "^11.26.0" + readable-stream "^3.6.2" + rollup-plugin-visualizer "^5.9.2" + socket.io-client "^4.5.1" + util "^0.12.4" + uuid "^8.3.2" + "@metamask/utils@^3.0.1": version "3.6.0" resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-3.6.0.tgz#b218b969a05ca7a8093b5d1670f6625061de707d" @@ -2139,6 +2303,32 @@ semver "^7.3.8" superstruct "^1.0.3" +"@metamask/utils@^5.0.1": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-5.0.2.tgz#140ba5061d90d9dac0280c19cab101bc18c8857c" + integrity sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g== + dependencies: + "@ethereumjs/tx" "^4.1.2" + "@types/debug" "^4.1.7" + debug "^4.3.4" + semver "^7.3.8" + superstruct "^1.0.3" + +"@metamask/utils@^8.3.0": + version "8.4.0" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-8.4.0.tgz#f44812c96467a4e1b70b2edff6ee89a9caa4e354" + integrity sha512-dbIc3C7alOe0agCuBHM1h71UaEaEqOk2W8rAtEn8QGz4haH2Qq7MoK6i7v2guzvkJVVh79c+QCzIqphC3KvrJg== + dependencies: + "@ethereumjs/tx" "^4.2.0" + "@noble/hashes" "^1.3.1" + "@scure/base" "^1.1.3" + "@types/debug" "^4.1.7" + debug "^4.3.4" + pony-cause "^2.1.10" + semver "^7.5.4" + superstruct "^1.0.3" + uuid "^9.0.1" + "@motionone/animation@^10.13.1", "@motionone/animation@^10.15.1": version "10.15.1" resolved "https://registry.yarnpkg.com/@motionone/animation/-/animation-10.15.1.tgz#4a85596c31cbc5100ae8eb8b34c459fb0ccf6807" @@ -2234,6 +2424,20 @@ dependencies: "@noble/hashes" "1.3.0" +"@noble/curves@1.2.0", "@noble/curves@~1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" + integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== + dependencies: + "@noble/hashes" "1.3.2" + +"@noble/curves@1.3.0", "@noble/curves@~1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.3.0.tgz#01be46da4fd195822dab821e72f71bf4aeec635e" + integrity sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA== + dependencies: + "@noble/hashes" "1.3.3" + "@noble/curves@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.1.0.tgz#f13fc667c89184bc04cccb9b11e8e7bae27d8c3d" @@ -2251,6 +2455,21 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== +"@noble/hashes@1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" + integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== + +"@noble/hashes@1.3.3", "@noble/hashes@~1.3.2": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" + integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== + +"@noble/hashes@^1.3.1": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" + integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -2460,18 +2679,18 @@ resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.3.2.tgz#31b9c510d8cada9683549e1dbb4284cca5001faf" integrity sha512-V+MvGwaHH03hYhY+k6Ef/xKd6RYlc4q8WBx+2ANmipHJcKuktNcI/NgEsJgdSUF6Lw32njT6OnrRsKYCdgHjYw== -"@safe-global/safe-apps-provider@^0.17.1": - version "0.17.1" - resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-provider/-/safe-apps-provider-0.17.1.tgz#72df2a66be5343940ed505efe594ed3b0f2f7015" - integrity sha512-lYfRqrbbK1aKU1/UGkYWc/X7PgySYcumXKc5FB2uuwAs2Ghj8uETuW5BrwPqyjBknRxutFbTv+gth/JzjxAhdQ== +"@safe-global/safe-apps-provider@0.18.1": + version "0.18.1" + resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-provider/-/safe-apps-provider-0.18.1.tgz#287b5a1e2ef3be630dacde54279409df3ced8202" + integrity sha512-V4a05A3EgJcriqtDoJklDz1BOinWhC6P0hjUSxshA4KOZM7rGPCTto/usXs09zr1vvL28evl/NldSTv97j2bmg== dependencies: - "@safe-global/safe-apps-sdk" "8.0.0" + "@safe-global/safe-apps-sdk" "^8.1.0" events "^3.3.0" -"@safe-global/safe-apps-sdk@8.0.0", "@safe-global/safe-apps-sdk@^8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-sdk/-/safe-apps-sdk-8.0.0.tgz#9bdfe0e0d85e1b2d279bb840f40c4b930aaf8bc1" - integrity sha512-gYw0ki/EAuV1oSyMxpqandHjnthZjYYy+YWpTAzf8BqfXM3ItcZLpjxfg+3+mXW8HIO+3jw6T9iiqEXsqHaMMw== +"@safe-global/safe-apps-sdk@8.1.0", "@safe-global/safe-apps-sdk@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-sdk/-/safe-apps-sdk-8.1.0.tgz#d1d0c69cd2bf4eef8a79c5d677d16971926aa64a" + integrity sha512-XJbEPuaVc7b9n23MqlF6c+ToYIS3f7P2Sel8f3cSBQ9WORE4xrSuvhMpK9fDSFqJ7by/brc+rmJR/5HViRr0/w== dependencies: "@safe-global/safe-gateway-typescript-sdk" "^3.5.3" viem "^1.0.0" @@ -2483,6 +2702,11 @@ dependencies: cross-fetch "^3.1.5" +"@scure/base@^1.1.3", "@scure/base@~1.1.2", "@scure/base@~1.1.4": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.6.tgz#8ce5d304b436e4c84f896e0550c83e4d88cb917d" + integrity sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g== + "@scure/base@~1.1.0": version "1.1.1" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" @@ -2497,6 +2721,24 @@ "@noble/hashes" "~1.3.0" "@scure/base" "~1.1.0" +"@scure/bip32@1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.2.tgz#90e78c027d5e30f0b22c1f8d50ff12f3fb7559f8" + integrity sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA== + dependencies: + "@noble/curves" "~1.2.0" + "@noble/hashes" "~1.3.2" + "@scure/base" "~1.1.2" + +"@scure/bip32@1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.3.tgz#a9624991dc8767087c57999a5d79488f48eae6c8" + integrity sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ== + dependencies: + "@noble/curves" "~1.3.0" + "@noble/hashes" "~1.3.2" + "@scure/base" "~1.1.4" + "@scure/bip39@1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.0.tgz#a207e2ef96de354de7d0002292ba1503538fc77b" @@ -2505,6 +2747,22 @@ "@noble/hashes" "~1.3.0" "@scure/base" "~1.1.0" +"@scure/bip39@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.1.tgz#5cee8978656b272a917b7871c981e0541ad6ac2a" + integrity sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg== + dependencies: + "@noble/hashes" "~1.3.0" + "@scure/base" "~1.1.0" + +"@scure/bip39@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.2.tgz#f3426813f4ced11a47489cbcf7294aa963966527" + integrity sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA== + dependencies: + "@noble/hashes" "~1.3.2" + "@scure/base" "~1.1.4" + "@sentry-internal/tracing@7.61.1": version "7.61.1" resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.61.1.tgz#8055b7dfbf89b7089a591b27e05484d5f6773948" @@ -2627,6 +2885,11 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== +"@socket.io/component-emitter@~3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2" + integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA== + "@solana/buffer-layout@^4.0.0": version "4.0.1" resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15" @@ -2872,22 +3135,6 @@ "@svgr/hast-util-to-babel-ast" "^6.5.1" svg-parser "^2.0.4" -"@tailwindzone/connect-web3-react@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@tailwindzone/connect-web3-react/-/connect-web3-react-1.0.0.tgz#f035345883c7bbf726055ba7c3c9f29179d05cc7" - integrity sha512-FFAh9pwSHIsJRqjemBibwMMz/ZJLWqmhIZ0Zt3wWl3sy1IP2nYhOi8/fWBdHgEfdF+DWMdufZQCxyyiFAyGCxw== - dependencies: - "@tailwindzone/connect" "^2.4.2" - "@web3-react/core" "^8.2.3" - "@web3-react/types" "^8.2.3" - -"@tailwindzone/connect@^2.4.2": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@tailwindzone/connect/-/connect-2.4.2.tgz#b0ad35aa2d9a5396ed7c857689da9d78d976324a" - integrity sha512-9lQRZgH3onCQyCbnnYDLKVAWz+Bw1Q/TTEUoA8z1pM+olVO2yykyj1h/y72mUUcPMQsVAby3KcYg/XG7leBwIw== - dependencies: - "@keplr-wallet/types" "^0.12.63" - "@tanstack/history@1.4.9": version "1.4.9" resolved "https://registry.yarnpkg.com/@tanstack/history/-/history-1.4.9.tgz#37794f8aa96568a12b7ac40335bae06953577a87" @@ -3315,6 +3562,11 @@ dependencies: "@types/ms" "*" +"@types/dom-screen-wake-lock@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@types/dom-screen-wake-lock/-/dom-screen-wake-lock-1.0.3.tgz#c3588a5f6f40fae957f9ce5be9bc4927a61bb9a0" + integrity sha512-3Iten7X3Zgwvk6kh6/NRdwN7WbZ760YgFCsF5AxDifltUQzW1RaW+WRmcVtgwFzLjaNu64H+0MPJ13yRa8g3Dw== + "@types/estree@1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" @@ -3433,6 +3685,13 @@ resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.3.tgz#cef09e3ec9af1d63d2a6cc5b383a737e24e6dcf5" integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== +"@types/secp256k1@^4.0.4": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.6.tgz#d60ba2349a51c2cbc5e816dcd831a42029d376bf" + integrity sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ== + dependencies: + "@types/node" "*" + "@types/semver@^7.3.12": version "7.5.0" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" @@ -3635,6 +3894,28 @@ resolved "https://registry.yarnpkg.com/@wagmi/chains/-/chains-1.6.0.tgz#eb992ad28dbaaab729b5bcab3e5b461e8a035656" integrity sha512-5FRlVxse5P4ZaHG3GTvxwVANSmYJas1eQrTBHhjxVtqXoorm0aLmCHbhmN8Xo1yu09PaWKlleEvfE98yH4AgIw== +"@wagmi/connectors@5.0.7": + version "5.0.7" + resolved "https://registry.yarnpkg.com/@wagmi/connectors/-/connectors-5.0.7.tgz#f52fd917fa9e55af52acdf21b1c3c8724260a986" + integrity sha512-EoTtRKnUPhKpU/LFU7LU4iK8yNU/akU5vSgX+K21QXHi8ImhEEsd2nPEU5kfkWriGf+D/raD4gLZYsfppDRUaw== + dependencies: + "@coinbase/wallet-sdk" "4.0.2" + "@metamask/sdk" "0.20.3" + "@safe-global/safe-apps-provider" "0.18.1" + "@safe-global/safe-apps-sdk" "8.1.0" + "@walletconnect/ethereum-provider" "2.13.0" + "@walletconnect/modal" "2.6.2" + cbw-sdk "npm:@coinbase/wallet-sdk@3.9.3" + +"@wagmi/core@2.10.5": + version "2.10.5" + resolved "https://registry.yarnpkg.com/@wagmi/core/-/core-2.10.5.tgz#9717ef118457dfb64550ca81a61efb66c2fbc4c3" + integrity sha512-BvqFEdJTTepOKtPnacq7oE8gUZ4llzdxmPSBEYePArd1dvP/e5gwwfS5/8VBcvDvGcoX4N0lw5A4NNOJKL0Q+A== + dependencies: + eventemitter3 "5.0.1" + mipd "0.0.5" + zustand "4.4.1" + "@walletconnect/core@2.13.0": version "2.13.0" resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.13.0.tgz#6b79b039930643e8ee85a0f512b143a35fdb8b52" @@ -3687,7 +3968,7 @@ dependencies: tslib "1.14.1" -"@walletconnect/ethereum-provider@^2.10.1": +"@walletconnect/ethereum-provider@2.13.0": version "2.13.0" resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.13.0.tgz#5148851983e0d55fa1c18737b2db22802c82434c" integrity sha512-dnpW8mmLpWl1AZUYGYZpaAfGw1HFkL0WSlhk5xekx3IJJKn4pLacX2QeIOo0iNkzNQxZfux1AK4Grl1DvtzZEA== @@ -3878,7 +4159,7 @@ motion "10.16.2" qrcode "1.5.3" -"@walletconnect/modal@2.6.2", "@walletconnect/modal@^2.6.2": +"@walletconnect/modal@2.6.2": version "2.6.2" resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.6.2.tgz#4b534a836f5039eeb3268b80be7217a94dd12651" integrity sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA== @@ -4066,90 +4347,6 @@ "@walletconnect/window-getters" "^1.0.1" tslib "1.14.1" -"@web3-react/coinbase-wallet@8.2.3": - version "8.2.3" - resolved "https://registry.yarnpkg.com/@web3-react/coinbase-wallet/-/coinbase-wallet-8.2.3.tgz#08d9ae9c9d15313a58f0bc33d970c73b0aaf813a" - integrity sha512-hYrOwv0RzhwQuI87GBv9ZHAblgrFg7YomnObOyuH2tPZT8+cQAtgP4D293TDQhW9SR1NXxzoS0tbTECWd4yUAQ== - dependencies: - "@web3-react/types" "^8.2.3" - -"@web3-react/core@8.2.3", "@web3-react/core@^8.2.3": - version "8.2.3" - resolved "https://registry.yarnpkg.com/@web3-react/core/-/core-8.2.3.tgz#142899e74401bfd3a481a1b9578b2fd8f9dfde81" - integrity sha512-0ezmRKhqQpoa9ct2/3erg60zBXfC/f/liYR1mfSGKtIroRkLnPARigZSV6pI+fi8bhfGJ0RKtFWyTCCWZzdq1w== - dependencies: - "@web3-react/store" "^8.2.3" - "@web3-react/types" "^8.2.3" - zustand "4.4.0" - optionalDependencies: - "@ethersproject/providers" "^5" - -"@web3-react/eip1193@8.2.3": - version "8.2.3" - resolved "https://registry.yarnpkg.com/@web3-react/eip1193/-/eip1193-8.2.3.tgz#d09d5a5ea98719010eb7dd845631acb1f15c51e5" - integrity sha512-PdL8PCv3zgQrnowRlBK7PIO8G7v/nc31PYgarACo8mX+l5Y4+l7+ma/kpkULXp5yLtc4qlQYlCalmXpcbtl2FA== - dependencies: - "@web3-react/types" "^8.2.3" - eventemitter3 "^4.0.7" - -"@web3-react/empty@^8.2.3": - version "8.2.3" - resolved "https://registry.yarnpkg.com/@web3-react/empty/-/empty-8.2.3.tgz#70a0b07d7918a1f10c6dc4001b9fefc2f72face8" - integrity sha512-Uopeac2XgyJLmK8EawNmG1kferlSvklKgWzbianygriC3C3+6yHvflUBmHzYfcpZDq5gotP4JJr2bmhGAocQ5w== - dependencies: - "@web3-react/types" "^8.2.3" - -"@web3-react/gnosis-safe@8.2.4": - version "8.2.4" - resolved "https://registry.yarnpkg.com/@web3-react/gnosis-safe/-/gnosis-safe-8.2.4.tgz#1f595a64bd26506a2e537b8a6734b5bf243d4e36" - integrity sha512-4M0CFludHJXtLsKJlKBIeMZcdTO60e6psYhYm2GLy76do9K9JJvBE8U4YVFBHLpk7sWpySsrCuYcaVZyzZ/xtA== - dependencies: - "@safe-global/safe-apps-provider" "^0.17.1" - "@safe-global/safe-apps-sdk" "^8.0.0" - "@web3-react/types" "^8.2.3" - -"@web3-react/metamask@8.2.4": - version "8.2.4" - resolved "https://registry.yarnpkg.com/@web3-react/metamask/-/metamask-8.2.4.tgz#26438222c4b17964c011ea359058ba6feb6a2330" - integrity sha512-4yoqDgvcB0QKUGSk00/fUipA3z5rOXcQYAwE0CABPa5lbTRAIm5i8F0Gj8UW7QO0pQus4UtjX0+JxWdclB7UrA== - dependencies: - "@metamask/detect-provider" "^1.2.0" - "@web3-react/types" "^8.2.3" - -"@web3-react/network@8.2.3": - version "8.2.3" - resolved "https://registry.yarnpkg.com/@web3-react/network/-/network-8.2.3.tgz#edc8268877006780321fed7e632ebd86ef057eb8" - integrity sha512-OAlXo3aNhldANmHt/N88SuLrWihVQizJf0cNy1cqnbNIAg87292PnAqCZrj3Pwaq/s8hoSgapc87zl1KFJeTjA== - dependencies: - "@ethersproject/providers" "^5" - "@web3-react/types" "^8.2.3" - -"@web3-react/store@^8.2.3": - version "8.2.3" - resolved "https://registry.yarnpkg.com/@web3-react/store/-/store-8.2.3.tgz#64a0ddaf49f85c120e07f5089dd4d7df9346f881" - integrity sha512-qUJQ5pDsYYDra+/+glq2BmIS43HYAiEZ22sLLVh6E75WiZKRNOOqUxBDPe33KTIn718DLt51j+wd2FT+oT/kJQ== - dependencies: - "@ethersproject/address" "^5" - "@web3-react/types" "^8.2.3" - zustand "4.4.0" - -"@web3-react/types@8.2.3", "@web3-react/types@^8.2.3": - version "8.2.3" - resolved "https://registry.yarnpkg.com/@web3-react/types/-/types-8.2.3.tgz#e2ac1eaaa7f96b518a5535fee048bf73470f5c21" - integrity sha512-kSG90QkN+n7IOtp10nQ44oS8J7jzfH9EmqnruwBpCGybh1FM/ohyRvUKWYZNfNE4wsjTSpKsINR0/VdDsZMHyg== - dependencies: - zustand "4.4.0" - -"@web3-react/walletconnect-v2@8.5.1": - version "8.5.1" - resolved "https://registry.yarnpkg.com/@web3-react/walletconnect-v2/-/walletconnect-v2-8.5.1.tgz#bc7d43b53bb30ec524e0cc36e20e1f279bf18818" - integrity sha512-K6RjdllFpEftTDQw39fRfuVcBLNCWXDxx5oZiWDc7D2RW071C0m1WridOeUiELmCXykyDCrIjd2zAVwV4GGueA== - dependencies: - "@walletconnect/ethereum-provider" "^2.10.1" - "@walletconnect/modal" "^2.6.2" - "@web3-react/types" "^8.2.3" - eventemitter3 "^4.0.7" - JSONStream@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -4168,6 +4365,23 @@ abitype@0.9.3: resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.9.3.tgz#294d25288ee683d72baf4e1fed757034e3c8c277" integrity sha512-dz4qCQLurx97FQhnb/EIYTk/ldQ+oafEDUqC0VVIeQS1Q48/YWt/9YNfMmp9SLFqN41ktxny3c8aYxHjmFIB/w== +abitype@0.9.8: + version "0.9.8" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.9.8.tgz#1f120b6b717459deafd213dfbf3a3dd1bf10ae8c" + integrity sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ== + +abitype@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.0.tgz#237176dace81d90d018bebf3a45cb42f2a2d9e97" + integrity sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ== + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + acorn-globals@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3" @@ -4616,6 +4830,11 @@ borsh@^0.7.0: bs58 "^4.0.0" text-encoding-utf-8 "^1.0.2" +bowser@^2.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f" + integrity sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -4740,6 +4959,13 @@ bufferutil@^4.0.1: dependencies: node-gyp-build "^4.3.0" +bufferutil@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.8.tgz#1de6a71092d65d7766c4d8a522b261a6e787e8ea" + integrity sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw== + dependencies: + node-gyp-build "^4.3.0" + cac@^6.7.14: version "6.7.14" resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" @@ -4778,6 +5004,21 @@ caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001517: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz#3e7b8b8a7077e78b0eb054d69e6edf5c7df35601" integrity sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg== +"cbw-sdk@npm:@coinbase/wallet-sdk@3.9.3": + version "3.9.3" + resolved "https://registry.yarnpkg.com/@coinbase/wallet-sdk/-/wallet-sdk-3.9.3.tgz#daf10cb0c85d0363315b7270cb3f02bedc408aab" + integrity sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw== + dependencies: + bn.js "^5.2.1" + buffer "^6.0.3" + clsx "^1.2.1" + eth-block-tracker "^7.1.0" + eth-json-rpc-filters "^6.0.0" + eventemitter3 "^5.0.1" + keccak "^3.0.3" + preact "^10.16.0" + sha.js "^2.4.11" + chai@^4.3.7: version "4.3.10" resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.10.tgz#d784cec635e3b7e2ffb66446a63b4e33bd390384" @@ -4925,6 +5166,15 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + clsx@^1.1.0, clsx@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" @@ -5091,6 +5341,11 @@ cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: path-type "^4.0.0" yaml "^1.10.0" +crc-32@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" + integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== + create-ecdh@^4.0.0: version "4.0.4" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" @@ -5129,6 +5384,13 @@ cross-fetch@^3.1.4, cross-fetch@^3.1.5: dependencies: node-fetch "^2.6.12" +cross-fetch@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-4.0.0.tgz#f037aef1580bb3a1a35164ea2a848ba81b445983" + integrity sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g== + dependencies: + node-fetch "^2.6.12" + cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -5445,7 +5707,7 @@ data-urls@^4.0.0: whatwg-mimetype "^3.0.0" whatwg-url "^12.0.0" -date-fns@^2.29.1: +date-fns@^2.29.1, date-fns@^2.29.3: version "2.30.0" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== @@ -5476,6 +5738,13 @@ debug@^3.2.7: dependencies: ms "^2.1.1" +debug@~4.3.1, debug@~4.3.2: + version "4.3.5" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" + decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -5532,6 +5801,11 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" @@ -5585,7 +5859,7 @@ destr@^2.0.3: resolved "https://registry.yarnpkg.com/destr/-/destr-2.0.3.tgz#7f9e97cb3d16dbdca7be52aca1644ce402cfe449" integrity sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ== -detect-browser@5.3.0: +detect-browser@5.3.0, detect-browser@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/detect-browser/-/detect-browser-5.3.0.tgz#9705ef2bddf46072d0f7265a1fe300e36fe7ceca" integrity sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w== @@ -5687,6 +5961,15 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== +eciesjs@^0.3.15: + version "0.3.18" + resolved "https://registry.yarnpkg.com/eciesjs/-/eciesjs-0.3.18.tgz#67b5d73a8466e40a45bbc2f2a3177e71e9c0643d" + integrity sha512-RQhegEtLSyIiGJmFTZfvCTHER/fymipXFVx6OwSRYD6hOuy+6Kjpk0dGvIfP9kxn/smBpxQy71uxpGO406ITCw== + dependencies: + "@types/secp256k1" "^4.0.4" + futoin-hkdf "^1.5.3" + secp256k1 "^5.0.0" + ejs@^3.1.5: version "3.1.10" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" @@ -5712,7 +5995,7 @@ elliptic@6.5.4, elliptic@^6.5.3: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -elliptic@^6.5.5: +elliptic@^6.5.4, elliptic@^6.5.5: version "6.5.5" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.5.tgz#c715e09f78b6923977610d4c2346d6ce22e6dded" integrity sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw== @@ -5740,13 +6023,29 @@ encode-utf8@^1.0.3: resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== -end-of-stream@^1.4.1: +end-of-stream@^1.1.0, end-of-stream@^1.4.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== dependencies: once "^1.4.0" +engine.io-client@~6.5.2: + version "6.5.3" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.5.3.tgz#4cf6fa24845029b238f83c628916d9149c399bc5" + integrity sha512-9Z0qLB0NIisTRt1DZ/8U2k12RJn8yls/nXMZLn+/N8hANT3TcYjKFKcwbw5zFQiN4NTde3TSY9zb79e1ij6j9Q== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + engine.io-parser "~5.2.1" + ws "~8.11.0" + xmlhttprequest-ssl "~2.0.0" + +engine.io-parser@~5.2.1: + version "5.2.2" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.2.tgz#37b48e2d23116919a3453738c5720455e64e1c49" + integrity sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw== + entities@^4.4.0: version "4.5.0" resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" @@ -5923,16 +6222,16 @@ escape-html@^1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== +escape-string-regexp@2.0.0, escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" @@ -6230,6 +6529,17 @@ eth-block-tracker@6.1.0: json-rpc-random-id "^1.0.1" pify "^3.0.0" +eth-block-tracker@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-7.1.0.tgz#dfc16085c6817cc30caabba381deb8d204c1c766" + integrity sha512-8YdplnuE1IK4xfqpf4iU7oBxnOYAc35934o083G8ao+8WM8QQtt/mVlAY6yIAdY1eMeLqg4Z//PZjJGmWGPMRg== + dependencies: + "@metamask/eth-json-rpc-provider" "^1.0.0" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^5.0.1" + json-rpc-random-id "^1.0.1" + pify "^3.0.0" + eth-json-rpc-filters@5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/eth-json-rpc-filters/-/eth-json-rpc-filters-5.1.0.tgz#f0c2aeaec2a45e2dc6ca1b9843d8e85447821427" @@ -6241,6 +6551,17 @@ eth-json-rpc-filters@5.1.0: json-rpc-engine "^6.1.0" pify "^5.0.0" +eth-json-rpc-filters@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/eth-json-rpc-filters/-/eth-json-rpc-filters-6.0.1.tgz#0b3e370f017f5c6f58d3e7bd0756d8099ed85c56" + integrity sha512-ITJTvqoCw6OVMLs7pI8f4gG92n/St6x80ACtHodeS+IXmO0w+t1T5OOzfSt7KLSMLRkVUoexV7tztLgDxg+iig== + dependencies: + "@metamask/safe-event-emitter" "^3.0.0" + async-mutex "^0.2.6" + eth-query "^2.1.2" + json-rpc-engine "^6.1.0" + pify "^5.0.0" + eth-query@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" @@ -6256,13 +6577,23 @@ eth-rpc-errors@4.0.2: dependencies: fast-safe-stringify "^2.0.6" -eth-rpc-errors@^4.0.2: +eth-rpc-errors@^4.0.2, eth-rpc-errors@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz#6ddb6190a4bf360afda82790bb7d9d5e724f423a" integrity sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg== dependencies: fast-safe-stringify "^2.0.6" +ethereum-cryptography@^2.0.0: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz#1352270ed3b339fe25af5ceeadcf1b9c8e30768a" + integrity sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA== + dependencies: + "@noble/curves" "1.3.0" + "@noble/hashes" "1.3.3" + "@scure/bip32" "1.3.3" + "@scure/bip39" "1.2.2" + ethers@^5.1.3, ethers@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" @@ -6299,16 +6630,26 @@ ethers@^5.1.3, ethers@^5.7.2: "@ethersproject/web" "5.7.1" "@ethersproject/wordlists" "5.7.0" -eventemitter3@^4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +eventemitter2@^6.4.7: + version "6.4.9" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.9.tgz#41f2750781b4230ed58827bc119d293471ecb125" + integrity sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg== -eventemitter3@^5.0.1: +eventemitter3@5.0.1, eventemitter3@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== +eventemitter3@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + events@3.3.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -6364,6 +6705,14 @@ expect@^29.0.0: jest-message-util "^29.6.2" jest-util "^29.6.2" +extension-port-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extension-port-stream/-/extension-port-stream-3.0.0.tgz#00a7185fe2322708a36ed24843c81bd754925fef" + integrity sha512-an2S5quJMiy5bnZKEf6AkfH/7r8CzHvhchU40gxN+OM6HPhe7Z9T1FUychcf2M9PpPOO0Hf7BAEfJkw2TDIBDw== + dependencies: + readable-stream "^3.6.2 || ^4.4.2" + webextension-polyfill ">=0.10.0 <1.0" + eyes@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" @@ -6599,6 +6948,11 @@ fuse.js@^6.6.2: resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-6.6.2.tgz#fe463fed4b98c0226ac3da2856a415576dc9a111" integrity sha512-cJaJkxCCxC8qIIcPBF9yGxY0W/tVZS3uEISDxhYIdtk8OL93pe+6Zj7LjCqVV4dzbqcriOZ+kQ/NE4RXZHsIGA== +futoin-hkdf@^1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/futoin-hkdf/-/futoin-hkdf-1.5.3.tgz#6c8024f2e1429da086d4e18289ef2239ad33ee35" + integrity sha512-SewY5KdMpaoCeh7jachEWFsh1nNlaDjNHZXWqL5IGwtpEYHTgkr2+AMCgNwKWkcc0wpSYrZfR7he4WdmHFtDxQ== + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -6935,6 +7289,20 @@ husky@^8.0.3: resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== +i18next-browser-languagedetector@7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/i18next-browser-languagedetector/-/i18next-browser-languagedetector-7.1.0.tgz#01876fac51f86b78975e79b48ccb62e2313a2d7d" + integrity sha512-cr2k7u1XJJ4HTOjM9GyOMtbOA47RtUoWRAtt52z43r3AoMs2StYKyjS3URPhzHaf+mn10hY9dZWamga5WPQjhA== + dependencies: + "@babel/runtime" "^7.19.4" + +i18next@22.5.1: + version "22.5.1" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.5.1.tgz#99df0b318741a506000c243429a7352e5f44d424" + integrity sha512-8TGPgM3pAD+VRsMtUMNknRz3kzqwp/gPALrWMsDnmC1mKqJwpWyooQRLMcbTwq8z8YwSmuj+ZYvc+xCuEpkssA== + dependencies: + "@babel/runtime" "^7.20.6" + iconv-lite@0.6, iconv-lite@0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" @@ -7002,6 +7370,13 @@ internal-slot@^1.0.3, internal-slot@^1.0.4, internal-slot@^1.0.5: resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== +invariant@2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + iron-webcrypto@^1.0.0: version "1.2.1" resolved "https://registry.yarnpkg.com/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz#aa60ff2aa10550630f4c0b11fd2442becdb35a6f" @@ -7070,7 +7445,7 @@ is-date-object@^1.0.1, is-date-object@^1.0.5: dependencies: has-tostringtag "^1.0.0" -is-docker@^2.0.0: +is-docker@^2.0.0, is-docker@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== @@ -7168,6 +7543,11 @@ is-shared-array-buffer@^1.0.2: dependencies: call-bind "^1.0.2" +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + is-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" @@ -7219,7 +7599,7 @@ is-what@^4.1.8: resolved "https://registry.yarnpkg.com/is-what/-/is-what-4.1.15.tgz#de43a81090417a425942d67b1ae86e7fae2eee0e" integrity sha512-uKua1wfy3Yt+YqsD6mTUEa2zSi3G1oPlqTflgaPJ7z63vUGN5pxFpnQfeSLMFnJDEsdvOtkp1rUWkYjB4YfhgA== -is-wsl@^2.1.1: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -7273,6 +7653,16 @@ isomorphic-ws@^4.0.1: resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== +isows@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.3.tgz#93c1cf0575daf56e7120bab5c8c448b0809d0d74" + integrity sha512-2cKei4vlmg2cxEjm3wVSqn8pcoRF/LX/wpifuuNquFO4SQmPwarClT+SUCA2lt+l581tTeZIPIZuIDo2jWN1fg== + +isows@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.4.tgz#810cd0d90cc4995c26395d2aa4cfa4037ebdf061" + integrity sha512-hEzjY+x9u9hPmBom9IIAqdJCwNLax+xrPb51vEPpERoFlIxgmZcHzsT5jKG06nvInKOBGvReAVz80Umed5CczQ== + jackspeak@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" @@ -7507,6 +7897,15 @@ keccak@^3.0.1: node-gyp-build "^4.2.0" readable-stream "^3.6.0" +keccak@^3.0.3: + version "3.0.4" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.4.tgz#edc09b89e633c0549da444432ecf062ffadee86d" + integrity sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + readable-stream "^3.6.0" + keyvaluestorage-interface@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/keyvaluestorage-interface/-/keyvaluestorage-interface-1.0.0.tgz#13ebdf71f5284ad54be94bd1ad9ed79adad515ff" @@ -7679,12 +8078,7 @@ log-update@^5.0.1: strip-ansi "^7.0.1" wrap-ansi "^8.0.1" -long@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" - integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== - -loose-envify@^1.1.0, loose-envify@^1.4.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -7758,6 +8152,11 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +micro-ftch@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/micro-ftch/-/micro-ftch-0.3.1.tgz#6cb83388de4c1f279a034fb0cf96dfc050853c5f" + integrity sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg== + micromatch@4.0.5, micromatch@^4.0.4, micromatch@^4.0.5: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" @@ -7859,6 +8258,18 @@ minipass@^4.2.4: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.2.tgz#58a82b7d81c7010da5bd4b2c0c85ac4b4ec5131e" integrity sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA== +mipd@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/mipd/-/mipd-0.0.5.tgz#367ee796531c23f0631f129038700b1406663aec" + integrity sha512-gbKA784D2WKb5H/GtqEv+Ofd1S9Zj+Z/PGDIl1u1QAbswkxD28BQ5bSXQxkeBzPBABg1iDSbiwGG1XqlOxRspA== + dependencies: + viem "^1.1.4" + +mipd@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mipd/-/mipd-0.0.7.tgz#bb5559e21fa18dc3d9fe1c08902ef14b7ce32fd9" + integrity sha512-aAPZPNDQ3uMTdKbuO2YmAw2TxLHO0moa4YKAyETM/DTj5FloZo+a+8tU+iv4GmW+sOxKLSRwcSFuczk+Cpt6fg== + mkdirp@^0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" @@ -7967,6 +8378,11 @@ node-addon-api@^2.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== +node-addon-api@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.1.0.tgz#49da1ca055e109a23d537e9de43c09cca21eb762" + integrity sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA== + node-addon-api@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.0.tgz#71f609369379c08e251c558527a107107b5e0fdb" @@ -8040,6 +8456,15 @@ nwsapi@^2.2.4: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.7.tgz#738e0707d3128cb750dddcfe90e4610482df0f30" integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ== +obj-multiplex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/obj-multiplex/-/obj-multiplex-1.0.0.tgz#2f2ae6bfd4ae11befe742ea9ea5b36636eabffc1" + integrity sha512-0GNJAOsHoBHeNTvl5Vt6IWnpUEcc3uSRxzBri7EDyIcMgYvnY2JL2qdeV5zTMjWQX5OHcD5amcW2HFfDh0gjIA== + dependencies: + end-of-stream "^1.4.0" + once "^1.4.0" + readable-stream "^2.3.3" + object-assign@^4.0.1, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -8142,7 +8567,7 @@ on-exit-leak-free@^0.2.0: resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz#b39c9e3bf7690d890f4861558b0d7b90a442d209" integrity sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg== -once@^1.3.0, once@^1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== @@ -8171,6 +8596,15 @@ open@^7.3.1: is-docker "^2.0.0" is-wsl "^2.1.1" +open@^8.4.0: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + optionator@^0.9.3: version "0.9.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" @@ -8436,6 +8870,11 @@ pngjs@^5.0.0: resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb" integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw== +pony-cause@^2.1.10: + version "2.1.11" + resolved "https://registry.yarnpkg.com/pony-cause/-/pony-cause-2.1.11.tgz#d69a20aaccdb3bdb8f74dd59e5c68d8e6772e4bd" + integrity sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg== + popmotion@11.0.5: version "11.0.5" resolved "https://registry.yarnpkg.com/popmotion/-/popmotion-11.0.5.tgz#8e3e014421a0ffa30ecd722564fd2558954e1f7d" @@ -8508,6 +8947,11 @@ postcss@^8.4.27, postcss@^8.4.31, postcss@^8.4.32: picocolors "^1.0.0" source-map-js "^1.0.2" +preact@^10.16.0: + version "10.22.0" + resolved "https://registry.yarnpkg.com/preact/-/preact-10.22.0.tgz#a50f38006ae438d255e2631cbdaf7488e6dd4e16" + integrity sha512-RRurnSjJPj4rp5K6XoP45Ui33ncb7e4H7WiOHVpjbkvqvA3U+N8Z6Qbo0AE6leGYBV66n8EhEaFixvIu3SkxFw== + preact@^10.5.9: version "10.16.0" resolved "https://registry.yarnpkg.com/preact/-/preact-10.16.0.tgz#68a06d70b191b8a313ea722d61e09c6b2a79a37e" @@ -8573,6 +9017,11 @@ process-warning@^1.0.0: resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-1.0.0.tgz#980a0b25dc38cd6034181be4b7726d89066b4616" integrity sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q== +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -8614,11 +9063,36 @@ public-encrypt@^4.0.0: randombytes "^2.0.1" safe-buffer "^5.1.2" +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== +qr-code-styling@^1.6.0-rc.1: + version "1.6.0-rc.1" + resolved "https://registry.yarnpkg.com/qr-code-styling/-/qr-code-styling-1.6.0-rc.1.tgz#6c89e185fa50cc9135101085c12ae95b06f1b290" + integrity sha512-ModRIiW6oUnsP18QzrRYZSc/CFKFKIdj7pUs57AEVH20ajlglRpN3HukjHk0UbNMTlKGuaYl7Gt6/O5Gg2NU2Q== + dependencies: + qrcode-generator "^1.4.3" + +qrcode-generator@^1.4.3: + version "1.4.4" + resolved "https://registry.yarnpkg.com/qrcode-generator/-/qrcode-generator-1.4.4.tgz#63f771224854759329a99048806a53ed278740e7" + integrity sha512-HM7yY8O2ilqhmULxGMpcHSF1EhJJ9yBj8gvDEuZ6M+KGJ0YY2hKpnXvRD+hZPLrDVck3ExIGhmPtSdcjC+guuw== + +qrcode-terminal-nooctal@^0.12.1: + version "0.12.1" + resolved "https://registry.yarnpkg.com/qrcode-terminal-nooctal/-/qrcode-terminal-nooctal-0.12.1.tgz#45016aca0d82b2818de7af0a06d072ad671fbe2e" + integrity sha512-jy/kkD0iIMDjTucB+5T6KBsnirlhegDH47vHgrj5MejchSQmi/EAMM0xMFeePgV9CJkkAapNakpVUWYgHvtdKg== + qrcode@1.5.3: version "1.5.3" resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.5.3.tgz#03afa80912c0dccf12bc93f615a535aad1066170" @@ -8709,6 +9183,14 @@ react-is@^18.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== +react-native-webview@^11.26.0: + version "11.26.1" + resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.26.1.tgz#658c09ed5162dc170b361e48c2dd26c9712879da" + integrity sha512-hC7BkxOpf+z0UKhxFSFTPAM4shQzYmZHoELa6/8a/MspcjEP7ukYKpuSUTLDywQditT8yI9idfcKvfZDKQExGw== + dependencies: + escape-string-regexp "2.0.0" + invariant "2.2.4" + react-refresh@^0.14.0: version "0.14.0" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e" @@ -8728,7 +9210,7 @@ read-cache@^1.0.0: dependencies: pify "^2.3.0" -readable-stream@^2.3.8: +readable-stream@^2.3.3, readable-stream@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== @@ -8741,7 +9223,7 @@ readable-stream@^2.3.8: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.1.1, readable-stream@^3.5.0, readable-stream@^3.6.0: +readable-stream@^3.1.1, readable-stream@^3.5.0, readable-stream@^3.6.0, readable-stream@^3.6.2: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -8750,6 +9232,17 @@ readable-stream@^3.1.1, readable-stream@^3.5.0, readable-stream@^3.6.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" +"readable-stream@^3.6.2 || ^4.4.2": + version "4.5.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" + integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== + dependencies: + abort-controller "^3.0.0" + buffer "^6.0.3" + events "^3.3.0" + process "^0.11.10" + string_decoder "^1.3.0" + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -8929,6 +9422,16 @@ robust-predicates@^3.0.0: resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.2.tgz#d5b28528c4824d20fc48df1928d41d9efa1ad771" integrity sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg== +rollup-plugin-visualizer@^5.9.2: + version "5.12.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.12.0.tgz#661542191ce78ee4f378995297260d0c1efb1302" + integrity sha512-8/NU9jXcHRs7Nnj07PF2o4gjxmm9lXIrZ8r175bT9dK8qoLlvKTwRMArRCMgpMGlq8CTLugRvEmyMeMXIU2pNQ== + dependencies: + open "^8.4.0" + picomatch "^2.3.1" + source-map "^0.7.4" + yargs "^17.5.1" + rollup@^3.27.1: version "3.28.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.28.1.tgz#fb44aa6d5e65c7e13fd5bcfff266d0c4ea9ba433" @@ -9058,6 +9561,15 @@ scrypt-js@3.0.1: resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== +secp256k1@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-5.0.0.tgz#be6f0c8c7722e2481e9773336d351de8cddd12f7" + integrity sha512-TKWX8xvoGHrxVdqbYeZM9w+izTF4b9z3NhSaDkdn81btvuh+ivbIMGT/zQvDtTFWhRlThpoz6LEYTr7n8A5GcA== + dependencies: + elliptic "^6.5.4" + node-addon-api "^5.0.0" + node-gyp-build "^4.2.0" + semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" @@ -9070,6 +9582,11 @@ semver@^7.3.7, semver@^7.3.8: dependencies: lru-cache "^6.0.0" +semver@^7.5.4: + version "7.6.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -9132,6 +9649,24 @@ slice-ansi@^5.0.0: ansi-styles "^6.0.0" is-fullwidth-code-point "^4.0.0" +socket.io-client@^4.5.1: + version "4.7.5" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.7.5.tgz#919be76916989758bdc20eec63f7ee0ae45c05b7" + integrity sha512-sJ/tqHOCe7Z50JCBCXrsY3I2k03iOiUe+tj1OmKeD2lXPiGH/RUCdTZFoqVyN7l1MnpIzPrGtLcijffmeouNlQ== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.2" + engine.io-client "~6.5.2" + socket.io-parser "~4.2.4" + +socket.io-parser@~4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" + integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + sonic-boom@^2.2.1: version "2.8.0" resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-2.8.0.tgz#c1def62a77425090e6ad7516aad8eb402e047611" @@ -9244,7 +9779,7 @@ string-natural-compare@^3.0.1: resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0: +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -9303,7 +9838,7 @@ string.prototype.trimstart@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" -string_decoder@^1.1.1: +string_decoder@^1.1.1, string_decoder@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -9919,6 +10454,13 @@ utf-8-validate@^5.0.2: dependencies: node-gyp-build "^4.3.0" +utf-8-validate@^6.0.3: + version "6.0.4" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-6.0.4.tgz#1305a1bfd94cecb5a866e6fc74fd07f3ed7292e5" + integrity sha512-xu9GQDeFp+eZ6LnCywXN/zBancWvOpUMzgjLPSjy4BRHSmTelvn2E0DG0o1sTiw5hkCKBHo8rwSKncfRfv2EEQ== + dependencies: + node-gyp-build "^4.3.0" + util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -9940,6 +10482,11 @@ uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uuid@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== + valibot@^0.28.1: version "0.28.1" resolved "https://registry.yarnpkg.com/valibot/-/valibot-0.28.1.tgz#c64893bbdb60cd26fe1163756250f2b3434af35e" @@ -9953,6 +10500,20 @@ valtio@1.11.2: proxy-compare "2.5.1" use-sync-external-store "1.2.0" +viem@2.x: + version "2.13.3" + resolved "https://registry.yarnpkg.com/viem/-/viem-2.13.3.tgz#950426e4cacf5e12fab2c202a339371901712481" + integrity sha512-3tlwDRKHSelupFjbFMdUxF41f79ktyH2F9PAQ9Dltbs1DpdDlR1x+Ksa0th6qkyjjAbpDZP3F5nMTJv/1GVPdQ== + dependencies: + "@adraffy/ens-normalize" "1.10.0" + "@noble/curves" "1.2.0" + "@noble/hashes" "1.3.2" + "@scure/bip32" "1.3.2" + "@scure/bip39" "1.2.1" + abitype "1.0.0" + isows "1.0.4" + ws "8.13.0" + viem@^1.0.0: version "1.5.3" resolved "https://registry.yarnpkg.com/viem/-/viem-1.5.3.tgz#076a95e0c11d03b6cfa8abb1bd19b48a2c02e056" @@ -9969,6 +10530,20 @@ viem@^1.0.0: isomorphic-ws "5.0.0" ws "8.12.0" +viem@^1.1.4: + version "1.21.4" + resolved "https://registry.yarnpkg.com/viem/-/viem-1.21.4.tgz#883760e9222540a5a7e0339809202b45fe6a842d" + integrity sha512-BNVYdSaUjeS2zKQgPs+49e5JKocfo60Ib2yiXOWBT6LuVxY1I/6fFX3waEtpXvL1Xn4qu+BVitVtMh9lyThyhQ== + dependencies: + "@adraffy/ens-normalize" "1.10.0" + "@noble/curves" "1.2.0" + "@noble/hashes" "1.3.2" + "@scure/bip32" "1.3.2" + "@scure/bip39" "1.2.1" + abitype "0.9.8" + isows "1.0.3" + ws "8.13.0" + vite-node@0.29.8: version "0.29.8" resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.29.8.tgz#6a1c9d4fb31e7b4e0f825d3a37abe3404e52bd8e" @@ -10064,11 +10639,30 @@ w3c-xmlserializer@^4.0.0: dependencies: xml-name-validator "^4.0.0" +wagmi@2.9.8: + version "2.9.8" + resolved "https://registry.yarnpkg.com/wagmi/-/wagmi-2.9.8.tgz#9a4bb06d0b073a1297d08291119f1f00f0113e54" + integrity sha512-uSfYKB0JWtajz8YSntMBO4QQolx1fPPckwAVrRl9X66zQb0FLqgZeXrnf+PjFnmNbNsSyO3neOD/3TQqNL6m4Q== + dependencies: + "@wagmi/connectors" "5.0.7" + "@wagmi/core" "2.10.5" + use-sync-external-store "1.2.0" + web-vitals@^2.1.0: version "2.1.4" resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-2.1.4.tgz#76563175a475a5e835264d373704f9dde718290c" integrity sha512-sVWcwhU5mX6crfI5Vd2dC4qchyTqxV8URinzt25XqVh+bHEPGH4C3NPrNionCP7Obx59wrYEbNlw4Z8sjALzZg== +"webextension-polyfill@>=0.10.0 <1.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.12.0.tgz#f62c57d2cd42524e9fbdcee494c034cae34a3d69" + integrity sha512-97TBmpoWJEE+3nFBQ4VocyCdLKfw54rFaJ6EVQYLBCXqCIpLSZkwGgASpv4oPt9gdKCJ80RJlcmNzNn008Ag6Q== + +webextension-polyfill@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz#ccb28101c910ba8cf955f7e6a263e662d744dbb8" + integrity sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g== + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -10219,15 +10813,20 @@ ws@8.12.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.12.0.tgz#485074cc392689da78e1828a9ff23585e06cddd8" integrity sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig== +ws@8.13.0, ws@^8.13.0, ws@^8.5.0: + version "8.13.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" + integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== + ws@^7.4.5, ws@^7.5.1: version "7.5.9" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== -ws@^8.13.0, ws@^8.5.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" - integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== +ws@~8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== xml-name-validator@^4.0.0: version "4.0.0" @@ -10239,6 +10838,11 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== +xmlhttprequest-ssl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" + integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== + xtend@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" @@ -10292,6 +10896,11 @@ yargs-parser@^20.2.2: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + yargs@^15.3.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" @@ -10322,6 +10931,19 @@ yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yargs@^17.5.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" @@ -10332,9 +10954,9 @@ yocto-queue@^1.0.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g== -zustand@4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.4.0.tgz#13b3e8ca959dd53d536034440aec382ff91b65c3" - integrity sha512-2dq6wq4dSxbiPTamGar0NlIG/av0wpyWZJGeQYtUOLegIUvhM2Bf86ekPlmgpUtS5uR7HyetSiktYrGsdsyZgQ== +zustand@4.4.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.4.1.tgz#0cd3a3e4756f21811bd956418fdc686877e8b3b0" + integrity sha512-QCPfstAS4EBiTQzlaGP1gmorkh/UL1Leaj2tdj+zZCZ/9bm0WS7sI2wnfD5lpOszFqWJ1DcPnGoY8RDL61uokw== dependencies: use-sync-external-store "1.2.0" From 61c9f69c2f6e5c3bacf20498208d647ab99ab861 Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Thu, 6 Jun 2024 12:31:08 +0100 Subject: [PATCH 18/77] Improve useWagmi connector use - Sort connectors by name order in config - Switch network with useCallback --- src/config/ethereum/common.ts | 2 +- src/config/sei/common.ts | 6 +-- src/libs/wagmi/connectors.ts | 81 ++++++++++++++++++++++++++---- src/libs/wagmi/useWagmiNetwork.tsx | 22 ++++++-- src/libs/wagmi/web3.constants.ts | 8 +-- 5 files changed, 99 insertions(+), 20 deletions(-) diff --git a/src/config/ethereum/common.ts b/src/config/ethereum/common.ts index b47ade49c..47d4441d5 100644 --- a/src/config/ethereum/common.ts +++ b/src/config/ethereum/common.ts @@ -25,7 +25,7 @@ export const commonConfig: AppConfig = { mode: 'development', appUrl: 'https://app.carbondefi.xyz', carbonApi: 'https://api.carbondefi.xyz/v1/', - selectedConnections: ['MetaMask', 'WalletConnect', 'Coinbase Wallet', 'safe'], + selectedConnections: ['MetaMask', 'WalletConnect', 'Coinbase Wallet', 'Safe'], walletConnectProjectId: 'f9d8863ab6c03f2293d7d56d7c0c0853', isSimulatorEnabled: true, policiesLastUpdated: '18 April, 2023', diff --git a/src/config/sei/common.ts b/src/config/sei/common.ts index 7b254d47b..c165048ec 100644 --- a/src/config/sei/common.ts +++ b/src/config/sei/common.ts @@ -16,10 +16,10 @@ export const commonConfig: AppConfig = { 'MetaMask', 'Coinbase Wallet', 'WalletConnect', - 'safe', + 'Safe', 'Compass Wallet', - // 'Tailwind Wallet', - // 'Seif Wallet', + 'Seif', + // 'Tailwind', ], walletConnectProjectId: '', isSimulatorEnabled: false, diff --git a/src/libs/wagmi/connectors.ts b/src/libs/wagmi/connectors.ts index fbed296fb..cdeb7995c 100644 --- a/src/libs/wagmi/connectors.ts +++ b/src/libs/wagmi/connectors.ts @@ -1,9 +1,11 @@ import carbonLogo from 'assets/logos/carbon.svg'; +import tailwindWalletLogo from 'assets/logos/tailwindWallet.svg'; +import compassWalletLogo from 'assets/logos/compassWallet.svg'; +import seifWalletLogo from 'assets/logos/seifWallet.svg'; import { createStore } from 'mipd'; -import { CreateConnectorFn } from 'wagmi'; +import { CreateConnectorFn, createConnector } from 'wagmi'; import { - injected, metaMask, coinbaseWallet, walletConnect, @@ -14,14 +16,75 @@ import { SelectableConnectionType, selectedConnections, } from './web3.constants'; +import { Address } from 'viem'; + +const createConnectorURL = ({ + id, + name, + type, + icon, + url, +}: { + id: string; + name: string; + type: string; + icon?: string; + url: string; +}) => { + return createConnector(() => { + return { + id: id, + name: name, + type: type, + icon: icon, + async setup() {}, + async connect() { + window.open(url, '__blank'); + return { accounts: [] as Address[], chainId: config.network.chainId }; + }, + async disconnect() {}, + async getAccounts() { + return []; + }, + async getChainId() { + return config.network.chainId; + }, + async isAuthorized() { + return true; + }, + onAccountsChanged() {}, + onChainChanged() {}, + async onDisconnect(_error) {}, + async getProvider() {}, + }; + }); +}; const getDefaultConnector = (connectorType: SelectableConnectionType) => { switch (connectorType) { case 'Compass Wallet': - case 'Tailwind Wallet': - case 'Seif Wallet': - return injected({ - shimDisconnect: false, + return createConnectorURL({ + name: 'Compass Wallet', + id: 'compass', + type: 'url', + icon: compassWalletLogo, + url: 'https://compasswallet.io/', + }); + case 'Tailwind': + return createConnectorURL({ + name: 'TAILWIND', + id: 'tailwind', + icon: tailwindWalletLogo, + type: 'url', + url: 'https://www.tailwind.zone/', + }); + case 'Seif': + return createConnectorURL({ + name: 'Seif', + id: 'seif', + icon: seifWalletLogo, + type: 'url', + url: 'https://seif.passkeywallet.com/', }); case 'MetaMask': return metaMask({ @@ -44,7 +107,7 @@ const getDefaultConnector = (connectorType: SelectableConnectionType) => { themeMode: 'dark', }, }); - case 'safe': + case 'Safe': return safe({ shimDisconnect: false }); } }; @@ -53,9 +116,9 @@ const getConfigConnectors = (): CreateConnectorFn[] => { const store = createStore(); const injectedProviderNames = store .getProviders() - .map((provider) => provider.info.name); + .map((provider) => provider.info.name.toLowerCase()); const missingConnectors = selectedConnections.filter( - (connection) => !injectedProviderNames.includes(connection) + (connection) => !injectedProviderNames.includes(connection.toLowerCase()) ); store.destroy(); return missingConnectors.map(getDefaultConnector); diff --git a/src/libs/wagmi/useWagmiNetwork.tsx b/src/libs/wagmi/useWagmiNetwork.tsx index 518274909..96d174559 100644 --- a/src/libs/wagmi/useWagmiNetwork.tsx +++ b/src/libs/wagmi/useWagmiNetwork.tsx @@ -6,6 +6,7 @@ import { StaticJsonRpcProvider } from '@ethersproject/providers'; import { getConnectors } from '@wagmi/core'; import { RPC_URLS, RPC_HEADERS, SupportedChainId } from 'libs/wagmi'; import { useCallback, useEffect, useMemo, useState } from 'react'; +import config from 'config'; export const useWagmiNetwork = () => { const { switchChain } = useSwitchChain(); @@ -17,8 +18,6 @@ export const useWagmiNetwork = () => { const [networkError, setNetworkError] = useState(); - const switchNetwork = () => switchChain({ chainId }); - const networkProvider = useMemo(() => { return new StaticJsonRpcProvider( { @@ -30,6 +29,11 @@ export const useWagmiNetwork = () => { ); }, [chainId]); + const switchNetwork = useCallback( + () => switchChain({ chainId }), + [chainId, switchChain] + ); + const activateNetwork = useCallback(async () => { if (networkError || isNetworkActive) { return; @@ -49,7 +53,19 @@ export const useWagmiNetwork = () => { void activateNetwork(); }, [activateNetwork]); - const connectors = getConnectors(wagmiConfig); + const unsortedConnectors = getConnectors(wagmiConfig); + const connectors = useMemo(() => { + const connectionOrder = (config.selectedConnections as string[]).map((c) => + c.toLowerCase() + ); + return unsortedConnectors.toSorted((a, b) => { + const nameA = a.name.toLowerCase(); + const nameB = b.name.toLowerCase(); + if (!connectionOrder.includes(nameA) || !connectionOrder.includes(nameB)) + return 0; + return connectionOrder.indexOf(nameA) - connectionOrder.indexOf(nameB); + }); + }, [unsortedConnectors]); return { provider, diff --git a/src/libs/wagmi/web3.constants.ts b/src/libs/wagmi/web3.constants.ts index 65b1764d6..49e8af40d 100644 --- a/src/libs/wagmi/web3.constants.ts +++ b/src/libs/wagmi/web3.constants.ts @@ -17,10 +17,10 @@ export type SelectableConnectionType = | 'MetaMask' | 'WalletConnect' | 'Coinbase Wallet' - | 'safe' - | 'Tailwind Wallet' + | 'Safe' + | 'Tailwind' | 'Compass Wallet' - | 'Seif Wallet'; + | 'Seif'; // [START] Used for localstorage migration: Remove it after Nov 2023 export enum EnumConnectionType { @@ -36,7 +36,7 @@ const connectionTypeMapping: Record< [EnumConnectionType.METAMASK]: 'MetaMask', [EnumConnectionType.COINBASE_WALLET]: 'Coinbase Wallet', [EnumConnectionType.WALLET_CONNECT]: 'WalletConnect', - [EnumConnectionType.GNOSIS_SAFE]: 'safe', + [EnumConnectionType.GNOSIS_SAFE]: 'Safe', }; const isEnumConnectionType = ( type: SelectableConnectionType | EnumConnectionType From f0f55e5524132b2fcc75e4101e98b09267b7bf81 Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Thu, 6 Jun 2024 17:23:02 +0100 Subject: [PATCH 19/77] Fix GTM events for manual/auto connect/disconnect and swap wallet --- .../menu/mainMenu/MainMenuRightWallet.tsx | 28 +------- .../modals/modals/WalletModal/ModalWallet.tsx | 20 +----- src/libs/wagmi/connectors.ts | 6 +- src/libs/wagmi/index.ts | 5 +- src/libs/wagmi/useWagmiUser.ts | 69 ++++++++++++++++--- src/libs/wagmi/web3.constants.ts | 31 +-------- src/libs/wagmi/web3.types.ts | 9 +++ src/store/StoreProvider.tsx | 5 -- 8 files changed, 78 insertions(+), 95 deletions(-) diff --git a/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx b/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx index e50cf3e07..1e3cdc1cc 100644 --- a/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx +++ b/src/components/core/menu/mainMenu/MainMenuRightWallet.tsx @@ -7,7 +7,7 @@ import { buttonStyles } from 'components/common/button/buttonStyles'; import { DropdownMenu, useMenuCtx } from 'components/common/dropdownMenu'; import { useModal } from 'hooks/useModal'; import { useWagmi } from 'libs/wagmi'; -import { FC, useMemo, useEffect } from 'react'; +import { FC, useMemo } from 'react'; import { carbonEvents } from 'services/events'; import { useStore } from 'store'; import { cn, shortenString } from 'utils/helpers'; @@ -25,7 +25,6 @@ export const MainMenuRightWallet: FC = () => { isUserBlocked, currentConnector, } = useWagmi(); - const { isManualConnection } = useStore(); const { openModal } = useModal(); const selectedWallet = currentConnector?.name; @@ -35,21 +34,6 @@ export const MainMenuRightWallet: FC = () => { }; const { data: ensName } = useGetEnsFromAddress(user || ''); - const userConnected = !!user && selectedWallet != null; - - useEffect(() => { - if (userConnected) { - if (!isManualConnection.current) { - carbonEvents.wallet.walletConnected({ - address: user, - name: selectedWallet || '', - }); - } else { - isManualConnection.current = false; // Expect an auto wallet connection next - } - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [user, selectedWallet]); const buttonVariant = useMemo(() => { if (isUserBlocked) return 'error'; @@ -129,14 +113,6 @@ const ConnectedMenu: FC = () => { const { toaster } = useStore(); const { setMenuOpen } = useMenuCtx(); const { user, disconnect, isSupportedNetwork, switchNetwork } = useWagmi(); - - const onDisconnect = async () => { - await disconnect(); - carbonEvents.wallet.walletDisconnect({ - address: user, - }); - }; - const copyAddress = async () => { if (!user) return; await navigator.clipboard.writeText(user); @@ -177,7 +153,7 @@ const ConnectedMenu: FC = () => {
- {isLoading ? ( + {isPending ? (
diff --git a/src/components/trade/depthChartWidget/useDepthChartWidget.ts b/src/components/trade/depthChartWidget/useDepthChartWidget.ts index 07fa54176..019886e2e 100644 --- a/src/components/trade/depthChartWidget/useDepthChartWidget.ts +++ b/src/components/trade/depthChartWidget/useDepthChartWidget.ts @@ -12,7 +12,7 @@ export const useDepthChartWidget = (base?: Token, quote?: Token) => { settings: { steps, depthChartBuckets }, }, } = useStore(); - const { data, isLoading } = useGetOrderBook( + const { data, isPending } = useGetOrderBook( steps, base?.address, quote?.address @@ -212,6 +212,6 @@ export const useDepthChartWidget = (base?: Token, quote?: Token) => { buyOrders: getOrders(data?.buy, true), sellOrders: getOrders(data?.sell), getOptions, - isLoading, + isPending, }; }; diff --git a/src/components/trade/orderWidget/OrderBookSide.tsx b/src/components/trade/orderWidget/OrderBookSide.tsx index 3f39f1ef1..5592a5f01 100644 --- a/src/components/trade/orderWidget/OrderBookSide.tsx +++ b/src/components/trade/orderWidget/OrderBookSide.tsx @@ -12,7 +12,7 @@ type OrderBookSideProps = { buy?: boolean; base: Token; quote: Token; - isLoading: boolean; + isPending: boolean; }; export const OrderBookSide: FC = ({ @@ -20,11 +20,11 @@ export const OrderBookSide: FC = ({ buy, base, quote, - isLoading, + isPending, }) => { return ( - {isLoading ? ( + {isPending ? ( { const { data: { buy, sell, middleRate, middleRateFiat }, - isLoading, + isPending, isLastTradeLoading, isLastTradeBuy, } = useOrderBookWidget(base.address, quote.address); @@ -25,7 +25,7 @@ export const OrderBookWidget = ({ base, quote }: TradePageProps) => { />
{ isLoading={isLastTradeLoading} /> { ...orderBookQuery, data: orders, isLastTradeBuy: lastTradeBuyQuery.data, - isLastTradeLoading: lastTradeBuyQuery.isLoading, + isLastTradeLoading: lastTradeBuyQuery.isPending, }; }; diff --git a/src/components/trade/tradeWidget/TradeWidgetBuySell.tsx b/src/components/trade/tradeWidget/TradeWidgetBuySell.tsx index b433c2be1..d5fd725f4 100644 --- a/src/components/trade/tradeWidget/TradeWidgetBuySell.tsx +++ b/src/components/trade/tradeWidget/TradeWidgetBuySell.tsx @@ -75,7 +75,7 @@ export const TradeWidgetBuySell = (props: TradeWidgetBuySellProps) => { }); !hasEnoughLiquidity && - !liquidityQuery.isLoading && + !liquidityQuery.isPending && carbonEvents.trade.tradeErrorShow({ buy, buyToken: target, @@ -87,7 +87,7 @@ export const TradeWidgetBuySell = (props: TradeWidgetBuySellProps) => { errorMsgSource, errorMsgTarget, getFiatValueSource, - liquidityQuery.isLoading, + liquidityQuery.isPending, ]); useInitEffect(() => { @@ -173,7 +173,7 @@ export const TradeWidgetBuySell = (props: TradeWidgetBuySellProps) => { !maxSourceAmountQuery.data; const getLiquidity = () => { - const value = liquidityQuery.isLoading + const value = liquidityQuery.isPending ? 'loading' : prettifyNumber(liquidityQuery.data); return `Liquidity: ${value} ${target.symbol}`; @@ -190,7 +190,7 @@ export const TradeWidgetBuySell = (props: TradeWidgetBuySellProps) => { ? `Buy ${target.symbol} with ${source.symbol}` : `Sell ${source.symbol} for ${target.symbol}`} - {hasEnoughLiquidity || liquidityQuery.isLoading ? ( + {hasEnoughLiquidity || liquidityQuery.isPending ? ( <>