diff --git a/package.json b/package.json index 2c1bde94c..4090ae292 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@swapr/frontend", - "version": "1.0.0-beta.21", + "version": "1.0.0-beta.21.1", "private": true, "description": "DXswap Decentralized Application", "license": "GPL-3.0-or-later", @@ -36,6 +36,7 @@ "dependencies": { "@apollo/client": "^3.7.5", "@arbitrum/sdk": "3.0.0-beta.12", + "@coinbase/wallet-sdk": "3.7.1", "@lifi/sdk": "1.7.2", "@lifi/types": "2.1.1", "@popperjs/core": "^2.11.6", @@ -50,11 +51,11 @@ "@tanstack/react-query": "4.24.6", "@uniswap/token-lists": "^1.0.0-beta.27", "@uniswap/v3-periphery": "1.4.1", - "@web3-react/core": "^6.1.9", - "@web3-react/injected-connector": "^6.0.7", - "@web3-react/network-connector": "^6.2.9", - "@web3-react/walletconnect-connector": "^6.2.13", - "@web3-react/walletlink-connector": "^6.2.14", + "@web3-react/coinbase-wallet": "8.2.2", + "@web3-react/core": "8.2.2", + "@web3-react/metamask": "8.2.3", + "@web3-react/network": "8.2.2", + "@web3-react/walletconnect-v2": "8.5.0", "ajv": "^8.12.0", "ajv-formats": "^2.1.1", "aos": "^2.3.4", @@ -115,7 +116,7 @@ "@graphql-codegen/typescript": "3.0.3", "@graphql-codegen/typescript-operations": "^3.0.3", "@graphql-codegen/typescript-react-apollo": "^3.3.7", - "@openapitools/openapi-generator-cli": "^2.5.1", + "@openapitools/openapi-generator-cli": "^2.7.0", "@react-theming/storybook-addon": "1.1.10", "@simbathesailor/use-what-changed": "^2.0.0", "@storybook/addon-actions": "7.0.22", diff --git a/src/analytics/trackers/index.ts b/src/analytics/trackers/index.ts index 775773996..ceccf033e 100644 --- a/src/analytics/trackers/index.ts +++ b/src/analytics/trackers/index.ts @@ -30,7 +30,6 @@ export async function trackEcoRouterTradeVolume( debug('tracking EcoRouter trade USD volume', { trade, chartOption, site }) // Get use value for input amount const tradeUSDValue = await getTradeUSDValue(trade) - //const data = await queryClient.fetchQuery({ queryKey, queryFn }) if (tradeUSDValue === null) { throw new Error('Could not get trade USD value', { @@ -73,7 +72,7 @@ export async function trackEcoBridgeTradeVolume(trade: BridgeTransactionSummary, if (rawTokenPriceInfo === null) { throw new Error('Could not get token price') } - console.log(Object.values(rawTokenPriceInfo)) + const tokenUSDPrice = Object.values(rawTokenPriceInfo)[0].usd const usdValue = (tokenUSDPrice * parseFloat(trade.fromValue)).toFixed(2) const tradeUSDValueInCents = (parseFloat(parseFloat(usdValue).toFixed(2)) * 100).toString() // convert to cents because fathom requires it diff --git a/src/components/Claim/ActionButton/index.tsx b/src/components/Claim/ActionButton/index.tsx index b956d62a0..04431ddb0 100644 --- a/src/components/Claim/ActionButton/index.tsx +++ b/src/components/Claim/ActionButton/index.tsx @@ -1,6 +1,6 @@ import { CurrencyAmount } from '@swapr/sdk' -import { InjectedConnector } from '@web3-react/injected-connector' +import { MetaMask } from '@web3-react/metamask' import { useCallback, useEffect, useState } from 'react' import styled from 'styled-components' @@ -63,7 +63,7 @@ export function ActionButton({ const handleLocalClick = useCallback(() => { if (!account) onConnectWallet() - else if (!correctNetwork && connector instanceof InjectedConnector) onSwitchToArbitrum() + else if (!correctNetwork && connector instanceof MetaMask) onSwitchToArbitrum() else if (isOldSwaprLp) { const anchor = document.createElement('a') Object.assign(anchor, { diff --git a/src/components/NetworkSwitcherPopover/index.tsx b/src/components/NetworkSwitcherPopover/index.tsx index 6dd666887..4a33362bf 100644 --- a/src/components/NetworkSwitcherPopover/index.tsx +++ b/src/components/NetworkSwitcherPopover/index.tsx @@ -19,7 +19,7 @@ interface NetworkSwitcherPopoverProps { export default function NetworkSwitcherPopover({ children, modal, placement }: NetworkSwitcherPopoverProps) { const closeModals = useCloseModals() - const { connector, chainId: activeChainId } = useActiveWeb3React() + const { chainId: activeChainId } = useActiveWeb3React() const networkSwitcherPopoverOpen = useModalOpen(modal) const unsupportedChainIdError = useUnsupportedChainIdError() @@ -28,9 +28,7 @@ export default function NetworkSwitcherPopover({ children, modal, placement }: N }) const isNetworkDisabled = (chainId: ChainId) => { - return ( - connector?.supportedChainIds?.indexOf(chainId) === -1 || (!unsupportedChainIdError && activeChainId === chainId) - ) + return !unsupportedChainIdError && activeChainId === chainId } if (!activeChainId) { diff --git a/src/components/WalletModal/PendingView.tsx b/src/components/WalletModal/PendingView.tsx index a28d2cf30..115b0d77c 100644 --- a/src/components/WalletModal/PendingView.tsx +++ b/src/components/WalletModal/PendingView.tsx @@ -1,8 +1,8 @@ -import { AbstractConnector } from '@web3-react/abstract-connector' +import { Connector } from '@web3-react/types' import { Box, Flex } from 'rebass' import styled from 'styled-components' -import { injected } from '../../connectors' +import { metaMask } from '../../connectors' import { SUPPORTED_WALLETS } from '../../constants' import { TYPE } from '../../theme' import { ButtonPrimary } from '../Button' @@ -55,10 +55,10 @@ export default function PendingView({ setPendingError, tryActivation, }: { - connector?: AbstractConnector + connector?: Connector error?: boolean setPendingError: (error: boolean) => void - tryActivation: (connector: AbstractConnector) => void + tryActivation: (connector: Connector) => void }) { const isMetamask = window?.ethereum?.isMetaMask @@ -67,7 +67,7 @@ export default function PendingView({ {Object.keys(SUPPORTED_WALLETS).map(key => { const option = SUPPORTED_WALLETS[key] if (option.connector === connector) { - if (option.connector === injected) { + if (option.connector === metaMask) { if (isMetamask && option.name !== 'MetaMask') { return null } diff --git a/src/components/WalletModal/index.tsx b/src/components/WalletModal/index.tsx index 6f617a4e0..a9f35fe92 100644 --- a/src/components/WalletModal/index.tsx +++ b/src/components/WalletModal/index.tsx @@ -1,5 +1,5 @@ -import { AbstractConnector } from '@web3-react/abstract-connector' import { useWeb3React } from '@web3-react/core' +import { Connector } from '@web3-react/types' import { useCallback, useEffect } from 'react' import { AlertTriangle } from 'react-feather' import { usePrevious } from 'react-use' @@ -86,10 +86,10 @@ const HoverText = styled.div` interface WalletModalProps { modal: ModalView | null setModal: (modal: ModalView | null) => void - tryActivation: (connector: AbstractConnector | undefined) => void + tryActivation: (connector: Connector | undefined) => void pendingError: boolean | undefined setPendingError: (value: boolean) => void - pendingWallet: AbstractConnector | undefined + pendingWallet: Connector | undefined } export default function WalletModal({ @@ -100,7 +100,8 @@ export default function WalletModal({ setPendingError, pendingWallet, }: WalletModalProps) { - const { active, account, connector, error } = useWeb3React() + const { isActive, account, connector } = useWeb3React() + const isUnsupportedChainIdError = useUnsupportedChainIdError() const closeModal = useCallback(() => setModal(null), [setModal]) @@ -122,13 +123,16 @@ export default function WalletModal({ } }, [account, previousAccount, closeModal, isModalVisible]) - const activePrevious = usePrevious(active) + const activePrevious = usePrevious(isActive) const connectorPrevious = usePrevious(connector) useEffect(() => { - if (!!modal && ((active && !activePrevious) || (connector && connector !== connectorPrevious && !error))) { + if ( + !!modal && + ((isActive && !activePrevious) || (connector && connector !== connectorPrevious && !isUnsupportedChainIdError)) + ) { setModal(null) } - }, [setModal, active, error, connector, modal, activePrevious, connectorPrevious]) + }, [setModal, isActive, connector, modal, activePrevious, connectorPrevious, isUnsupportedChainIdError]) const toggleWalletSwitcherPopover = useWalletSwitcherPopoverToggle() const onBackButtonClick = () => { @@ -136,10 +140,9 @@ export default function WalletModal({ setModal(null) toggleWalletSwitcherPopover() } - const unsupportedChainIdError = useUnsupportedChainIdError() function getModalContent() { - if (error) { + if (isUnsupportedChainIdError) { return ( @@ -149,17 +152,13 @@ export default function WalletModal({ - {unsupportedChainIdError ? 'Wrong Network' : 'Error connecting'} + Wrong Network -
- {unsupportedChainIdError - ? 'Please connect to the appropriate network.' - : 'Error connecting. Try refreshing the page.'} -
+
Please connect to the appropriate network.
diff --git a/src/components/Web3ReactManager/index.tsx b/src/components/Web3ReactManager/index.tsx index 41fd0a23b..bfc93448c 100644 --- a/src/components/Web3ReactManager/index.tsx +++ b/src/components/Web3ReactManager/index.tsx @@ -1,11 +1,12 @@ +import { ChainId } from '@swapr/sdk' + import { useWeb3React } from '@web3-react/core' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' import { network } from '../../connectors' -import { NetworkContextName } from '../../constants' -import { useEagerConnect, useInactiveListener } from '../../hooks' +import { useEagerConnect, useInactiveListener, useUnsupportedChainIdError } from '../../hooks' import { useTargetedChainIdFromUrl } from '../../hooks/useTargetedChainIdFromUrl' import { Loader } from '../Loader' @@ -22,22 +23,34 @@ const Message = styled.h2` export default function Web3ReactManager({ children }: { children: JSX.Element }) { const { t } = useTranslation('common') - const { active } = useWeb3React() - const { active: networkActive, error: networkError, activate: activateNetwork } = useWeb3React(NetworkContextName) + const { isActive, connector, hooks, chainId } = useWeb3React() + const { useSelectedIsActive, usePriorityChainId } = hooks + const networkIsActive = useSelectedIsActive(network) + const ativeChainId = usePriorityChainId() const targetedChainId = useTargetedChainIdFromUrl() + const isUnsupportedChainIdError = useUnsupportedChainIdError() // try to eagerly connect to an injected provider, if it exists and has granted access already const triedEager = useEagerConnect() - // after eagerly trying injected, if the network connect ever isn't active or in an error state, activate itd + //after eagerly trying injected, if the network connect ever isn't active or in an error state, activate itd useEffect(() => { - if (triedEager && !networkActive && !networkError && !active) { - if (targetedChainId && network.supportedChainIds && network.supportedChainIds.indexOf(targetedChainId) >= 0) { - network.changeChainId(targetedChainId) + if (triedEager && !networkIsActive && !isActive && !isUnsupportedChainIdError) { + if (targetedChainId && Boolean(ChainId[targetedChainId])) { + network.activate(targetedChainId) } - activateNetwork(network) + network.activate() } - }, [triedEager, networkActive, networkError, activateNetwork, active, targetedChainId]) + }, [ + triedEager, + targetedChainId, + isActive, + isUnsupportedChainIdError, + connector, + networkIsActive, + chainId, + ativeChainId, + ]) // when there's no account connected, react to logins (broadly speaking) on the injected provider, if it exists useInactiveListener(!triedEager) @@ -60,7 +73,7 @@ export default function Web3ReactManager({ children }: { children: JSX.Element } } // if the account context isn't active, and there's an error on the network context, it's an irrecoverable error - if (!active && networkError) { + if (!isActive && isUnsupportedChainIdError) { return ( {t('unknownError')} @@ -69,7 +82,7 @@ export default function Web3ReactManager({ children }: { children: JSX.Element } } // if neither context is active, spin - if (!active && !networkActive) { + if (!isActive && !networkIsActive) { return showLoader ? ( diff --git a/src/components/Web3Status/AccountStatus.tsx b/src/components/Web3Status/AccountStatus.tsx index d5287d65e..965e65e19 100644 --- a/src/components/Web3Status/AccountStatus.tsx +++ b/src/components/Web3Status/AccountStatus.tsx @@ -1,7 +1,10 @@ import { ChainId } from '@swapr/sdk' -import { AbstractConnector } from '@web3-react/abstract-connector' -import { InjectedConnector } from '@web3-react/injected-connector' +import { CoinbaseWallet } from '@web3-react/coinbase-wallet' +import { MetaMask } from '@web3-react/metamask' +import { Network } from '@web3-react/network' +import { Connector } from '@web3-react/types' +import { WalletConnect } from '@web3-react/walletconnect-v2' import { useEffect, useState } from 'react' import { Text } from 'rebass' import styled from 'styled-components' @@ -13,8 +16,6 @@ import GnosisLogo from '../../assets/images/gnosis-chain-logo.svg' import OptimismLogo from '../../assets/images/optimism-logo.svg' import PolygonMaticLogo from '../../assets/images/polygon-matic-logo.svg' import ZkSyncEraLogo from '../../assets/images/zk-sync-era-logo.svg' -import { CustomNetworkConnector } from '../../connectors/CustomNetworkConnector' -import { CustomWalletLinkConnector } from '../../connectors/CustomWalletLinkConnector' import { ENSAvatarData } from '../../hooks/useENSAvatar' import { ApplicationModal } from '../../state/application/actions' import { useNetworkSwitcherPopoverToggle } from '../../state/application/hooks' @@ -143,7 +144,7 @@ interface AccountStatusProps { ENSName?: string avatar?: ENSAvatarData account: string | undefined | null - connector: AbstractConnector | undefined + connector: Connector | undefined networkConnectorChainId: ChainId | undefined onAddressClick: () => void } @@ -163,10 +164,10 @@ export function AccountStatus({ useEffect(() => { setNetworkSwitchingActive( - connector instanceof CustomNetworkConnector || - connector instanceof InjectedConnector || - connector instanceof CustomWalletLinkConnector || - connector instanceof AbstractConnector + connector instanceof Network || + connector instanceof MetaMask || + connector instanceof WalletConnect || + connector instanceof CoinbaseWallet ) }, [connector]) diff --git a/src/components/Web3Status/ConnectWalletPopover.tsx b/src/components/Web3Status/ConnectWalletPopover.tsx index d3e6c3d4a..5caf6a221 100644 --- a/src/components/Web3Status/ConnectWalletPopover.tsx +++ b/src/components/Web3Status/ConnectWalletPopover.tsx @@ -1,11 +1,11 @@ -import { AbstractConnector } from '@web3-react/abstract-connector' import { useWeb3React } from '@web3-react/core' +import { Connector } from '@web3-react/types' import { ReactNode, useRef } from 'react' import { isMobile } from 'react-device-detect' import styled from 'styled-components' import MetamaskIcon from '../../assets/images/metamask.png' -import { injected } from '../../connectors' +import { metaMask } from '../../connectors' import { SUPPORTED_WALLETS } from '../../constants' import { useOnClickOutside } from '../../hooks/useOnClickOutside' import { ApplicationModal } from '../../state/application/actions' @@ -98,12 +98,15 @@ const StyledPopover = styled(Popover)<{ isActive?: boolean }>` ` interface ConnectWalletProps { - tryActivation: (connector: AbstractConnector | undefined) => void + tryActivation: (connector: Connector | undefined) => void children: ReactNode } export const ConnectWalletPopover = ({ tryActivation, children }: ConnectWalletProps) => { - const { connector, active, deactivate } = useWeb3React() + const { connector, isActive, hooks } = useWeb3React() + const { useSelectedIsActive } = hooks + const selectedIsActive = useSelectedIsActive(connector) + const popoverRef = useRef(null) const walletSwitcherPopoverOpen = useModalOpen(ApplicationModal.WALLET_SWITCHER) const closeModals = useCloseModals() @@ -136,7 +139,7 @@ export const ConnectWalletPopover = ({ tryActivation, children }: ConnectWalletP } // overwrite injected when needed - if (option.connector === injected) { + if (option.connector === metaMask) { // don't show injected if there's no injected provider if (!(window.web3 || window.ethereum) || ((window.web3 || window.ethereum) && !isMetamask)) { if (option.name === 'MetaMask') { @@ -173,11 +176,11 @@ export const ConnectWalletPopover = ({ tryActivation, children }: ConnectWalletP id={`connect-${key}`} onClick={() => { closeModals() - option.connector !== connector && !option.href && tryActivation(option.connector) + if (!selectedIsActive || option.connector !== connector) tryActivation(option.connector) }} name={option.name} icon={option.iconName} - isActive={option.connector && option.connector === connector} + isActive={selectedIsActive && option.connector === connector} /> ) ) @@ -191,11 +194,17 @@ export const ConnectWalletPopover = ({ tryActivation, children }: ConnectWalletP content={ {getOptions()} - {active && Disconnect Wallet} + {isActive && ( + connector && (connector.deactivate ? connector.deactivate() : connector.resetState())} + > + Disconnect Wallet + + )} } show={walletSwitcherPopoverOpen} - isActive={active} + isActive={isActive} placement="bottom-end" > {children} diff --git a/src/components/Web3Status/index.tsx b/src/components/Web3Status/index.tsx index 4c81c94b1..965ad1f67 100644 --- a/src/components/Web3Status/index.tsx +++ b/src/components/Web3Status/index.tsx @@ -1,12 +1,12 @@ -import { AbstractConnector } from '@web3-react/abstract-connector' -import { UnsupportedChainIdError, useWeb3React } from '@web3-react/core' -import { WalletConnectConnector } from '@web3-react/walletconnect-connector' -import React, { useCallback, useEffect, useMemo, useState } from 'react' +import { useWeb3React } from '@web3-react/core' +import { Connector } from '@web3-react/types' +import { WalletConnect } from '@web3-react/walletconnect-v2' +import { useCallback, useEffect, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' import { createSearchParams, useNavigate, useSearchParams } from 'react-router-dom' import styled from 'styled-components' -import { NetworkContextName } from '../../constants' +import { network } from '../../connectors' import { useActiveWeb3React, useUnsupportedChainIdError } from '../../hooks' import { useENSAvatar } from '../../hooks/useENSAvatar' import { useENSName } from '../../hooks/useENSName' @@ -78,9 +78,8 @@ export enum ModalView { } export default function Web3Status() { - const { active, activate, account, error } = useWeb3React() + const { isActive, account, hooks } = useWeb3React() const { chainId: networkConnectorChainId, connector: activeConnector } = useActiveWeb3React() - const contextNetwork = useWeb3React(NetworkContextName) const navigate = useNavigate() const [searchParams] = useSearchParams() @@ -99,29 +98,25 @@ export default function Web3Status() { const [modal, setModal] = useState(null) const [pendingError, setPendingError] = useState() - const [pendingWallet, setPendingWallet] = useState() + const [pendingWallet, setPendingWallet] = useState() const toggleNetworkSwitcherPopover = useNetworkSwitcherPopoverToggle() const openUnsupportedNetworkModal = useOpenModal(ApplicationModal.UNSUPPORTED_NETWORK) - const tryActivation = async (connector: AbstractConnector | undefined) => { + const tryActivation = async (connector: Connector | undefined) => { setPendingWallet(connector) setModal(ModalView.Pending) // if the connector is walletconnect and the user has already tried to connect, manually reset the connector // eslint-disable-next-line // @ts-ignore - if (connector instanceof WalletConnectConnector && connector.walletConnectProvider?.wc?.uri) { - connector.walletConnectProvider = undefined + if (connector instanceof WalletConnect && connector.walletConnectProvider?.wc?.uri) { + connector.deactivate ? connector.deactivate() : connector.resetState() } - connector && - activate(connector, undefined, true).catch(error => { - if (error instanceof UnsupportedChainIdError) { - activate(connector) - } else { - setPendingError(true) - } + if (connector) + connector.activate()?.catch(error => { + console.error('Error while activating connector: ', error) }) } @@ -147,18 +142,22 @@ export default function Web3Status() { isUnsupportedNetwork, openUnsupportedNetworkModal, isUnsupportedNetworkModal, - unsupportedChainIdError, closeModals, + unsupportedChainIdError, ]) const clickHandler = useCallback(() => { toggleNetworkSwitcherPopover() }, [toggleNetworkSwitcherPopover]) - if (!contextNetwork.active && !active) { + const { useSelectedIsActive } = hooks + const networkIsActive = useSelectedIsActive(network) + + if (!networkIsActive && !isActive) { return null } - if (error) { + + if (unsupportedChainIdError) { return ( @@ -173,7 +172,7 @@ export default function Web3Status() { <> - {networkConnectorChainId && !account && ( + {!account && ( diff --git a/src/connectors/CustomNetworkConnector.ts b/src/connectors/CustomNetworkConnector.ts deleted file mode 100644 index 82d0002a3..000000000 --- a/src/connectors/CustomNetworkConnector.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { AbstractConnector } from '@web3-react/abstract-connector' -// eslint-disable-next-line import/named -import { ConnectorUpdate } from '@web3-react/types' -import invariant from 'tiny-invariant' - -import { NetworkDetails } from '../constants' - -// taken from ethers.js, compatible interface with web3 provider -type AsyncSendable = { - isMetaMask?: boolean - host?: string - path?: string - sendAsync?: (request: any, callback: (error: any, response: any) => void) => void - send?: (request: any, callback: (error: any, response: any) => void) => void -} - -export class RequestError extends Error { - constructor(message: string, public code: number, public data?: unknown) { - super() - this.name = this.constructor.name - this.message = message - } -} - -class CustomMiniRpcProvider implements AsyncSendable { - public readonly isMetaMask: false = false - public readonly chainId: number - public readonly url: string - public readonly host: string - public readonly path: string - - constructor(chainId: number, url: string) { - this.chainId = chainId - this.url = url - const parsed = new URL(url) - this.host = parsed.host - this.path = parsed.pathname - } - - public readonly sendAsync = ( - request: { jsonrpc: '2.0'; id: number | string | null; method: string; params?: unknown[] }, - callback: (error: any, response: any) => void - ): void => { - this.request(request.method, request.params) - .then(result => callback(null, { jsonrpc: '2.0', id: request.id, result })) - .catch(error => callback(error, null)) - } - - public readonly request = async ( - method: string | { method: string; params?: unknown[] }, - params?: unknown[] - ): Promise => { - if (typeof method !== 'string') { - params = (method as any).params - method = method.method - } - - const response = await fetch(this.url, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ - jsonrpc: '2.0', - id: 1, - method, - params, - }), - }) - if (!response.ok) throw new RequestError(`${response.status}: ${response.statusText}`, -32000) - const body = await response.json() - if ('error' in body) { - throw new RequestError(body?.error?.message, body?.error?.code, body?.error?.data) - } else if ('result' in body) { - return body.result - } else { - throw new RequestError(`Received unexpected JSON-RPC response to ${method} request.`, -32000, body) - } - } -} - -interface NetworkConnectorArguments { - urls: { [chainId: number]: string } - defaultChainId?: number -} - -export class CustomNetworkConnector extends AbstractConnector { - private readonly providers: { [chainId: number]: CustomMiniRpcProvider } - private currentChainId: number - - constructor({ urls, defaultChainId }: NetworkConnectorArguments) { - invariant(defaultChainId || Object.keys(urls).length === 1, 'defaultChainId is a required argument with >1 url') - super({ supportedChainIds: Object.keys(urls).map((k): number => Number(k)) }) - - this.currentChainId = defaultChainId || Number(Object.keys(urls)[0]) - this.providers = Object.keys(urls).reduce<{ [chainId: number]: CustomMiniRpcProvider }>((accumulator, chainId) => { - accumulator[Number(chainId)] = new CustomMiniRpcProvider(Number(chainId), urls[Number(chainId)]) - return accumulator - }, {}) - } - - public get provider(): CustomMiniRpcProvider { - return this.providers[this.currentChainId] - } - - public async activate(): Promise { - return { provider: this.providers[this.currentChainId], chainId: this.currentChainId, account: null } - } - - public async getProvider(): Promise { - return this.providers[this.currentChainId] - } - - public async getChainId(): Promise { - return this.currentChainId - } - - public async getAccount(): Promise { - return null - } - - public deactivate() { - return - } - - public changeChainId(chainId: number) { - invariant(Object.keys(this.providers).includes(chainId.toString()), `No url found for chainId ${chainId}`) - this.currentChainId = chainId - this.emitUpdate({ provider: this.providers[this.currentChainId], chainId }) - } - - public switchUnsupportedNetwork(networkDetails?: NetworkDetails) { - if (!window.ethereum || !window.ethereum.request || !window.ethereum.isMetaMask || !networkDetails) - return Promise.reject() - return window.ethereum - .request({ - method: 'wallet_switchEthereumChain', - params: [{ chainId: networkDetails.chainId }], - }) - .catch(error => { - if (error.code !== 4902) { - console.error('error switching to chain id', networkDetails.chainId, error) - } - }) - } -} diff --git a/src/connectors/CustomWalletConnectConnector.ts b/src/connectors/CustomWalletConnectConnector.ts deleted file mode 100644 index 3f535f548..000000000 --- a/src/connectors/CustomWalletConnectConnector.ts +++ /dev/null @@ -1,121 +0,0 @@ -// largely taken from https://github.com/NoahZinsmeister/web3-react/blob/v6/packages/walletconnect-connector/src/index.ts -// Updated to always be in sync with network connector's chain id - -import { IWalletConnectProviderOptions } from '@walletconnect/types' -import { AbstractConnector } from '@web3-react/abstract-connector' -import { ConnectorUpdate } from '@web3-react/types' - -import { network } from '.' - -export const URI_AVAILABLE = 'URI_AVAILABLE' - -export interface WalletConnectConnectorArguments extends IWalletConnectProviderOptions { - supportedChainIds?: number[] -} - -export class UserRejectedRequestError extends Error { - public constructor() { - super() - this.name = this.constructor.name - this.message = 'The user rejected the request.' - } -} - -function getSupportedChains({ supportedChainIds, rpc }: WalletConnectConnectorArguments): number[] | undefined { - if (supportedChainIds) { - return supportedChainIds - } - - return rpc ? Object.keys(rpc).map(k => Number(k)) : undefined -} - -export class CustomWalletConnectConnector extends AbstractConnector { - private readonly config: WalletConnectConnectorArguments - - public walletConnectProvider?: any - - constructor(config: WalletConnectConnectorArguments) { - super({ supportedChainIds: getSupportedChains(config) }) - - this.config = config - - this.changeChainId = this.changeChainId.bind(this) - this.handleAccountsChanged = this.handleAccountsChanged.bind(this) - this.handleDisconnect = this.handleDisconnect.bind(this) - } - - public changeChainId(chainId: number | string): void { - this.emitUpdate({ chainId }) - } - - private handleAccountsChanged(accounts: string[]): void { - this.emitUpdate({ account: accounts[0] }) - } - - private handleDisconnect(): void { - this.emitDeactivate() - // we have to do this because of a @walletconnect/web3-provider bug - if (this.walletConnectProvider) { - this.walletConnectProvider.stop() - this.walletConnectProvider.removeListener('chainChanged', this.changeChainId) - this.walletConnectProvider.removeListener('accountsChanged', this.handleAccountsChanged) - this.walletConnectProvider = undefined - } - - this.emitDeactivate() - } - - public async activate(): Promise { - const WalletConnectProvider = await import('@walletconnect/web3-provider').then(m => m?.default ?? m) - this.walletConnectProvider = new WalletConnectProvider(this.config) - - // ensure that the uri is going to be available, and emit an event if there's a new uri - if (!this.walletConnectProvider.wc.connected) { - await this.walletConnectProvider.wc.createSession({ chainId: await network.getChainId() }) - this.emit(URI_AVAILABLE, this.walletConnectProvider.wc.uri) - } - - const account = await this.walletConnectProvider - .enable() - .then((accounts: string[]): string => accounts[0]) - .catch((error: Error): void => { - // TODO ideally this would be a better check - if (error.message === 'User closed modal') { - throw new UserRejectedRequestError() - } - - throw error - }) - - this.walletConnectProvider.on('chainChanged', this.changeChainId) - this.walletConnectProvider.on('disconnect', this.handleDisconnect) - this.walletConnectProvider.on('accountsChanged', this.handleAccountsChanged) - - return { provider: this.walletConnectProvider, account } - } - - public async getProvider(): Promise { - return this.walletConnectProvider - } - - public async getChainId(): Promise { - return this.walletConnectProvider.send('eth_chainId') - } - - public async getAccount(): Promise { - return this.walletConnectProvider.send('eth_accounts').then((accounts: string[]): string => accounts[0]) - } - - public deactivate() { - if (this.walletConnectProvider) { - this.walletConnectProvider.stop() - this.walletConnectProvider.removeListener('chainChanged', this.changeChainId) - this.walletConnectProvider.removeListener('disconnect', this.handleDisconnect) - this.walletConnectProvider.removeListener('accountsChanged', this.handleAccountsChanged) - } - } - - public async close() { - await this.walletConnectProvider?.close() - } -} diff --git a/src/connectors/CustomWalletLinkConnector.ts b/src/connectors/CustomWalletLinkConnector.ts deleted file mode 100644 index 490b3f500..000000000 --- a/src/connectors/CustomWalletLinkConnector.ts +++ /dev/null @@ -1,118 +0,0 @@ -// largely taken from https://github.com/NoahZinsmeister/web3-react/blob/v6/packages/walletlink-connector/src/index.ts -// Updated to always be in sync with network connector's chain id - -import { AbstractConnector } from '@web3-react/abstract-connector' -import { ConnectorUpdate } from '@web3-react/types' - -import { NetworkDetails } from '../constants' - -const CHAIN_ID = 1 - -interface WalletLinkConnectorArguments { - url: string - appName: string - appLogoUrl?: string - darkMode?: boolean - supportedChainIds?: number[] -} - -export class CustomWalletLinkConnector extends AbstractConnector { - private readonly url: string - private readonly appName: string - private readonly appLogoUrl?: string - private readonly darkMode: boolean - - public walletLink: any - public provider: any - - constructor({ url, appName, appLogoUrl, darkMode, supportedChainIds }: WalletLinkConnectorArguments) { - super({ supportedChainIds: supportedChainIds }) - - this.url = url - this.appName = appName - this.appLogoUrl = appLogoUrl - this.darkMode = darkMode || false - - this.handleChainChanged = this.handleChainChanged.bind(this) - this.handleAccountsChanged = this.handleAccountsChanged.bind(this) - } - - public async activate(): Promise { - if (window.ethereum && window.ethereum.isCoinbaseWallet === true) { - // user is in the dapp browser on Coinbase Wallet - this.provider = window.ethereum - } else if (!this.walletLink) { - const WalletLink = await import('walletlink').then(m => m?.default ?? m) - this.walletLink = new WalletLink({ - appName: this.appName, - darkMode: this.darkMode, - ...(this.appLogoUrl ? { appLogoUrl: this.appLogoUrl } : {}), - }) - this.provider = this.walletLink.makeWeb3Provider(this.url, CHAIN_ID) - } - - const accounts = await this.provider.request({ - method: 'eth_requestAccounts', - }) - const account = accounts[0] - - this.provider.on('chainChanged', this.handleChainChanged) - this.provider.on('accountsChanged', this.handleAccountsChanged) - - return { provider: this.provider, account: account } - } - - public async getProvider(): Promise { - return this.provider - } - - public async getChainId(): Promise { - return this.provider.chainId - } - - public async getAccount(): Promise { - const accounts = await this.provider.request({ - method: 'eth_requestAccounts', - }) - return accounts[0] - } - - public deactivate() { - this.provider.removeListener('chainChanged', this.handleChainChanged) - this.provider.removeListener('accountsChanged', this.handleAccountsChanged) - } - - public async close() { - this.provider.close() - this.emitDeactivate() - } - - public changeChainId(networkDetails: NetworkDetails, account?: string | undefined) { - return this.provider - .request({ - method: 'wallet_switchEthereumChain', - params: [{ chainId: networkDetails.chainId }], - }) - .catch((error: any) => { - if (error.code !== 4902) { - console.error('error switching to chain id', networkDetails.chainId, error) - } - this.provider - .request({ - method: 'wallet_addEthereumChain', - params: [{ ...networkDetails }, account], - }) - .catch((error: any) => { - console.error('error adding chain with id', networkDetails.chainId, error) - }) - }) - } - - private handleChainChanged(chainId: number | string): void { - this.emitUpdate({ chainId: chainId }) - } - - private handleAccountsChanged(accounts: string[]): void { - this.emitUpdate({ account: accounts[0] }) - } -} diff --git a/src/connectors/index.ts b/src/connectors/index.ts index b35fddc05..8a394c4f3 100644 --- a/src/connectors/index.ts +++ b/src/connectors/index.ts @@ -1,94 +1,66 @@ import { ChainId } from '@swapr/sdk' -import { InjectedConnector } from '@web3-react/injected-connector' -import { providers } from 'ethers' - -import swprLogo from '../assets/images/swpr-logo.png' -import { REFETCH_DATA_INTERVAL } from '../constants/data' -import getLibrary from '../utils/getLibrary' - -import { CustomNetworkConnector } from './CustomNetworkConnector' -import { CustomWalletConnectConnector } from './CustomWalletConnectConnector' -import { CustomWalletLinkConnector } from './CustomWalletLinkConnector' +import { CoinbaseWallet } from '@web3-react/coinbase-wallet' +import { initializeConnector } from '@web3-react/core' +import { MetaMask } from '@web3-react/metamask' +import { Network } from '@web3-react/network' +import { WalletConnect } from '@web3-react/walletconnect-v2' export const INFURA_PROJECT_ID = 'e1a3bfc40093494ca4f36b286ab36f2d' -/** - * @TODO in https://linear.app/swaprdev/issue/SWA-65/provide-a-single-source-of-truth-for-chain-rpcs-from-the-sdk - * Consume `RPC_PROVIDER_LIST` from the SDK and use it as single source of truth - */ -export const network = new CustomNetworkConnector({ - urls: { - [ChainId.MAINNET]: `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`, - [ChainId.XDAI]: 'https://rpc.gnosischain.com/', - [ChainId.ARBITRUM_ONE]: 'https://arb1.arbitrum.io/rpc', - [ChainId.POLYGON]: 'https://polygon-rpc.com/', - [ChainId.ARBITRUM_GOERLI]: 'https://goerli-rollup.arbitrum.io/rpc', - [ChainId.OPTIMISM_MAINNET]: 'https://mainnet.optimism.io', - [ChainId.OPTIMISM_GOERLI]: 'https://goerli.optimism.io', - [ChainId.BSC_MAINNET]: 'https://bsc-dataseed.binance.org/', - [ChainId.ZK_SYNC_ERA_MAINNET]: `https://mainnet.era.zksync.io`, - [ChainId.ZK_SYNC_ERA_TESTNET]: `https://testnet.era.zksync.dev`, - }, - defaultChainId: ChainId.MAINNET, -}) -export const injected = new InjectedConnector({ - supportedChainIds: [ - ChainId.MAINNET, - ChainId.RINKEBY, - ChainId.ARBITRUM_ONE, - ChainId.ARBITRUM_RINKEBY, - ChainId.XDAI, - ChainId.POLYGON, - ChainId.ARBITRUM_GOERLI, - ChainId.GOERLI, - ChainId.OPTIMISM_MAINNET, - ChainId.OPTIMISM_GOERLI, - ChainId.BSC_MAINNET, - ChainId.ZK_SYNC_ERA_MAINNET, - ChainId.ZK_SYNC_ERA_TESTNET, - ], -}) +export const [network, networkHooks] = initializeConnector( + actions => + new Network({ + actions, + urlMap: { + [ChainId.MAINNET]: `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`, + [ChainId.XDAI]: 'https://rpc.gnosischain.com/', + [ChainId.ARBITRUM_ONE]: 'https://arb1.arbitrum.io/rpc', + [ChainId.POLYGON]: 'https://polygon-rpc.com/', + [ChainId.ARBITRUM_GOERLI]: 'https://goerli-rollup.arbitrum.io/rpc', + [ChainId.OPTIMISM_MAINNET]: 'https://mainnet.optimism.io', + [ChainId.OPTIMISM_GOERLI]: 'https://goerli.optimism.io', + [ChainId.BSC_MAINNET]: 'https://bsc-dataseed.binance.org/', + [ChainId.ZK_SYNC_ERA_MAINNET]: `https://mainnet.era.zksync.io`, + [ChainId.ZK_SYNC_ERA_TESTNET]: `https://testnet.era.zksync.dev`, + }, + }) +) -// mainnet only -export const walletConnect = new CustomWalletConnectConnector({ - rpc: { - [ChainId.BSC_MAINNET]: 'https://bsc-dataseed.binance.org/', - [ChainId.OPTIMISM_MAINNET]: 'https://mainnet.optimism.io', - [ChainId.POLYGON]: 'https://polygon-rpc.com', - [ChainId.ARBITRUM_ONE]: 'https://arb1.arbitrum.io/rpc', - [ChainId.XDAI]: 'https://rpc.gnosischain.com/', - [ChainId.MAINNET]: `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`, - [ChainId.ZK_SYNC_ERA_MAINNET]: `https://mainnet.era.zksync.io`, - }, - bridge: 'https://bridge.walletconnect.org', - qrcode: true, - pollingInterval: REFETCH_DATA_INTERVAL, -}) +export const [metaMask, metaMaskHooks] = initializeConnector(actions => new MetaMask({ actions })) -let networkLibrary: providers.Web3Provider | undefined -export function getNetworkLibrary(): providers.Web3Provider { - return (networkLibrary = networkLibrary ?? getLibrary(network.provider)) -} +export const [walletConnect, walletConnectHooks] = initializeConnector( + actions => + new WalletConnect({ + actions, + options: { + projectId: '47ba8ad6d35c9c9087a75b35360c4b3a', + chains: [ChainId.MAINNET], + optionalChains: [ + ChainId.RINKEBY, + ChainId.ARBITRUM_ONE, + ChainId.ARBITRUM_RINKEBY, + ChainId.XDAI, + ChainId.POLYGON, + ChainId.ARBITRUM_GOERLI, + ChainId.OPTIMISM_MAINNET, + ChainId.OPTIMISM_GOERLI, + ChainId.BSC_MAINNET, + ChainId.ZK_SYNC_ERA_MAINNET, + ChainId.ZK_SYNC_ERA_TESTNET, + ], + showQrModal: true, + }, + }) +) -// walletLink implements Metamask's RPC and should respond to most it's methods: window.ethereum.isMetaMask === true -// More info: https://github.com/walletlink/walletlink -export const walletLink = new CustomWalletLinkConnector({ - url: `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`, - appName: 'Swapr', - appLogoUrl: swprLogo, - supportedChainIds: [ - ChainId.MAINNET, - ChainId.RINKEBY, - ChainId.ARBITRUM_ONE, - ChainId.ARBITRUM_RINKEBY, - ChainId.XDAI, - ChainId.POLYGON, - ChainId.ARBITRUM_GOERLI, - ChainId.OPTIMISM_MAINNET, - ChainId.OPTIMISM_GOERLI, - ChainId.BSC_MAINNET, - ChainId.ZK_SYNC_ERA_MAINNET, - ChainId.ZK_SYNC_ERA_TESTNET, - ], -}) +export const [coinbaseWallet, coinbaseWalletHooks] = initializeConnector( + actions => + new CoinbaseWallet({ + actions, + options: { + url: `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`, + appName: 'web3-react', + }, + }) +) diff --git a/src/constants/index.tsx b/src/constants/index.tsx index cefbee86a..c49e11540 100644 --- a/src/constants/index.tsx +++ b/src/constants/index.tsx @@ -23,7 +23,7 @@ import { UniswapV2RoutablePlatform, } from '@swapr/sdk' -import { AbstractConnector } from '@web3-react/abstract-connector' +import { Connector } from '@web3-react/types' import { providers } from 'ethers' import { ReactNode } from 'react' @@ -46,7 +46,7 @@ import SushiswapNewLogo from '../assets/images/sushiswap-new-logo.svg' import UniswapLogo from '../assets/images/uniswap-logo.svg' import VelodromeLogo from '../assets/images/velodrome-logo.svg' import WalletConnect from '../assets/images/wallet-connect.svg' -import { injected, walletConnect, walletLink } from '../connectors' +import { metaMask, walletConnect, coinbaseWallet } from '../connectors' import { BridgeIds, EcoBridgeConfig } from '../services/EcoBridge/EcoBridge.types' export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' @@ -317,7 +317,7 @@ export const PINNED_PAIRS: { export const ARBITRUM_ONE_PROVIDER = new providers.JsonRpcProvider('https://arb1.arbitrum.io/rpc') export interface WalletInfo { - connector?: AbstractConnector + connector?: Connector name: string iconName: string description: string @@ -330,7 +330,7 @@ export interface WalletInfo { export const SUPPORTED_WALLETS: { [key: string]: WalletInfo } = { INJECTED: { - connector: injected, + connector: metaMask, name: 'Injected', iconName: RightArrow, description: 'Injected web3 provider.', @@ -339,7 +339,7 @@ export const SUPPORTED_WALLETS: { [key: string]: WalletInfo } = { primary: true, }, METAMASK: { - connector: injected, + connector: metaMask, name: 'MetaMask', iconName: Metamask, description: 'Easy-to-use browser extension.', @@ -357,7 +357,7 @@ export const SUPPORTED_WALLETS: { [key: string]: WalletInfo } = { mobile: true, }, COINBASE: { - connector: walletLink, + connector: coinbaseWallet, name: 'Coinbase Wallet', iconName: Coinbase, description: 'Connect using Coinbase Wallet.', diff --git a/src/hooks/index.ts b/src/hooks/index.ts index f650b36aa..abeafd9ca 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -1,66 +1,77 @@ -import { Web3Provider } from '@ethersproject/providers' import { ChainId } from '@swapr/sdk' -import { UnsupportedChainIdError, useWeb3React as useWeb3ReactCore } from '@web3-react/core' -import { Web3ReactContextInterface } from '@web3-react/core/dist/types' +import { Web3ContextType, useWeb3React as useWeb3ReactCore } from '@web3-react/core' import { useEffect, useState } from 'react' -import { isMobile } from 'react-device-detect' -import { injected } from '../connectors' -import { NetworkContextName } from '../constants' +import { metaMask, network } from '../connectors' -export function useActiveWeb3React(): Web3ReactContextInterface & { chainId?: ChainId } { - const context = useWeb3ReactCore() - const contextNetwork = useWeb3ReactCore(NetworkContextName) - return context.active ? context : contextNetwork +export function useActiveWeb3React(): Web3ContextType & { chainId?: ChainId } { + const context = useWeb3ReactCore() + const { + useSelectedChainId, + useSelectedAccounts, + useSelectedIsActivating, + useSelectedAccount, + useSelectedIsActive, + useSelectedProvider, + useSelectedENSNames, + useSelectedENSName, + } = context.hooks + + const contextNetwork = { + chainId: useSelectedChainId(network) as ChainId, + accounts: useSelectedAccounts(network), + isActivating: useSelectedIsActivating(network), + account: useSelectedAccount(network), + isActive: useSelectedIsActive(network), + provider: useSelectedProvider(network), + ENSNames: useSelectedENSNames(network), + ENSName: useSelectedENSName(network), + connector: network, + hooks: context.hooks, + } + + return context.isActive && context.chainId && Boolean(ChainId[context.chainId]) ? context : contextNetwork } export function useEagerConnect() { - const { activate, active } = useWeb3ReactCore() // specifically using useWeb3ReactCore because of what this hook does + const { isActive } = useWeb3ReactCore() // specifically using useWeb3ReactCore because of what this hook does const [tried, setTried] = useState(false) useEffect(() => { - injected.isAuthorized().then(isAuthorized => { - if (isAuthorized) { - activate(injected, undefined, true).catch(() => { - setTried(true) - }) - } else { - if (isMobile && window.ethereum) { - activate(injected, undefined, true).catch(() => { - setTried(true) - }) - } else { - setTried(true) - } - } - }) - }, [activate]) // intentionally only running on mount (make sure it's only mounted once :)) + if (!isActive) { + metaMask.connectEagerly().catch(() => { + console.error('Failed to connect eagerly to metamask') + }) + } + setTried(true) + }, [isActive]) // intentionally only running on mount (make sure it's only mounted once :)) // if the connection worked, wait until we get confirmation of that to flip the flag useEffect(() => { - if (active) { + if (isActive) { setTried(true) } - }, [active]) + }, [isActive]) return tried } -/** - * Use for network and injected - logs user in - * and out after checking what network theyre on - */ +// /** +// * Use for network and injected - logs user in +// * and out after checking what network theyre on +// */ export function useInactiveListener(suppress = false) { - const { active, error, activate } = useWeb3ReactCore() // specifically using useWeb3React because of what this hook does + const { isActive, connector } = useWeb3ReactCore() // specifically using useWeb3React because of what this hook does + const isUnsupportedChainIdError = useUnsupportedChainIdError() useEffect(() => { const { ethereum } = window - if (ethereum && ethereum.on && !active && !error && !suppress) { + if (ethereum && ethereum.on && !isActive && !isUnsupportedChainIdError && !suppress) { const handleChainChanged = () => { // eat errors - activate(injected, undefined, true).catch(error => { + connector.activate()?.catch(error => { console.error('Failed to activate after chain changed', error) }) } @@ -68,7 +79,7 @@ export function useInactiveListener(suppress = false) { const handleAccountsChanged = (accounts: string[]) => { if (accounts.length > 0) { // eat errors - activate(injected, undefined, true).catch(error => { + connector.activate()?.catch(error => { console.error('Failed to activate after accounts changed', error) }) } @@ -85,10 +96,10 @@ export function useInactiveListener(suppress = false) { } } return undefined - }, [active, error, suppress, activate]) + }, [suppress, isActive, isUnsupportedChainIdError, connector]) } export function useUnsupportedChainIdError(): boolean { - const { error } = useWeb3ReactCore() - return error instanceof UnsupportedChainIdError + const { chainId } = useWeb3ReactCore() + return chainId ? !ChainId[chainId] : false } diff --git a/src/hooks/useContract.ts b/src/hooks/useContract.ts index 3f7c771b0..0582c2e49 100644 --- a/src/hooks/useContract.ts +++ b/src/hooks/useContract.ts @@ -40,17 +40,17 @@ import { useActiveWeb3React } from './index' // returns null on errors function useContract(address: string | undefined, ABI: any, withSignerIfPossible = true): Contract | null { - const { library, account } = useActiveWeb3React() + const { provider, account } = useActiveWeb3React() return useMemo(() => { - if (!address || !ABI || !library) return null + if (!address || !ABI || !provider) return null try { - return getContract(address, ABI, library, withSignerIfPossible && account ? account : undefined) + return getContract(address, ABI, provider, withSignerIfPossible && account ? account : undefined) } catch (error) { console.error('Failed to get contract', error) return null } - }, [address, ABI, library, withSignerIfPossible, account]) + }, [address, ABI, provider, withSignerIfPossible, account]) } export function useTokenContract(tokenAddress?: string, withSignerIfPossible?: boolean): Contract | null { @@ -144,24 +144,24 @@ export function useStakingRewardsDistributionContract( } export function useSWPRClaimerContract(): Contract | null { - const { library, chainId, account } = useActiveWeb3React() + const { provider, chainId, account } = useActiveWeb3React() return useMemo(() => { const address = SWPR_CLAIMER_ADDRESS[ChainId.ARBITRUM_ONE] const ABI = SWPR_CLAIMER_ABI - if (!address || !isAddress(address) || address === constants.AddressZero || !ABI || !library) return null + if (!address || !isAddress(address) || address === constants.AddressZero || !ABI || !provider) return null try { return new Contract( address, ABI, account - ? (getProviderOrSigner(chainId === ChainId.ARBITRUM_ONE ? library : ARBITRUM_ONE_PROVIDER, account) as any) + ? (getProviderOrSigner(chainId === ChainId.ARBITRUM_ONE ? provider : ARBITRUM_ONE_PROVIDER, account) as any) : account ) } catch (error) { console.error('Failed to get contract', error) return null } - }, [library, chainId, account]) + }, [provider, chainId, account]) } export function useSWPRConverterContract(withSignerIfPossible?: boolean): Contract | null { diff --git a/src/hooks/useFetchListCallback.ts b/src/hooks/useFetchListCallback.ts index b0ca1b4dc..fa9ae29c7 100644 --- a/src/hooks/useFetchListCallback.ts +++ b/src/hooks/useFetchListCallback.ts @@ -1,4 +1,5 @@ import { getAddress } from '@ethersproject/address' +import { ChainId } from '@swapr/sdk' import { nanoid } from '@reduxjs/toolkit' import { TokenList } from '@uniswap/token-lists' @@ -8,7 +9,7 @@ import { useDispatch } from 'react-redux' import { immediateCarrotSubgraphClients } from '../apollo/client' import carrotListLogoUrl from '../assets/images/carrot.png' -import { getNetworkLibrary } from '../connectors' +import { network } from '../connectors' import { KPI_TOKEN_CREATORS } from '../constants' import { AppDispatch } from '../state' import { fetchTokenList } from '../state/lists/actions' @@ -18,22 +19,23 @@ import resolveENSContentHash from '../utils/resolveENSContentHash' import { useActiveWeb3React } from './index' export function useFetchListCallback(): (listUrl: string, sendDispatch?: boolean) => Promise { - const { chainId, library } = useActiveWeb3React() + const { chainId, provider, hooks } = useActiveWeb3React() + const { useSelectedProvider, useSelectedChainId } = hooks + const networkProvider = useSelectedProvider(network) + const networkChainId = useSelectedChainId(network) const dispatch = useDispatch() const ensResolver = useCallback( async (ensName: string) => { - if (!library || chainId !== 1) { - const networkLibrary = getNetworkLibrary() - const network = await networkLibrary.getNetwork() - if (networkLibrary && network.chainId === 1) { - return resolveENSContentHash(ensName, networkLibrary) + if (!provider || chainId !== 1) { + if (networkProvider && networkChainId === ChainId.MAINNET) { + return resolveENSContentHash(ensName, networkProvider) } throw new Error('Could not construct mainnet ENS resolver') } - return resolveENSContentHash(ensName, library) + return resolveENSContentHash(ensName, provider) }, - [chainId, library] + [chainId, networkChainId, networkProvider, provider] ) // note: prevent dispatch if using for list search or unsupported list diff --git a/src/hooks/useNetworkSwitch.ts b/src/hooks/useNetworkSwitch.ts index 1d4c81592..5243f9ea6 100644 --- a/src/hooks/useNetworkSwitch.ts +++ b/src/hooks/useNetworkSwitch.ts @@ -1,15 +1,12 @@ import { ChainId, SWPR } from '@swapr/sdk' -import { InjectedConnector } from '@web3-react/injected-connector' +import { CoinbaseWallet } from '@web3-react/coinbase-wallet' +import { MetaMask } from '@web3-react/metamask' +import { Network } from '@web3-react/network' +import { WalletConnect } from '@web3-react/walletconnect-v2' import { useCallback } from 'react' import { NavigateFunction, useLocation, useNavigate } from 'react-router-dom' -import { CustomNetworkConnector } from '../connectors/CustomNetworkConnector' -import { CustomWalletConnectConnector } from '../connectors/CustomWalletConnectConnector' -import { CustomWalletLinkConnector } from '../connectors/CustomWalletLinkConnector' -import { NETWORK_DETAIL } from '../constants' -import { switchOrAddNetwork } from '../utils' - import { useActiveWeb3React, useUnsupportedChainIdError } from '.' export type UseNetworkSwitchProps = { @@ -17,27 +14,30 @@ export type UseNetworkSwitchProps = { } export const useNetworkSwitch = ({ onSelectNetworkCallback }: UseNetworkSwitchProps = {}) => { - const { connector, chainId, account } = useActiveWeb3React() + const { chainId, account, hooks } = useActiveWeb3React() + const { usePriorityConnector } = hooks const unsupportedChainIdError = useUnsupportedChainIdError() const navigate = useNavigate() const { pathname } = useLocation() + const priorityConnector = usePriorityConnector() + const selectNetwork = useCallback( async (optionChainId?: ChainId) => { if (optionChainId === undefined || (optionChainId === chainId && !unsupportedChainIdError)) return let changeChainIdResult: unknown - if (!account && !unsupportedChainIdError && connector instanceof CustomNetworkConnector) { - connector.changeChainId(optionChainId) + if (!account && !unsupportedChainIdError && priorityConnector instanceof Network) { + priorityConnector.activate(optionChainId) unavailableRedirect(optionChainId, navigate, pathname) - } else if (!account && unsupportedChainIdError && connector instanceof CustomNetworkConnector) - changeChainIdResult = await connector.switchUnsupportedNetwork(NETWORK_DETAIL[optionChainId]) - else if (connector instanceof InjectedConnector) - changeChainIdResult = await switchOrAddNetwork(NETWORK_DETAIL[optionChainId], account || undefined) - else if (connector instanceof CustomWalletLinkConnector) - changeChainIdResult = await connector.changeChainId(NETWORK_DETAIL[optionChainId], account || undefined) - else if (connector instanceof CustomWalletConnectConnector) { - connector.changeChainId(optionChainId) + } else if (!account && unsupportedChainIdError && priorityConnector instanceof Network) + changeChainIdResult = await priorityConnector.activate(optionChainId) + else if (priorityConnector instanceof MetaMask) + changeChainIdResult = await priorityConnector.activate(optionChainId) + else if (priorityConnector instanceof CoinbaseWallet) + changeChainIdResult = await priorityConnector.activate(optionChainId) + else if (priorityConnector instanceof WalletConnect) { + priorityConnector.activate(optionChainId) unavailableRedirect(optionChainId, navigate, pathname) } @@ -45,7 +45,7 @@ export const useNetworkSwitch = ({ onSelectNetworkCallback }: UseNetworkSwitchPr // success scenario - user accepts the change on the popup window if (changeChainIdResult === null) unavailableRedirect(optionChainId, navigate, pathname) }, - [account, chainId, connector, navigate, onSelectNetworkCallback, pathname, unsupportedChainIdError] + [account, chainId, navigate, onSelectNetworkCallback, pathname, priorityConnector, unsupportedChainIdError] ) return { diff --git a/src/hooks/useSwapCallback.ts b/src/hooks/useSwapCallback.ts index fd54dd6a5..03ebb0160 100644 --- a/src/hooks/useSwapCallback.ts +++ b/src/hooks/useSwapCallback.ts @@ -67,12 +67,12 @@ export function useSwapsCallArguments( allowedSlippage: number = INITIAL_ALLOWED_SLIPPAGE, // in bips recipient?: string | null // the ENS name or address of the recipient of the trade, or null if swap should be returned to sender ): SwapCall[][] { - const { chainId, library, account } = useActiveWeb3React() + const { chainId, provider, account } = useActiveWeb3React() const deadline = useTransactionDeadline() return useMemo(() => { - if (!trades || trades.length === 0 || !recipient || !library || !chainId || !deadline) { + if (!trades || trades.length === 0 || !recipient || !provider || !chainId || !deadline) { return [] } @@ -127,7 +127,7 @@ export function useSwapsCallArguments( return swapMethods.map(transactionParameters => ({ transactionParameters })) }) - }, [allowedSlippage, chainId, deadline, library, trades, recipient, account]) + }, [allowedSlippage, chainId, deadline, provider, trades, recipient, account]) } /** @@ -173,7 +173,7 @@ export function useSwapCallback({ allowedSlippage = INITIAL_ALLOWED_SLIPPAGE, recipientAddressOrName, }: UseSwapCallbackParams): UseSwapCallbackReturn { - const { account, chainId, library } = useActiveWeb3React() + const { account, chainId, provider } = useActiveWeb3React() const mainnetGasPrices = useMainnetGasPrices() const [preferredGasPrice] = useUserPreferredGasPrice() const { activeChartTab } = useContext(SwapTabContext) @@ -188,7 +188,7 @@ export function useSwapCallback({ const addTransaction = useTransactionAdder() return useMemo(() => { - if (!trade || !library || !account || !chainId) { + if (!trade || !provider || !account || !chainId) { return { state: SwapCallbackState.INVALID, callback: null, error: 'Missing dependencies' } } if (!recipient) { @@ -204,7 +204,7 @@ export function useSwapCallback({ callback: async function onSwap(): Promise { // GPv2 trade if (trade instanceof CoWTrade) { - const signer = library.getSigner() + const signer = provider.getSigner() // Sign the order // and then submit the order to GPv2 @@ -237,7 +237,7 @@ export function useSwapCallback({ } } - return library + return provider .getSigner() .estimateGas(transactionRequest as any) .then(gasEstimate => ({ @@ -247,7 +247,7 @@ export function useSwapCallback({ .catch(gasError => { console.debug('Gas estimate failed, trying eth_call to extract error', transactionRequest, gasError) - return library + return provider .call(transactionRequest as any) .then(result => { console.debug('Unexpected successful call after failed estimate gas', call, gasError, result) @@ -300,7 +300,7 @@ export function useSwapCallback({ } } - return library + return provider .getSigner() .sendTransaction({ gasLimit: calculateGasMargin(gasEstimate), @@ -330,7 +330,7 @@ export function useSwapCallback({ } }, [ trade, - library, + provider, account, chainId, recipient, diff --git a/src/hooks/useSwapsGasEstimate.ts b/src/hooks/useSwapsGasEstimate.ts index 5d1b1e50d..8f3a6e4fb 100644 --- a/src/hooks/useSwapsGasEstimate.ts +++ b/src/hooks/useSwapsGasEstimate.ts @@ -25,7 +25,7 @@ export function useSwapsGasEstimations( recipientAddressOrName: string | null, trades?: (Trade | undefined)[] ): { loading: boolean; estimations: (BigNumber | null)[][] } { - const { account, library, chainId } = useActiveWeb3React() + const { account, provider, chainId } = useActiveWeb3React() const platformSwapCalls = useSwapsCallArguments(trades, allowedSlippage, recipientAddressOrName) const mainnetGasPrices = useMainnetGasPrices() const [preferredGasPrice] = useUserPreferredGasPrice() @@ -116,7 +116,7 @@ export function useSwapsGasEstimations( let estimatedCall = null try { estimatedCall = calculateGasMargin( - await (library as Web3Provider).estimateGas(transactionParameters as any) + await (provider as Web3Provider).estimateGas(transactionParameters as any) ) } catch (error) { console.error(error) @@ -130,15 +130,15 @@ export function useSwapsGasEstimations( } setEstimations(estimatedCalls) setLoading(false) - }, [platformSwapCalls, library, routerAllowances, trades, typedIndependentCurrencyAmount]) + }, [platformSwapCalls, provider, routerAllowances, trades, typedIndependentCurrencyAmount]) useEffect(() => { - if (!trades || trades.length === 0 || !library || !chainId || !recipient || !account || !calculateGasFees) { + if (!trades || trades.length === 0 || !provider || !chainId || !recipient || !account || !calculateGasFees) { setEstimations([]) return } updateEstimations() - }, [chainId, library, recipient, trades, updateEstimations, account, calculateGasFees]) + }, [chainId, provider, recipient, trades, updateEstimations, account, calculateGasFees]) return { loading: loading, estimations } } diff --git a/src/hooks/useTimestampFromBlock.ts b/src/hooks/useTimestampFromBlock.ts index 5cf806bab..2d4790ed8 100644 --- a/src/hooks/useTimestampFromBlock.ts +++ b/src/hooks/useTimestampFromBlock.ts @@ -3,18 +3,18 @@ import { useEffect, useState } from 'react' import { useActiveWeb3React } from './index' export function useTimestampFromBlock(block: number | undefined): number | undefined { - const { library } = useActiveWeb3React() + const { provider } = useActiveWeb3React() const [timestamp, setTimestamp] = useState() useEffect(() => { async function fetchTimestamp() { if (block) { - const blockData = await library?.getBlock(block) + const blockData = await provider?.getBlock(block) blockData && setTimestamp(blockData.timestamp) } } if (!timestamp) { fetchTimestamp() } - }, [block, library, timestamp]) + }, [block, provider, timestamp]) return timestamp } diff --git a/src/index.tsx b/src/index.tsx index f426fdf68..010361402 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,13 +1,23 @@ import { setUseWhatChange } from '@simbathesailor/use-what-changed' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' -import { createWeb3ReactRoot, Web3ReactProvider } from '@web3-react/core' +import { Web3ReactHooks, Web3ReactProvider } from '@web3-react/core' +import { Connector } from '@web3-react/types' import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' import { Provider as ReduxProvider } from 'react-redux' import { HashRouter } from 'react-router-dom' import { AnalyticsProvider } from './analytics' -import { NetworkContextName } from './constants' +import { + metaMask, + metaMaskHooks, + walletConnect, + walletConnectHooks, + coinbaseWallet, + coinbaseWalletHooks, + network, + networkHooks, +} from './connectors' import './i18n' import App from './pages/App' import { LimitOrderFromProvider } from './pages/Swap/LimitOrderBox/contexts/LimitOrderFormProvider' @@ -22,7 +32,6 @@ import MulticallUpdater from './state/multicall/updater' import TransactionUpdater from './state/transactions/updater' import UserUpdater from './state/user/updater' import ThemeProvider, { FixedGlobalStyle, ThemedGlobalStyle } from './theme' -import getLibrary from './utils/getLibrary' import './theme/fonts.css' // Add Content Security Policy nonce to the scripts @@ -33,8 +42,6 @@ setUseWhatChange({ active: process.env.NODE_ENV === 'development', }) -const Web3ProviderNetwork = createWeb3ReactRoot(NetworkContextName) - if ('ethereum' in window) { ;(window.ethereum as any).autoRefreshOnNetworkChange = false } @@ -60,32 +67,37 @@ const container = document.getElementById('root')! const root = createRoot(container) export const queryClient = new QueryClient() +const connectors: [Connector, Web3ReactHooks][] = [ + [metaMask, metaMaskHooks], + [walletConnect, walletConnectHooks], + [coinbaseWallet, coinbaseWalletHooks], + [network, networkHooks], +] + root.render( - - - - - - - - + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/src/lib/eco-router/hooks.ts b/src/lib/eco-router/hooks.ts index a48142ab6..df82c1a8c 100644 --- a/src/lib/eco-router/hooks.ts +++ b/src/lib/eco-router/hooks.ts @@ -25,7 +25,7 @@ export function useEcoRouterExactIn(currencyAmountIn?: CurrencyAmount, currencyO // Errors const [errors, setErrors] = useState([]) // Chain Id - const { chainId, account, library } = useActiveWeb3React() + const { chainId, account, provider } = useActiveWeb3React() // Uniswap V2 Trade option: using multi-hop option const uniswapV2IsMultihop = useIsMultihop() // Used to trigger computing trade route @@ -37,7 +37,7 @@ export function useEcoRouterExactIn(currencyAmountIn?: CurrencyAmount, currencyO let isCancelled = false // Early exit and clean state if necessary - if (!currencyAmountIn || !account || !currencyAmountIn.currency || !library || !currencyOut || !chainId) { + if (!currencyAmountIn || !account || !currencyAmountIn.currency || !provider || !currencyOut || !chainId) { setTrades([]) setLoading(false) @@ -62,7 +62,7 @@ export function useEcoRouterExactIn(currencyAmountIn?: CurrencyAmount, currencyO useMultihops: uniswapV2IsMultihop, }, }, - library + provider ) .then(newTrades => { // Only update this invokation is not cancelled @@ -108,7 +108,7 @@ export function useEcoRouterExactOut(currencyIn?: Currency, currencyAmountOut?: // Errors const [errors, setErrors] = useState([]) // Chain Id - const { chainId, account, library } = useActiveWeb3React() + const { chainId, account, provider } = useActiveWeb3React() // Uniswap V2 Trade option: using multi-hop option const uniswapV2IsMultihop = useIsMultihop() // Used to trigger computing trade route @@ -144,7 +144,7 @@ export function useEcoRouterExactOut(currencyIn?: Currency, currencyAmountOut?: useMultihops: uniswapV2IsMultihop, }, }, - library + provider ) .then(newTrades => { // Only update this invokation is not cancelled diff --git a/src/pages/Account/Account.tsx b/src/pages/Account/Account.tsx index 1bbc23240..fe229bffd 100644 --- a/src/pages/Account/Account.tsx +++ b/src/pages/Account/Account.tsx @@ -48,7 +48,7 @@ export function Account() { const [searchParams, setSearchParams] = useSearchParams() // Account details - const { account, chainId, active, deactivate } = useActiveWeb3React() + const { account, chainId, isActive, connector } = useActiveWeb3React() const { ENSName } = useENSName(account ?? undefined) const { avatar: ensAvatar } = useENSAvatar(ENSName) @@ -162,7 +162,13 @@ export function Account() { - {active && } + {isActive && ( + + )} diff --git a/src/pages/Account/TransactionRows/LimitTransactionRow.tsx b/src/pages/Account/TransactionRows/LimitTransactionRow.tsx index 02b119c1e..ebe486315 100644 --- a/src/pages/Account/TransactionRows/LimitTransactionRow.tsx +++ b/src/pages/Account/TransactionRows/LimitTransactionRow.tsx @@ -31,7 +31,7 @@ interface LimitTransactionRowProps { export function LimitTransactionRow({ transaction }: LimitTransactionRowProps) { const { type, status, uid, network, sellToken, buyToken, confirmedTime, cancelOrder } = transaction - const { chainId, library } = useActiveWeb3React() + const { chainId, provider } = useActiveWeb3React() const [flipPrice, setFlipPrice] = useState(true) const notify = useNotificationPopup() const formattedSellToken = useToken(sellToken.tokenAddress) @@ -51,15 +51,15 @@ export function LimitTransactionRow({ transaction }: LimitTransactionRowProps) { : `${formattedSellToken?.symbol} / ${formattedBuyToken?.symbol}` const handleDeleteOpenOrders = useCallback(async () => { - if (chainId && library) { - const response = await cancelOrder?.(uid, library) + if (chainId && provider) { + const response = await cancelOrder?.(uid, provider) if (response) { notify('Open order cancelled successfully.') } else { notify('Failed to cancel open limit order.', false) } } - }, [cancelOrder, chainId, library, notify, uid]) + }, [cancelOrder, chainId, provider, notify, uid]) const handleFlip = useCallback(() => setFlipPrice(flip => !flip), []) diff --git a/src/pages/Pools/AddLiquidity/index.tsx b/src/pages/Pools/AddLiquidity/index.tsx index df6fc0929..47b61ebb7 100644 --- a/src/pages/Pools/AddLiquidity/index.tsx +++ b/src/pages/Pools/AddLiquidity/index.tsx @@ -53,7 +53,7 @@ type CurrencySearchParams = { export default function AddLiquidity() { const { navigate, location } = useRouter() const { currencyIdA, currencyIdB } = useParams() - const { account, chainId, library } = useActiveWeb3React() + const { account, chainId, provider } = useActiveWeb3React() const theme = useTheme() const nativeCurrency = useNativeCurrency() const nativeCurrencyWrapper = useWrappingToken(nativeCurrency) @@ -129,8 +129,8 @@ export default function AddLiquidity() { const addTransaction = useTransactionAdder() async function onAdd() { - if (!chainId || !library || !account) return - const router = getRouterContract(chainId, library, UniswapV2RoutablePlatform.SWAPR, account) + if (!chainId || !provider || !account) return + const router = getRouterContract(chainId, provider, UniswapV2RoutablePlatform.SWAPR, account) const { [Field.CURRENCY_A]: parsedAmountA, [Field.CURRENCY_B]: parsedAmountB } = parsedAmounts if (!parsedAmountA || !parsedAmountB || !currencyA || !currencyB || !deadline) { diff --git a/src/pages/Pools/RemoveLiquidity/index.tsx b/src/pages/Pools/RemoveLiquidity/index.tsx index 0b8811b60..bc6b52c7d 100644 --- a/src/pages/Pools/RemoveLiquidity/index.tsx +++ b/src/pages/Pools/RemoveLiquidity/index.tsx @@ -65,7 +65,7 @@ export default function RemoveLiquidity() { const { navigate } = useRouter() const [currencyA, currencyB] = [useCurrency(currencyIdA) ?? undefined, useCurrency(currencyIdB) ?? undefined] - const { account, chainId, library } = useActiveWeb3React() + const { account, chainId, provider } = useActiveWeb3React() const nativeCurrency = useNativeCurrency() const nativeCurrencyWrapper = useWrappingToken(nativeCurrency) const [tokenA, tokenB] = useMemo( @@ -134,7 +134,7 @@ export default function RemoveLiquidity() { const isArgentWallet = useIsArgentWallet() async function onAttemptToApprove() { - if (!pairContract || !pair || !library || !deadline) throw new Error('missing dependencies') + if (!pairContract || !pair || !provider || !deadline) throw new Error('missing dependencies') const liquidityAmount = parsedAmounts[Field.LIQUIDITY] if (!liquidityAmount) throw new Error('missing liquidity amount') @@ -181,7 +181,7 @@ export default function RemoveLiquidity() { message, }) - library + provider .send('eth_signTypedData_v4', [account, data]) .then(splitSignature) .then(signature => { @@ -225,12 +225,12 @@ export default function RemoveLiquidity() { // tx sending const addTransaction = useTransactionAdder() async function onRemove() { - if (!chainId || !library || !account || !deadline) throw new Error('missing dependencies') + if (!chainId || !provider || !account || !deadline) throw new Error('missing dependencies') const { [Field.CURRENCY_A]: currencyAmountA, [Field.CURRENCY_B]: currencyAmountB } = parsedAmounts if (!currencyAmountA || !currencyAmountB) { throw new Error('missing currency amounts') } - const router = getRouterContract(chainId, library, UniswapV2RoutablePlatform.SWAPR, account) + const router = getRouterContract(chainId, provider, UniswapV2RoutablePlatform.SWAPR, account) const amountsMin = { [Field.CURRENCY_A]: calculateSlippageAmount(currencyAmountA, allowedSlippage)[0], diff --git a/src/pages/Swap/LimitOrderBox/LimitOrderBox.tsx b/src/pages/Swap/LimitOrderBox/LimitOrderBox.tsx index 17d654c72..7baf927f6 100644 --- a/src/pages/Swap/LimitOrderBox/LimitOrderBox.tsx +++ b/src/pages/Swap/LimitOrderBox/LimitOrderBox.tsx @@ -6,14 +6,14 @@ import { LimitOrderForm } from './components/LimitOrderForm/LimitOrderForm' import { supportedChainIdList } from './constants' export function LimitOrderBox() { - const { library, account, chainId } = useActiveWeb3React() + const { provider, account, chainId } = useActiveWeb3React() if (chainId && !supportedChainIdList.includes(chainId)) { redirect('/swap') return null } - if (!library) { + if (!provider) { throw new Error('Limit Orders module requires a Web3 provider') } @@ -25,5 +25,5 @@ export function LimitOrderBox() { throw new Error('Limit Orders module requires an EVM account') } - return + return } diff --git a/src/services/EcoBridge/EcoBridgeProvider.tsx b/src/services/EcoBridge/EcoBridgeProvider.tsx index a6ebbbd05..1e60dba6d 100644 --- a/src/services/EcoBridge/EcoBridgeProvider.tsx +++ b/src/services/EcoBridge/EcoBridgeProvider.tsx @@ -9,7 +9,7 @@ import { ecoBridgeConfig } from './EcoBridge.config' export const EcoBridgeContext = createContext(null) export function EcoBridgeProvider({ children }: { children: ReactNode }) { - const { library, account, chainId } = useActiveWeb3React() + const { provider, account, chainId } = useActiveWeb3React() const [ecoBridge, setEcoBridge] = useState(null) useEffect(() => { @@ -19,24 +19,24 @@ export function EcoBridgeProvider({ children }: { children: ReactNode }) { setEcoBridge(ecoBridgeInstance) } - if (ecoBridge && account && library && chainId) { + if (ecoBridge && account && provider && chainId) { if (!ecoBridge.ready) { await ecoBridge.init({ account, activeChainId: chainId, - activeProvider: library, + activeProvider: provider, }) } else { await ecoBridge.updateSigner({ account, activeChainId: chainId, - activeProvider: library, + activeProvider: provider, }) } } } initEcoBridge() - }, [account, chainId, library, ecoBridge]) + }, [account, chainId, provider, ecoBridge]) return {children} } diff --git a/src/state/application/updater.ts b/src/state/application/updater.ts index ab2f3f871..4063573ec 100644 --- a/src/state/application/updater.ts +++ b/src/state/application/updater.ts @@ -10,7 +10,7 @@ import useIsWindowVisible from '../../hooks/useIsWindowVisible' import { MainnetGasPrice, setConnectorInfo, updateBlockNumber, updateMainnetGasPrices } from './actions' export default function Updater(): null { - const { library, chainId, account } = useActiveWeb3React() + const { provider, chainId, account } = useActiveWeb3React() const dispatch = useDispatch() const windowVisible = useIsWindowVisible() @@ -39,21 +39,21 @@ export default function Updater(): null { // attach/detach listeners useEffect(() => { - if (!library || !chainId || !windowVisible) return undefined + if (!provider || !chainId || !windowVisible) return undefined setState({ chainId, blockNumber: null }) - library + provider .getBlockNumber() .then(blockNumberCallback) .catch(error => console.error(`Failed to get block number for chainId: ${chainId}`, error)) - library.on('block', blockNumberCallback) + provider.on('block', blockNumberCallback) return () => { - library.removeListener('block', blockNumberCallback) + provider.removeListener('block', blockNumberCallback) } - }, [dispatch, chainId, library, blockNumberCallback, windowVisible]) + }, [dispatch, chainId, provider, blockNumberCallback, windowVisible]) const debouncedState = useDebounce(state, 100) const debouncedMainnetGasPrices = useDebounce(mainnetGasPrices, 100) diff --git a/src/state/fees/updater.ts b/src/state/fees/updater.ts index 2a7639420..85c97fffb 100644 --- a/src/state/fees/updater.ts +++ b/src/state/fees/updater.ts @@ -9,16 +9,16 @@ import { chainSupportsSWPR } from '../../utils/chainSupportsSWPR' import { setProtocolFee, setSwapFees } from './actions' export default function Updater() { - const { library, chainId } = useActiveWeb3React() + const { provider, chainId } = useActiveWeb3React() const dispatch = useDispatch() const isSWPRSupportedChain = chainSupportsSWPR(chainId) useEffect(() => { - if (library && chainId && isSWPRSupportedChain) + if (provider && chainId && isSWPRSupportedChain) Promise.all([ - Fetcher.fetchAllSwapFees(chainId, {}, library as any), - Fetcher.fetchProtocolFee(chainId, library as any), + Fetcher.fetchAllSwapFees(chainId, {}, provider as any), + Fetcher.fetchProtocolFee(chainId, provider as any), ]) .then(([swapFees, protocolFee]) => { if (swapFees) dispatch(setSwapFees({ swapFees })) @@ -34,7 +34,7 @@ export default function Updater() { console.error('Cancelled fetch for fees, error:', error) return }) - }, [library, chainId, dispatch, isSWPRSupportedChain]) + }, [provider, chainId, dispatch, isSWPRSupportedChain]) return null } diff --git a/src/state/lists/updater.ts b/src/state/lists/updater.ts index b1d1965ed..443d63034 100644 --- a/src/state/lists/updater.ts +++ b/src/state/lists/updater.ts @@ -13,7 +13,7 @@ import { acceptListUpdate } from './actions' import { useActiveListUrls, useAllLists } from './hooks' export default function Updater(): null { - const { library, chainId, account } = useActiveWeb3React() + const { provider, chainId, account } = useActiveWeb3React() const dispatch = useDispatch() const isWindowVisible = useIsWindowVisible() @@ -33,7 +33,7 @@ export default function Updater(): null { }, [isWindowVisible, chainId, lists, fetchCarrotList, fetchList]) // fetch all lists every 10 minutes, but only after we initialize library - useInterval(fetchAllListsCallback, library ? 1000 * 60 * 10 : null) + useInterval(fetchAllListsCallback, provider ? 1000 * 60 * 10 : null) useEffect(() => { if (account) { @@ -58,7 +58,7 @@ export default function Updater(): null { if (carrotList && !carrotList.current && !carrotList.loadingRequestId && !carrotList.error) { fetchCarrotList().catch((error: Error) => console.debug('carrot list added fetching error', error)) } - }, [dispatch, fetchCarrotList, fetchList, library, lists]) + }, [dispatch, fetchCarrotList, fetchList, provider, lists]) // if any lists from unsupported lists are loaded, check them too (in case new updates since last visit) useEffect(() => { @@ -68,7 +68,7 @@ export default function Updater(): null { fetchList(listUrl).catch((error: Error) => console.debug('list added fetching error', error)) } }) - }, [chainId, dispatch, fetchList, library, lists]) + }, [chainId, dispatch, fetchList, provider, lists]) // automatically update lists if versions are minor/patch useEffect(() => { diff --git a/src/state/multi-chain-links/updater.tsx b/src/state/multi-chain-links/updater.tsx index cef9e635c..98d85a1c0 100644 --- a/src/state/multi-chain-links/updater.tsx +++ b/src/state/multi-chain-links/updater.tsx @@ -1,7 +1,9 @@ +import { ChainId } from '@swapr/sdk' + import { useEffect } from 'react' import { useLocation, useSearchParams } from 'react-router-dom' -import { useActiveWeb3React } from '../../hooks' +import { useActiveWeb3React, useUnsupportedChainIdError } from '../../hooks' import { useIsSwitchingToCorrectChain, useIsSwitchingToCorrectChainUpdater } from './hooks' @@ -11,6 +13,7 @@ export default function Updater(): null { const { pathname } = useLocation() const switchingToCorrectChain = useIsSwitchingToCorrectChain() const updateSwitchingToCorrectChain = useIsSwitchingToCorrectChainUpdater() + const unsupportedChainIdError = useUnsupportedChainIdError() // this effect updates the chain id in the URL. // Scenarios: @@ -28,10 +31,7 @@ export default function Updater(): null { if (!chainId || !connector) return const stringChainId = chainId.toString() const requiredChainId = searchParams.get('chainId') - const requiredChainIdSupported = - requiredChainId && - connector.supportedChainIds && - connector.supportedChainIds.indexOf(parseInt(requiredChainId)) >= 0 + const requiredChainIdSupported = requiredChainId && Boolean(ChainId[parseInt(requiredChainId, 10)]) if (!pathname.includes('/account') && searchParams.get('filter')) { searchParams.delete('filter') @@ -54,6 +54,7 @@ export default function Updater(): null { searchParams, setSearchParams, pathname, + unsupportedChainIdError, ]) return null diff --git a/src/state/swap/hooks.ts b/src/state/swap/hooks.ts index a47fba4a1..01a4e352e 100644 --- a/src/state/swap/hooks.ts +++ b/src/state/swap/hooks.ts @@ -130,7 +130,7 @@ const quoteTTL = 5 * 60 * 1000 // from the current swap inputs, compute the best trade and return it. export function useDerivedSwapInfo(platformOverride?: RoutablePlatform): UseDerivedSwapInfoResult { - const { account, chainId, library: provider } = useActiveWeb3React() + const { account, chainId, provider } = useActiveWeb3React() // Get all options for the input and output currencies const { independentField, diff --git a/src/state/transactions/updater.tsx b/src/state/transactions/updater.tsx index 0e9468a8a..cde0a1de8 100644 --- a/src/state/transactions/updater.tsx +++ b/src/state/transactions/updater.tsx @@ -44,7 +44,7 @@ const RETRY_OPTIONS_BY_CHAIN_ID: { [chainId: number]: RetryOptions } = { const DEFAULT_RETRY_OPTIONS: RetryOptions = { n: 1, minWait: 0, maxWait: 0 } export default function Updater(): null { - const { chainId, library } = useActiveWeb3React() + const { chainId, provider } = useActiveWeb3React() const lastBlockNumber = useBlockNumber() @@ -59,11 +59,11 @@ export default function Updater(): null { const getTransactionReceipt = useCallback( (hash: string) => { - if (!library || !chainId) throw new Error('No library or chainId') + if (!provider || !chainId) throw new Error('No library or chainId') const retryOptions = RETRY_OPTIONS_BY_CHAIN_ID[chainId] ?? DEFAULT_RETRY_OPTIONS return retry( () => - library.getTransactionReceipt(hash).then(receipt => { + provider.getTransactionReceipt(hash).then(receipt => { if (receipt === null) { console.debug('Retrying for hash', hash) throw new RetryableError() @@ -73,7 +73,7 @@ export default function Updater(): null { retryOptions ) }, - [chainId, library] + [chainId, provider] ) /** @@ -96,7 +96,7 @@ export default function Updater(): null { ) useEffect(() => { - if (!chainId || !library || !lastBlockNumber) return + if (!chainId || !provider || !lastBlockNumber) return const cancels = Object.values(transactions) .filter(({ hash }) => shouldCheck(lastBlockNumber, transactions[hash])) @@ -208,7 +208,7 @@ export default function Updater(): null { } }, [ chainId, - library, + provider, transactions, lastBlockNumber, dispatch, diff --git a/src/utils/getLibrary.ts b/src/utils/getLibrary.ts deleted file mode 100644 index 65cb206a1..000000000 --- a/src/utils/getLibrary.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Web3Provider } from '@ethersproject/providers' - -import { REFETCH_DATA_INTERVAL } from '../constants/data' - -export default function getLibrary(provider: any): Web3Provider { - const library = new Web3Provider(provider, 'any') - library.pollingInterval = REFETCH_DATA_INTERVAL - return library -} diff --git a/yarn.lock b/yarn.lock index c2d27b28a..74c648f48 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1614,7 +1614,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.14.5, @babel/runtime@npm:^7.14.6, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.17.2, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.9, @babel/runtime@npm:^7.19.4, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.4.4, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.14.5, @babel/runtime@npm:^7.14.6, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.9, @babel/runtime@npm:^7.19.4, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.4.4, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2": version: 7.21.0 resolution: "@babel/runtime@npm:7.21.0" dependencies: @@ -1623,6 +1623,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.17.2, @babel/runtime@npm:^7.22.6": + version: 7.22.10 + resolution: "@babel/runtime@npm:7.22.10" + dependencies: + regenerator-runtime: ^0.14.0 + checksum: 524d41517e68953dbc73a4f3616b8475e5813f64e28ba89ff5fca2c044d535c2ea1a3f310df1e5bb06162e1f0b401b5c4af73fe6e2519ca2450d9d8c44cf268d + languageName: node + linkType: hard + "@babel/template@npm:^7.18.10, @babel/template@npm:^7.20.7, @babel/template@npm:^7.3.3": version: 7.20.7 resolution: "@babel/template@npm:7.20.7" @@ -1998,9 +2007,9 @@ __metadata: languageName: node linkType: hard -"@coinbase/wallet-sdk@npm:^3.0.4": - version: 3.6.3 - resolution: "@coinbase/wallet-sdk@npm:3.6.3" +"@coinbase/wallet-sdk@npm:3.7.1": + version: 3.7.1 + resolution: "@coinbase/wallet-sdk@npm:3.7.1" dependencies: "@metamask/safe-event-emitter": 2.0.0 "@solana/web3.js": ^1.70.1 @@ -2008,8 +2017,8 @@ __metadata: bn.js: ^5.1.1 buffer: ^6.0.3 clsx: ^1.1.0 - eth-block-tracker: 4.4.3 - eth-json-rpc-filters: 4.2.2 + eth-block-tracker: 6.1.0 + eth-json-rpc-filters: 5.1.0 eth-rpc-errors: 4.0.2 json-rpc-engine: 6.1.0 keccak: ^3.0.1 @@ -2019,7 +2028,7 @@ __metadata: sha.js: ^2.4.11 stream-browserify: ^3.0.0 util: ^0.12.4 - checksum: f2ffd553f64ced32b9e9cf7fd2ec5708a5a8a4c4e5726787d3499db50cc135912c8565ec3c349b716ad8e9c7efeea682a265ffc365c78074a81345d35347621d + checksum: e88c656d08c06d42dcd03006c62162705a7c7dc27171ee721910f76c15c995f0482a314057a582af6e9548e6f49e4a1aff22f33685a33535c9b2550a615efbaf languageName: node linkType: hard @@ -2976,7 +2985,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/address@npm:5.7.0, @ethersproject/address@npm:^5.0.0, @ethersproject/address@npm:^5.0.2, @ethersproject/address@npm:^5.0.8, @ethersproject/address@npm:^5.4.0, @ethersproject/address@npm:^5.7.0": +"@ethersproject/address@npm:5.7.0, @ethersproject/address@npm:^5, @ethersproject/address@npm:^5.0.0, @ethersproject/address@npm:^5.0.2, @ethersproject/address@npm:^5.0.8, @ethersproject/address@npm:^5.4.0, @ethersproject/address@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/address@npm:5.7.0" dependencies: @@ -3113,7 +3122,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/keccak256@npm:5.7.0, @ethersproject/keccak256@npm:^5.0.0, @ethersproject/keccak256@npm:^5.0.0-beta.130, @ethersproject/keccak256@npm:^5.7.0": +"@ethersproject/keccak256@npm:5.7.0, @ethersproject/keccak256@npm:^5.0.0, @ethersproject/keccak256@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/keccak256@npm:5.7.0" dependencies: @@ -3158,7 +3167,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5.0.0, @ethersproject/providers@npm:^5.4.0, @ethersproject/providers@npm:^5.4.4": +"@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5, @ethersproject/providers@npm:^5.0.0, @ethersproject/providers@npm:^5.4.0, @ethersproject/providers@npm:^5.4.4": version: 5.7.2 resolution: "@ethersproject/providers@npm:5.7.2" dependencies: @@ -4611,37 +4620,6 @@ __metadata: languageName: node linkType: hard -"@json-rpc-tools/provider@npm:^1.5.5": - version: 1.7.6 - resolution: "@json-rpc-tools/provider@npm:1.7.6" - dependencies: - "@json-rpc-tools/utils": ^1.7.6 - axios: ^0.21.0 - safe-json-utils: ^1.1.1 - ws: ^7.4.0 - checksum: c60d73511db7f743c3844d499df6a7e243d5f5493127c00fbf9aec74c95d2e80a3033eb22369c428c2deec263a47cd1b334cd76c84859e30355a6dace893a589 - languageName: node - linkType: hard - -"@json-rpc-tools/types@npm:^1.7.6": - version: 1.7.6 - resolution: "@json-rpc-tools/types@npm:1.7.6" - dependencies: - keyvaluestorage-interface: ^1.0.0 - checksum: f23ec7d79a78aa4e896d1dff506108bd3da38015028afd997034e6498c1f3c7bedee70618b0d1a73adf13b4d2a6a91146c2e9505487280b3c376e74f5790e77c - languageName: node - linkType: hard - -"@json-rpc-tools/utils@npm:^1.7.6": - version: 1.7.6 - resolution: "@json-rpc-tools/utils@npm:1.7.6" - dependencies: - "@json-rpc-tools/types": ^1.7.6 - "@pedrouid/environment": ^1.0.1 - checksum: 32cac2e8cbf8a15d95415de8ded483c6206e6df392e129ad51acd90a4842511e931156c59cb26036fb9fae8054e8f20b719a35282304f39cd18683a5293cb67d - languageName: node - linkType: hard - "@juggle/resize-observer@npm:^3.3.1": version: 3.4.0 resolution: "@juggle/resize-observer@npm:3.4.0" @@ -4783,6 +4761,29 @@ __metadata: languageName: node linkType: hard +"@lit-labs/ssr-dom-shim@npm:^1.0.0, @lit-labs/ssr-dom-shim@npm:^1.1.0": + version: 1.1.1 + resolution: "@lit-labs/ssr-dom-shim@npm:1.1.1" + checksum: 7a7add78e3ee570a7b987b9bf85e700b20d35d31c8b54cf4c8b2e3c8458ed4e2b0ff328706e5be7887f0ca8a02878c186e76609defb78f0d1b3c0e6b47c9f6ef + languageName: node + linkType: hard + +"@lit/reactive-element@npm:^1.3.0, @lit/reactive-element@npm:^1.6.0": + version: 1.6.3 + resolution: "@lit/reactive-element@npm:1.6.3" + dependencies: + "@lit-labs/ssr-dom-shim": ^1.0.0 + checksum: 79b58631c38effeabad090070324431da8a22cf0ff665f5e4de35e4d791f984742b3d340c9c7fce996d1124a8da95febc582471b4c237236c770b1300b56ef6e + languageName: node + linkType: hard + +"@lukeed/csprng@npm:^1.0.0": + version: 1.1.0 + resolution: "@lukeed/csprng@npm:1.1.0" + checksum: 926f5f7fc629470ca9a8af355bfcd0271d34535f7be3890f69902432bddc3262029bb5dbe9025542cf6c9883d878692eef2815fc2f3ba5b92e9da1f9eba2e51b + languageName: node + linkType: hard + "@mdx-js/react@npm:^2.1.5": version: 2.3.0 resolution: "@mdx-js/react@npm:2.3.0" @@ -4795,6 +4796,13 @@ __metadata: languageName: node linkType: hard +"@metamask/detect-provider@npm:^1.2.0": + version: 1.2.0 + resolution: "@metamask/detect-provider@npm:1.2.0" + checksum: 2c152534a8dd15bc1430bb5159cdf58993549a644cff344a1ff43f4ede8f041aad72b909e822747f6545de3ed293a740ecffc86a859daf7a925c4096efd61eb3 + languageName: node + linkType: hard + "@metamask/safe-event-emitter@npm:2.0.0, @metamask/safe-event-emitter@npm:^2.0.0": version: 2.0.0 resolution: "@metamask/safe-event-emitter@npm:2.0.0" @@ -4802,6 +4810,103 @@ __metadata: languageName: node linkType: hard +"@metamask/utils@npm:^3.0.1": + version: 3.6.0 + resolution: "@metamask/utils@npm:3.6.0" + dependencies: + "@types/debug": ^4.1.7 + debug: ^4.3.4 + semver: ^7.3.8 + superstruct: ^1.0.3 + checksum: 1ebc6677bb017e4d09d4af143621fe27194d8ed815234cfd76469c3c734dc1db2ea7b577c01a2096c21c04d8c9c4d721d3035b5353fe2ded3b4737f326755e43 + languageName: node + linkType: hard + +"@motionone/animation@npm:^10.15.1": + version: 10.15.1 + resolution: "@motionone/animation@npm:10.15.1" + dependencies: + "@motionone/easing": ^10.15.1 + "@motionone/types": ^10.15.1 + "@motionone/utils": ^10.15.1 + tslib: ^2.3.1 + checksum: 75b7a1e6c47c27073a578eb5559ea0a6e7075862c72e1eb1598403c8c2725f596a95b0369514c9e72f3c7439a9845c468b85a14d4e500df48e09d01b0739d4a7 + languageName: node + linkType: hard + +"@motionone/dom@npm:^10.16.2": + version: 10.16.2 + resolution: "@motionone/dom@npm:10.16.2" + dependencies: + "@motionone/animation": ^10.15.1 + "@motionone/generators": ^10.15.1 + "@motionone/types": ^10.15.1 + "@motionone/utils": ^10.15.1 + hey-listen: ^1.0.8 + tslib: ^2.3.1 + checksum: c75a7de62cd8af575634644bbc2c5abe606ff9000550e7b8d5a62ea691a0784bf18f57035bd1fad4b0148dbdc6db033f2565b6c8f80b87b40fbb232db8fe93aa + languageName: node + linkType: hard + +"@motionone/easing@npm:^10.15.1": + version: 10.15.1 + resolution: "@motionone/easing@npm:10.15.1" + dependencies: + "@motionone/utils": ^10.15.1 + tslib: ^2.3.1 + checksum: cf7cfcf9917525d892334c58282425aafc69d9ab9004c190bfa7cf91317a680e8143f227adc79557424e7f26cdf8478dcbb2ae467e744cebc58195d6f0b8153a + languageName: node + linkType: hard + +"@motionone/generators@npm:^10.15.1": + version: 10.15.1 + resolution: "@motionone/generators@npm:10.15.1" + dependencies: + "@motionone/types": ^10.15.1 + "@motionone/utils": ^10.15.1 + tslib: ^2.3.1 + checksum: 0eb6797a64d536bb5c26628343d6594a2ebc45c3c447b8ce442b4ac3a41be847b860ac009bda7968fc7d339d2ee49b18bfe36306c5dd99cf17c7d84c82de93f3 + languageName: node + linkType: hard + +"@motionone/svelte@npm:^10.16.2": + version: 10.16.2 + resolution: "@motionone/svelte@npm:10.16.2" + dependencies: + "@motionone/dom": ^10.16.2 + tslib: ^2.3.1 + checksum: 066570d991444f9b8e70189b488d563260cf7aadc2e4718e60b66e2871ad0d798e4a39282035c7f0d35a6b2118c36ee222446a8ae0919265860f0d808fcd2837 + languageName: node + linkType: hard + +"@motionone/types@npm:^10.15.1": + version: 10.15.1 + resolution: "@motionone/types@npm:10.15.1" + checksum: 98091f7dca257508d94d1080678c433da39a814e8e58aaa742212bf6c2a5b5e2120a6251a06e3ea522219ce6d1b6eb6aa2cab224b803fe52789033d8398ef0aa + languageName: node + linkType: hard + +"@motionone/utils@npm:^10.15.1": + version: 10.15.1 + resolution: "@motionone/utils@npm:10.15.1" + dependencies: + "@motionone/types": ^10.15.1 + hey-listen: ^1.0.8 + tslib: ^2.3.1 + checksum: 6ef13cd6637ec87c340e5536f849f8c40d30cc90139a3856d11cd70d78e3740f8815b0e63564fefd23c05a060da7a0ea5395390549606ed8801a7b832b74e04e + languageName: node + linkType: hard + +"@motionone/vue@npm:^10.16.2": + version: 10.16.2 + resolution: "@motionone/vue@npm:10.16.2" + dependencies: + "@motionone/dom": ^10.16.2 + tslib: ^2.3.1 + checksum: 37732f679bdf84debb36493e12fe2604ca3d1812ce8271e39dbe28bb4e59d71841d6821a5f5dd07ded918e260f8567842b835ea597572a38007e8a11106d1f0f + languageName: node + linkType: hard + "@multiformats/base-x@npm:^4.0.1": version: 4.0.1 resolution: "@multiformats/base-x@npm:4.0.1" @@ -4820,16 +4925,28 @@ __metadata: languageName: node linkType: hard -"@nestjs/common@npm:8.4.4": - version: 8.4.4 - resolution: "@nestjs/common@npm:8.4.4" +"@nestjs/axios@npm:0.1.0": + version: 0.1.0 + resolution: "@nestjs/axios@npm:0.1.0" + dependencies: + axios: 0.27.2 + peerDependencies: + "@nestjs/common": ^7.0.0 || ^8.0.0 || ^9.0.0 + reflect-metadata: ^0.1.12 + rxjs: ^6.0.0 || ^7.0.0 + checksum: 72929b25caacb85517bae962b13d865a31aa3984aa9e55305e0a2306e54338fe51a7eb38ca38cab0fe8b4116fb35219bd02c8b0c4cac70e7b5aeb84d03a1db3f + languageName: node + linkType: hard + +"@nestjs/common@npm:9.3.11": + version: 9.3.11 + resolution: "@nestjs/common@npm:9.3.11" dependencies: - axios: 0.26.1 iterare: 1.2.1 - tslib: 2.3.1 - uuid: 8.3.2 + tslib: 2.5.0 + uid: 2.0.1 peerDependencies: - cache-manager: "*" + cache-manager: <=5 class-transformer: "*" class-validator: "*" reflect-metadata: ^0.1.12 @@ -4841,26 +4958,25 @@ __metadata: optional: true class-validator: optional: true - checksum: bd0326a7a52b4ca819ca8790cec1e649ba0067d2eee54a32aabe890729f5d7dd6ecbf834cf68aa6727974a693981a4a6c119574dd12560914041380010632174 + checksum: c39dfa9f02268e3f7fa22c4e9eecff0cfbee39c4d4dd0efc757a52117696dc9aec1f87588252b8b267a18469a6c12987707708b44f97ccbb5c6297396c0d9c00 languageName: node linkType: hard -"@nestjs/core@npm:8.4.4": - version: 8.4.4 - resolution: "@nestjs/core@npm:8.4.4" +"@nestjs/core@npm:9.3.11": + version: 9.3.11 + resolution: "@nestjs/core@npm:9.3.11" dependencies: "@nuxtjs/opencollective": 0.3.2 fast-safe-stringify: 2.1.1 iterare: 1.2.1 - object-hash: 3.0.0 path-to-regexp: 3.2.0 - tslib: 2.3.1 - uuid: 8.3.2 + tslib: 2.5.0 + uid: 2.0.1 peerDependencies: - "@nestjs/common": ^8.0.0 - "@nestjs/microservices": ^8.0.0 - "@nestjs/platform-express": ^8.0.0 - "@nestjs/websockets": ^8.0.0 + "@nestjs/common": ^9.0.0 + "@nestjs/microservices": ^9.0.0 + "@nestjs/platform-express": ^9.0.0 + "@nestjs/websockets": ^9.0.0 reflect-metadata: ^0.1.12 rxjs: ^7.1.0 peerDependenciesMeta: @@ -4870,7 +4986,7 @@ __metadata: optional: true "@nestjs/websockets": optional: true - checksum: 65cc143c8e43cf009a94988a25e5c85cdab4c915990b8f840a06e7029d364e52baa381e3e0d05590f057332e0bd8c4ffce73b59f61e062ebe50ba166de156b58 + checksum: 39d49e5b16cc260887233dd6701dbc53c073dc7522975d592f6c355db1f42fcf31eeaf300b9d03c63943f7330ecee910281cb78bb66d1c2d938d9b13491e70b4 languageName: node linkType: hard @@ -4883,10 +4999,12 @@ __metadata: languageName: node linkType: hard -"@noble/ed25519@npm:^1.7.0": - version: 1.7.1 - resolution: "@noble/ed25519@npm:1.7.1" - checksum: b8e50306ac70f5cecc349111997e72e897b47a28d406b96cf95d0ebe7cbdefb8380d26117d7847d94102281db200aa3a494e520f9fc12e2f292e0762cb0fa333 +"@noble/curves@npm:^1.0.0": + version: 1.1.0 + resolution: "@noble/curves@npm:1.1.0" + dependencies: + "@noble/hashes": 1.3.1 + checksum: 2658cdd3f84f71079b4e3516c47559d22cf4b55c23ac8ee9d2b1f8e5b72916d9689e59820e0f9d9cb4a46a8423af5b56dc6bb7782405c88be06a015180508db5 languageName: node linkType: hard @@ -4897,7 +5015,14 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:^1.1.2, @noble/hashes@npm:~1.1.1": +"@noble/hashes@npm:1.3.1, @noble/hashes@npm:^1.3.1": + version: 1.3.1 + resolution: "@noble/hashes@npm:1.3.1" + checksum: 7fdefc0f7a0c1ec27acc6ff88841793e3f93ec4ce6b8a6a12bfc0dd70ae6b7c4c82fe305fdfeda1735d5ad4a9eebe761e6693b3d355689c559e91242f4bc95b1 + languageName: node + linkType: hard + +"@noble/hashes@npm:~1.1.1": version: 1.1.5 resolution: "@noble/hashes@npm:1.1.5" checksum: de3f095a7ac1cbf5b4b3d09f193288d4f2eec35fbadf2ed9fd7e47d8a3042fef410052ba62dc0296a185f994c11192f5357fdb1bd9178c905efd82e946c53b00 @@ -4911,13 +5036,6 @@ __metadata: languageName: node linkType: hard -"@noble/secp256k1@npm:^1.6.3": - version: 1.7.0 - resolution: "@noble/secp256k1@npm:1.7.0" - checksum: 540a2b8e527ee1e5522af1c430e54945ad373883cac983b115136cd0950efa1f2c473ee6a36d8e69b6809b3ee586276de62f5fa705c77a9425721e81bada8116 - languageName: node - linkType: hard - "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -4978,28 +5096,29 @@ __metadata: languageName: node linkType: hard -"@openapitools/openapi-generator-cli@npm:^2.5.1": - version: 2.5.2 - resolution: "@openapitools/openapi-generator-cli@npm:2.5.2" +"@openapitools/openapi-generator-cli@npm:^2.7.0": + version: 2.7.0 + resolution: "@openapitools/openapi-generator-cli@npm:2.7.0" dependencies: - "@nestjs/common": 8.4.4 - "@nestjs/core": 8.4.4 + "@nestjs/axios": 0.1.0 + "@nestjs/common": 9.3.11 + "@nestjs/core": 9.3.11 "@nuxtjs/opencollective": 0.3.2 chalk: 4.1.2 commander: 8.3.0 - compare-versions: 4.1.3 + compare-versions: 4.1.4 concurrently: 6.5.1 console.table: 0.10.0 - fs-extra: 10.0.1 + fs-extra: 10.1.0 glob: 7.1.6 - inquirer: 8.2.2 + inquirer: 8.2.5 lodash: 4.17.21 reflect-metadata: 0.1.13 - rxjs: 7.5.5 + rxjs: 7.8.0 tslib: 2.0.3 bin: openapi-generator-cli: main.js - checksum: 77a77be03877311b55c8a749646cebd6a1e330eb5c2edf64695b20ae575c3cd8c6c316d2099866f7a9ed9fe545847472f4ec44aab133d76b707c085e77b70605 + checksum: 92ca36779b43fe1e4868cd89bde4cb96918868aa62c8a69a9e199711d8e7093bab67f484d266fcbf37ca4ad87e4e91ea5759fb322c7999a299f5bfdc179065b8 languageName: node linkType: hard @@ -5063,13 +5182,6 @@ __metadata: languageName: node linkType: hard -"@pedrouid/environment@npm:^1.0.1": - version: 1.0.1 - resolution: "@pedrouid/environment@npm:1.0.1" - checksum: fd88340ad760f26340a2816c3677f0ca913976e315880891c3de3f028fe64abc9704fb904234dce77a1ff15c22d0b6cbf1d4199a76de6695c2aed8353ce20590 - languageName: node - linkType: hard - "@playwright/test@npm:^1.27.1": version: 1.29.1 resolution: "@playwright/test@npm:1.29.1" @@ -5768,26 +5880,25 @@ __metadata: linkType: hard "@solana/web3.js@npm:^1.70.1": - version: 1.73.0 - resolution: "@solana/web3.js@npm:1.73.0" + version: 1.78.4 + resolution: "@solana/web3.js@npm:1.78.4" dependencies: - "@babel/runtime": ^7.12.5 - "@noble/ed25519": ^1.7.0 - "@noble/hashes": ^1.1.2 - "@noble/secp256k1": ^1.6.3 + "@babel/runtime": ^7.22.6 + "@noble/curves": ^1.0.0 + "@noble/hashes": ^1.3.1 "@solana/buffer-layout": ^4.0.0 - agentkeepalive: ^4.2.1 + agentkeepalive: ^4.3.0 bigint-buffer: ^1.1.5 - bn.js: ^5.0.0 + bn.js: ^5.2.1 borsh: ^0.7.0 bs58: ^4.0.1 - buffer: 6.0.1 + buffer: 6.0.3 fast-stable-stringify: ^1.0.0 - jayson: ^3.4.4 - node-fetch: 2 - rpc-websockets: ^7.5.0 + jayson: ^4.1.0 + node-fetch: ^2.6.12 + rpc-websockets: ^7.5.1 superstruct: ^0.14.2 - checksum: 8bd212d3fce35ad4ad4bc2490181c3d18b6abda10b253fde5a7c6b1620cdb27f37f96d5739d3058abeded76e736b35439cae2deddb3dfd4aae8ffcdf7233223c + checksum: e1c44c6cbec87cdfd4d6d23b4241b746e14ed3a9ca73d596693758d91ac825cecf579345da3b0b7bb5e54b6794791bc0eac02cadf11f1ec79e859b6536f26f11 languageName: node linkType: hard @@ -5800,6 +5911,176 @@ __metadata: languageName: node linkType: hard +"@stablelib/aead@npm:^1.0.1": + version: 1.0.1 + resolution: "@stablelib/aead@npm:1.0.1" + checksum: 1a6f68d138f105d17dd65349751515bd252ab0498c77255b8555478d28415600dde493f909eb718245047a993f838dfae546071e1687566ffb7b8c3e10c918d9 + languageName: node + linkType: hard + +"@stablelib/binary@npm:^1.0.1": + version: 1.0.1 + resolution: "@stablelib/binary@npm:1.0.1" + dependencies: + "@stablelib/int": ^1.0.1 + checksum: dca9b98eb1f56a4002b5b9e7351fbc49f3d8616af87007c01e833bd763ac89214eb5f3b7e18673c91ce59d4a0e4856a2eb661ace33d39f17fb1ad267271fccd8 + languageName: node + linkType: hard + +"@stablelib/bytes@npm:^1.0.1": + version: 1.0.1 + resolution: "@stablelib/bytes@npm:1.0.1" + checksum: 456267e08c3384abcb71d3ad3e97a6f99185ad754bac016f501ebea4e4886f37900589143b57e33bdbbf513a92fc89368c15dd4517e0540d0bdc79ecdf9dd087 + languageName: node + linkType: hard + +"@stablelib/chacha20poly1305@npm:1.0.1": + version: 1.0.1 + resolution: "@stablelib/chacha20poly1305@npm:1.0.1" + dependencies: + "@stablelib/aead": ^1.0.1 + "@stablelib/binary": ^1.0.1 + "@stablelib/chacha": ^1.0.1 + "@stablelib/constant-time": ^1.0.1 + "@stablelib/poly1305": ^1.0.1 + "@stablelib/wipe": ^1.0.1 + checksum: 81f1a32330838d31e4dc3144d76eba7244b56d9ea38c1f604f2c34d93ed8e67e9a6167d2cfd72254c13cc46dfc1f5ce5157b37939a575295d69d9144abb4e4fb + languageName: node + linkType: hard + +"@stablelib/chacha@npm:^1.0.1": + version: 1.0.1 + resolution: "@stablelib/chacha@npm:1.0.1" + dependencies: + "@stablelib/binary": ^1.0.1 + "@stablelib/wipe": ^1.0.1 + checksum: f061f36c4ca4bf177dd7cac11e7c65ced164f141b6065885141ae5a55f32e16ba0209aefcdcc966aef013f1da616ce901a3a80653b4b6f833cf7e3397ae2d6bd + languageName: node + linkType: hard + +"@stablelib/constant-time@npm:^1.0.1": + version: 1.0.1 + resolution: "@stablelib/constant-time@npm:1.0.1" + checksum: dba4f4bf508de2ff15f7f0cbd875e70391aa3ba3698290fe1ed2feb151c243ba08a90fc6fb390ec2230e30fcc622318c591a7c0e35dcb8150afb50c797eac3d7 + languageName: node + linkType: hard + +"@stablelib/ed25519@npm:^1.0.2": + version: 1.0.3 + resolution: "@stablelib/ed25519@npm:1.0.3" + dependencies: + "@stablelib/random": ^1.0.2 + "@stablelib/sha512": ^1.0.1 + "@stablelib/wipe": ^1.0.1 + checksum: e18279de078edac67396ba07dbb862dce0fe89efa8141c21a5b04108a29914bd51636019522323ca5097ec596a90b3028ed64e88ee009b0ac7de7c1ab6499ccb + languageName: node + linkType: hard + +"@stablelib/hash@npm:^1.0.1": + version: 1.0.1 + resolution: "@stablelib/hash@npm:1.0.1" + checksum: 3ff1f12d1a4082aaf4b6cdf40c2010aabe5c4209d3b40b97b5bbb0d9abc0ee94abdc545e57de0614afaea807ca0212ac870e247ec8f66cdce91ec39ce82948cf + languageName: node + linkType: hard + +"@stablelib/hkdf@npm:1.0.1": + version: 1.0.1 + resolution: "@stablelib/hkdf@npm:1.0.1" + dependencies: + "@stablelib/hash": ^1.0.1 + "@stablelib/hmac": ^1.0.1 + "@stablelib/wipe": ^1.0.1 + checksum: 9d45e303715a1835c8612b78e6c1b9d2b7463699b484241d8681fb5c17e0f2bbde5ce211c882134b64616a402e09177baeba80426995ff227b3654a155ab225d + languageName: node + linkType: hard + +"@stablelib/hmac@npm:^1.0.1": + version: 1.0.1 + resolution: "@stablelib/hmac@npm:1.0.1" + dependencies: + "@stablelib/constant-time": ^1.0.1 + "@stablelib/hash": ^1.0.1 + "@stablelib/wipe": ^1.0.1 + checksum: e3b93f7144a5846a6e30213278f7570de6d3f9d09131b95ce76d5c5c8bf37bf5d1830f2ee8d847555707271dbfd6e2461221719fd4d8b27ff06b9dd689c0ec21 + languageName: node + linkType: hard + +"@stablelib/int@npm:^1.0.1": + version: 1.0.1 + resolution: "@stablelib/int@npm:1.0.1" + checksum: 65bfbf50a382eea70c68e05366bf379cfceff8fbc076f1c267ef2f2411d7aed64fd140c415cb6c29f19a3910d3b8b7805d4b32ad5721a5007a8e744a808c7ae3 + languageName: node + linkType: hard + +"@stablelib/keyagreement@npm:^1.0.1": + version: 1.0.1 + resolution: "@stablelib/keyagreement@npm:1.0.1" + dependencies: + "@stablelib/bytes": ^1.0.1 + checksum: 3c8ec904dd50f72f3162f5447a0fa8f1d9ca6e24cd272d3dbe84971267f3b47f9bd5dc4e4eeedf3fbac2fe01f2d9277053e57c8e60db8c5544bfb35c62d290dd + languageName: node + linkType: hard + +"@stablelib/poly1305@npm:^1.0.1": + version: 1.0.1 + resolution: "@stablelib/poly1305@npm:1.0.1" + dependencies: + "@stablelib/constant-time": ^1.0.1 + "@stablelib/wipe": ^1.0.1 + checksum: 70b845bb0481c66b7ba3f3865d01e4c67a4dffc9616fc6de1d23efc5e828ec09de25f8e3be4e1f15a23b8e87e3036ee3d949c2fd4785047e6f7028bbec0ead18 + languageName: node + linkType: hard + +"@stablelib/random@npm:^1.0.1, @stablelib/random@npm:^1.0.2": + version: 1.0.2 + resolution: "@stablelib/random@npm:1.0.2" + dependencies: + "@stablelib/binary": ^1.0.1 + "@stablelib/wipe": ^1.0.1 + checksum: f5ace0a588dc4c21f01cb85837892d4c872e994ae77a58a8eb7dd61aa0b26fb1e9b46b0445e71af57d963ef7d9f5965c64258fc0d04df7b2947bc48f2d3560c5 + languageName: node + linkType: hard + +"@stablelib/sha256@npm:1.0.1": + version: 1.0.1 + resolution: "@stablelib/sha256@npm:1.0.1" + dependencies: + "@stablelib/binary": ^1.0.1 + "@stablelib/hash": ^1.0.1 + "@stablelib/wipe": ^1.0.1 + checksum: 38669871e1bda72eb537629ebceac1c72da8890273a9fbe088f81f6d14c1ec04e78be8c5b455380a06c67f8e62b2508e11e9063fcc257dbaa1b5c27ac756ba77 + languageName: node + linkType: hard + +"@stablelib/sha512@npm:^1.0.1": + version: 1.0.1 + resolution: "@stablelib/sha512@npm:1.0.1" + dependencies: + "@stablelib/binary": ^1.0.1 + "@stablelib/hash": ^1.0.1 + "@stablelib/wipe": ^1.0.1 + checksum: b7c82f7608a35948a2147a534c0c9afc80deab3fd5f72a2e27b2454e7c0c6944d39381be3abcb1b7fac5b824ba030ae3e98209d517a579c143d8ed63930b042f + languageName: node + linkType: hard + +"@stablelib/wipe@npm:^1.0.1": + version: 1.0.1 + resolution: "@stablelib/wipe@npm:1.0.1" + checksum: 287802eb146810a46ba72af70b82022caf83a8aeebde23605f5ee0decf64fe2b97a60c856e43b6617b5801287c30cfa863cfb0469e7fcde6f02d143cf0c6cbf4 + languageName: node + linkType: hard + +"@stablelib/x25519@npm:^1.0.3": + version: 1.0.3 + resolution: "@stablelib/x25519@npm:1.0.3" + dependencies: + "@stablelib/keyagreement": ^1.0.1 + "@stablelib/random": ^1.0.2 + "@stablelib/wipe": ^1.0.1 + checksum: f8537066b542b6770c1b5b2ae5ad0688d1b986e4bf818067c152c123a5471531987bbf024224f75f387f481ccc5b628e391e49e92102b8b1a3e2d449d6105402 + languageName: node + linkType: hard + "@storybook/addon-actions@npm:7.0.22": version: 7.0.22 resolution: "@storybook/addon-actions@npm:7.0.22" @@ -7453,6 +7734,7 @@ __metadata: dependencies: "@apollo/client": ^3.7.5 "@arbitrum/sdk": 3.0.0-beta.12 + "@coinbase/wallet-sdk": 3.7.1 "@connext/nxtp-sdk": ^0.1.36 "@graphql-codegen/cli": 3.3.0 "@graphql-codegen/introspection": 3.0.1 @@ -7461,7 +7743,7 @@ __metadata: "@graphql-codegen/typescript-react-apollo": ^3.3.7 "@lifi/sdk": 1.7.2 "@lifi/types": 2.1.1 - "@openapitools/openapi-generator-cli": ^2.5.1 + "@openapitools/openapi-generator-cli": ^2.7.0 "@popperjs/core": ^2.11.6 "@reach/dialog": ^0.18.0 "@reach/portal": ^0.17.0 @@ -7510,11 +7792,11 @@ __metadata: "@typescript-eslint/parser": ^5.49.0 "@uniswap/token-lists": ^1.0.0-beta.27 "@uniswap/v3-periphery": 1.4.1 - "@web3-react/core": ^6.1.9 - "@web3-react/injected-connector": ^6.0.7 - "@web3-react/network-connector": ^6.2.9 - "@web3-react/walletconnect-connector": ^6.2.13 - "@web3-react/walletlink-connector": ^6.2.14 + "@web3-react/coinbase-wallet": 8.2.2 + "@web3-react/core": 8.2.2 + "@web3-react/metamask": 8.2.3 + "@web3-react/network": 8.2.2 + "@web3-react/walletconnect-v2": 8.5.0 ajv: ^8.12.0 ajv-formats: ^2.1.1 aos: ^2.3.4 @@ -9717,6 +9999,30 @@ __metadata: languageName: node linkType: hard +"@walletconnect/core@npm:2.9.2": + version: 2.9.2 + resolution: "@walletconnect/core@npm:2.9.2" + dependencies: + "@walletconnect/heartbeat": 1.2.1 + "@walletconnect/jsonrpc-provider": 1.0.13 + "@walletconnect/jsonrpc-types": 1.0.3 + "@walletconnect/jsonrpc-utils": 1.0.8 + "@walletconnect/jsonrpc-ws-connection": 1.0.13 + "@walletconnect/keyvaluestorage": ^1.0.2 + "@walletconnect/logger": ^2.0.1 + "@walletconnect/relay-api": ^1.0.9 + "@walletconnect/relay-auth": ^1.0.4 + "@walletconnect/safe-json": ^1.0.2 + "@walletconnect/time": ^1.0.2 + "@walletconnect/types": 2.9.2 + "@walletconnect/utils": 2.9.2 + events: ^3.3.0 + lodash.isequal: 4.5.0 + uint8arrays: ^3.1.0 + checksum: f96fe5147ddae5ab08c72e946ebfc40b218ca2a985e243ebcbf2346c79286b33de9c1f6dfb0f9cb81ae52f29725b3437a8af8b856ed55ed3a089e06546b3db06 + languageName: node + linkType: hard + "@walletconnect/core@npm:^1.8.0": version: 1.8.0 resolution: "@walletconnect/core@npm:1.8.0" @@ -9762,19 +10068,46 @@ __metadata: languageName: node linkType: hard -"@walletconnect/ethereum-provider@npm:^1.7.1": - version: 1.8.0 - resolution: "@walletconnect/ethereum-provider@npm:1.8.0" +"@walletconnect/ethereum-provider@npm:^2.9.2": + version: 2.9.2 + resolution: "@walletconnect/ethereum-provider@npm:2.9.2" dependencies: - "@walletconnect/client": ^1.8.0 - "@walletconnect/jsonrpc-http-connection": ^1.0.2 - "@walletconnect/jsonrpc-provider": ^1.0.5 - "@walletconnect/signer-connection": ^1.8.0 - "@walletconnect/types": ^1.8.0 - "@walletconnect/utils": ^1.8.0 - eip1193-provider: 1.0.1 - eventemitter3: 4.0.7 - checksum: eaf8a113498673d023fc96bec1248bc9640d0bd78beea906f4d9dc5388db236c1436c00301e30f7b46abec59b22e0bb6d72e5a08837d3d021f096677a89005d6 + "@walletconnect/jsonrpc-http-connection": ^1.0.7 + "@walletconnect/jsonrpc-provider": ^1.0.13 + "@walletconnect/jsonrpc-types": ^1.0.3 + "@walletconnect/jsonrpc-utils": ^1.0.8 + "@walletconnect/sign-client": 2.9.2 + "@walletconnect/types": 2.9.2 + "@walletconnect/universal-provider": 2.9.2 + "@walletconnect/utils": 2.9.2 + events: ^3.3.0 + peerDependencies: + "@walletconnect/modal": ">=2" + peerDependenciesMeta: + "@walletconnect/modal": + optional: true + checksum: 80cb896c5da6247b68a28ef08e5a8a32beb3e6a2b70a3543aaced09a618e73b5437af36f9884003333021566405e19938726f1f02241aa69f83f5a0df5a4150a + languageName: node + linkType: hard + +"@walletconnect/events@npm:^1.0.1": + version: 1.0.1 + resolution: "@walletconnect/events@npm:1.0.1" + dependencies: + keyvaluestorage-interface: ^1.0.0 + tslib: 1.14.1 + checksum: d28aa4dcc981bdaf38f0aeed979731ca793cead7e7a4ee730a9146d99d89db09a86c8e3192ed860638283276961c0723ba00cf3b8776f0692b36ec7df6c01be4 + languageName: node + linkType: hard + +"@walletconnect/heartbeat@npm:1.2.1": + version: 1.2.1 + resolution: "@walletconnect/heartbeat@npm:1.2.1" + dependencies: + "@walletconnect/events": ^1.0.1 + "@walletconnect/time": ^1.0.2 + tslib: 1.14.1 + checksum: df4d492a2d336283f834bc205c09b795f85cd507a61b14745dc2124e510a250fefbd83d51216f93df2e0aa0cf8120134db2679de8019eddd63877e9928997952 languageName: node linkType: hard @@ -9801,30 +10134,40 @@ __metadata: languageName: node linkType: hard -"@walletconnect/jsonrpc-http-connection@npm:^1.0.2": - version: 1.0.4 - resolution: "@walletconnect/jsonrpc-http-connection@npm:1.0.4" +"@walletconnect/jsonrpc-http-connection@npm:^1.0.7": + version: 1.0.7 + resolution: "@walletconnect/jsonrpc-http-connection@npm:1.0.7" dependencies: - "@walletconnect/jsonrpc-utils": ^1.0.4 + "@walletconnect/jsonrpc-utils": ^1.0.6 "@walletconnect/safe-json": ^1.0.1 cross-fetch: ^3.1.4 tslib: 1.14.1 - checksum: 195835deb7e4b26e48f11b0096d9dcff7bbed7fc4577b7528fbfe56e68f60574789efcc2caf354dc9ef09abd7ada6f64a9d1c6d5949a49e80557d114b667f090 + checksum: c4efcd46d4b344727ca6879badca2c2f855499ac76c8dace5d118f4423167adce34e41a99f3dcab0febb945ce51c6ef0ac8556567d5e38d8dad864b131eb5b00 languageName: node linkType: hard -"@walletconnect/jsonrpc-provider@npm:^1.0.5": - version: 1.0.6 - resolution: "@walletconnect/jsonrpc-provider@npm:1.0.6" +"@walletconnect/jsonrpc-provider@npm:1.0.13, @walletconnect/jsonrpc-provider@npm:^1.0.13": + version: 1.0.13 + resolution: "@walletconnect/jsonrpc-provider@npm:1.0.13" dependencies: - "@walletconnect/jsonrpc-utils": ^1.0.4 - "@walletconnect/safe-json": ^1.0.1 + "@walletconnect/jsonrpc-utils": ^1.0.8 + "@walletconnect/safe-json": ^1.0.2 + tslib: 1.14.1 + checksum: 497dfdd9f988432f171bc98336f3583c679059f0a166f95d6e51c8e1937c17abd9a5fd3aadfcebf6964bae14edd1e05fb0453e370d6e3bbc7ff4919fcad7c478 + languageName: node + linkType: hard + +"@walletconnect/jsonrpc-types@npm:1.0.3, @walletconnect/jsonrpc-types@npm:^1.0.3": + version: 1.0.3 + resolution: "@walletconnect/jsonrpc-types@npm:1.0.3" + dependencies: + keyvaluestorage-interface: ^1.0.0 tslib: 1.14.1 - checksum: cc323c4a6a29693a0cb920dd6f136ed55a2a12c329b5568f9519cf1a5e5e2e8b78bfa45c2eacaa6cde43609afae82debed29b5e3ba5c5ec722d1dd1bb9ea0901 + checksum: 26e6f1d8f4207328d3df465c36d0d67844772863dc8e9e78e6cfec417cfc359300eab049d99ea558982b3f0948f4ca26b75253bdf635ffd82ffe30a5276b790c languageName: node linkType: hard -"@walletconnect/jsonrpc-types@npm:^1.0.1, @walletconnect/jsonrpc-types@npm:^1.0.2": +"@walletconnect/jsonrpc-types@npm:^1.0.2": version: 1.0.2 resolution: "@walletconnect/jsonrpc-types@npm:1.0.2" dependencies: @@ -9834,7 +10177,18 @@ __metadata: languageName: node linkType: hard -"@walletconnect/jsonrpc-utils@npm:^1.0.3, @walletconnect/jsonrpc-utils@npm:^1.0.4": +"@walletconnect/jsonrpc-utils@npm:1.0.8, @walletconnect/jsonrpc-utils@npm:^1.0.6, @walletconnect/jsonrpc-utils@npm:^1.0.7, @walletconnect/jsonrpc-utils@npm:^1.0.8": + version: 1.0.8 + resolution: "@walletconnect/jsonrpc-utils@npm:1.0.8" + dependencies: + "@walletconnect/environment": ^1.0.1 + "@walletconnect/jsonrpc-types": ^1.0.3 + tslib: 1.14.1 + checksum: f43a85dfce8150c3e3d1f009e8d8241ab8e10b026ea435f0918edf4db6b3a17586ba9d9c54a93cc61e4d3c685611e5bd5954fc377a581af503acd38e6d84c2ef + languageName: node + linkType: hard + +"@walletconnect/jsonrpc-utils@npm:^1.0.3": version: 1.0.4 resolution: "@walletconnect/jsonrpc-utils@npm:1.0.4" dependencies: @@ -9845,6 +10199,47 @@ __metadata: languageName: node linkType: hard +"@walletconnect/jsonrpc-ws-connection@npm:1.0.13": + version: 1.0.13 + resolution: "@walletconnect/jsonrpc-ws-connection@npm:1.0.13" + dependencies: + "@walletconnect/jsonrpc-utils": ^1.0.6 + "@walletconnect/safe-json": ^1.0.2 + events: ^3.3.0 + tslib: 1.14.1 + ws: ^7.5.1 + checksum: f2253b17564f7622e69b1252830f05efdf7f4d58b120adb3a3e950c2087845171c912307c39948d0b869aa8610688b83f54f54de4657091f7431aea95a59f8b9 + languageName: node + linkType: hard + +"@walletconnect/keyvaluestorage@npm:^1.0.2": + version: 1.0.2 + resolution: "@walletconnect/keyvaluestorage@npm:1.0.2" + dependencies: + safe-json-utils: ^1.1.1 + tslib: 1.14.1 + peerDependencies: + "@react-native-async-storage/async-storage": 1.x + lokijs: 1.x + peerDependenciesMeta: + "@react-native-async-storage/async-storage": + optional: true + lokijs: + optional: true + checksum: d695c2efcfa013a43cfaa20c85281df7d364a4452d11a4312a695298bd0e50d04b0e21c828f33f46fb020ea9796e60a6b23041a85f29bd10beeba7d0da24539f + languageName: node + linkType: hard + +"@walletconnect/logger@npm:^2.0.1": + version: 2.0.1 + resolution: "@walletconnect/logger@npm:2.0.1" + dependencies: + pino: 7.11.0 + tslib: 1.14.1 + checksum: b686679d176d5d22a3441d93e71be2652e6c447682a6d6f014baf7c2d9dcd23b93e2f434d4410e33cc532d068333f6b3c1d899aeb0d6f60cc296ed17f57b0c2c + languageName: node + linkType: hard + "@walletconnect/mobile-registry@npm:^1.4.0": version: 1.4.0 resolution: "@walletconnect/mobile-registry@npm:1.4.0" @@ -9852,6 +10247,37 @@ __metadata: languageName: node linkType: hard +"@walletconnect/modal-core@npm:2.6.1": + version: 2.6.1 + resolution: "@walletconnect/modal-core@npm:2.6.1" + dependencies: + valtio: 1.11.0 + checksum: 3c1dcb865cc0737bb0e77b7103bde7167e64a8790c628427814b825dafa133c7cb3baf5184314de35a2dbd743a3b0978ef4abc86c3bb63d051f8368e3bdba67a + languageName: node + linkType: hard + +"@walletconnect/modal-ui@npm:2.6.1": + version: 2.6.1 + resolution: "@walletconnect/modal-ui@npm:2.6.1" + dependencies: + "@walletconnect/modal-core": 2.6.1 + lit: 2.7.6 + motion: 10.16.2 + qrcode: 1.5.3 + checksum: 34408c784659564ef57fe59227f5f0a307ec34dc9e73c6c7b72e4c03054024ffbbf1d4ed73425a2606c978aaa3518629eba61adf3fc31263d80a4c13cf1c77d2 + languageName: node + linkType: hard + +"@walletconnect/modal@npm:^2.6.1": + version: 2.6.1 + resolution: "@walletconnect/modal@npm:2.6.1" + dependencies: + "@walletconnect/modal-core": 2.6.1 + "@walletconnect/modal-ui": 2.6.1 + checksum: f48107abe4594b3a6849a4eae1a3fb9fb37ded25ef390c084e9098ceed58ace1bcb723abfa15027b462d75226a907bbbfc1d48e1414f882b5d7f83903da617bb + languageName: node + linkType: hard + "@walletconnect/qrcode-modal@npm:^1.8.0": version: 1.8.0 resolution: "@walletconnect/qrcode-modal@npm:1.8.0" @@ -9878,6 +10304,30 @@ __metadata: languageName: node linkType: hard +"@walletconnect/relay-api@npm:^1.0.9": + version: 1.0.9 + resolution: "@walletconnect/relay-api@npm:1.0.9" + dependencies: + "@walletconnect/jsonrpc-types": ^1.0.2 + tslib: 1.14.1 + checksum: 5870579b6552f1ce7351878f1acb8386b0c11288c64d39133c7cee5040feeb7ccf9114228d97a59749d60366ad107b097d656407d534567c24f5d3878ea6e246 + languageName: node + linkType: hard + +"@walletconnect/relay-auth@npm:^1.0.4": + version: 1.0.4 + resolution: "@walletconnect/relay-auth@npm:1.0.4" + dependencies: + "@stablelib/ed25519": ^1.0.2 + "@stablelib/random": ^1.0.1 + "@walletconnect/safe-json": ^1.0.1 + "@walletconnect/time": ^1.0.2 + tslib: 1.14.1 + uint8arrays: ^3.0.0 + checksum: 35b3229d7b57e74fdb8fe6827d8dd8291dc60bacda880a57b2acb47a34d38f12be46c971c9eff361eb4073e896648b550de7a7a3852ef3752f9619c08dfba891 + languageName: node + linkType: hard + "@walletconnect/safe-json@npm:1.0.0": version: 1.0.0 resolution: "@walletconnect/safe-json@npm:1.0.0" @@ -9894,17 +10344,29 @@ __metadata: languageName: node linkType: hard -"@walletconnect/signer-connection@npm:^1.8.0": - version: 1.8.0 - resolution: "@walletconnect/signer-connection@npm:1.8.0" +"@walletconnect/safe-json@npm:^1.0.2": + version: 1.0.2 + resolution: "@walletconnect/safe-json@npm:1.0.2" dependencies: - "@walletconnect/client": ^1.8.0 - "@walletconnect/jsonrpc-types": ^1.0.1 - "@walletconnect/jsonrpc-utils": ^1.0.3 - "@walletconnect/qrcode-modal": ^1.8.0 - "@walletconnect/types": ^1.8.0 - eventemitter3: 4.0.7 - checksum: 249c5a92e80c59181d2da0dda759a6ed576e347de2cd2b2bf21ac5efe6b7b03e08406c2acc25e066cef52ffb6e6eb4124f6c680905dc54757b6f61f3a725b08f + tslib: 1.14.1 + checksum: fee03fcc70adb5635ab9419ea6ec6555aa2467bef650ad3b9526451c3a5cf247836db0f3ae3bb435d2e585d99e50c2ebe7dc9c429cfa3df900cf3fe4bd06d37f + languageName: node + linkType: hard + +"@walletconnect/sign-client@npm:2.9.2": + version: 2.9.2 + resolution: "@walletconnect/sign-client@npm:2.9.2" + dependencies: + "@walletconnect/core": 2.9.2 + "@walletconnect/events": ^1.0.1 + "@walletconnect/heartbeat": 1.2.1 + "@walletconnect/jsonrpc-utils": 1.0.8 + "@walletconnect/logger": ^2.0.1 + "@walletconnect/time": ^1.0.2 + "@walletconnect/types": 2.9.2 + "@walletconnect/utils": 2.9.2 + events: ^3.3.0 + checksum: b91b271130ab6404c89a94e31bcf9b987c23bc4c5f86a75344b7f4ea1cd887996ae7876038ae35b430175af17529c4caf9bc332abe6e986d878439c7a3dba31a languageName: node linkType: hard @@ -9919,13 +10381,75 @@ __metadata: languageName: node linkType: hard -"@walletconnect/types@npm:^1.7.1, @walletconnect/types@npm:^1.8.0": +"@walletconnect/time@npm:^1.0.2": + version: 1.0.2 + resolution: "@walletconnect/time@npm:1.0.2" + dependencies: + tslib: 1.14.1 + checksum: e3fc0113ca9e7ecedfc65f9e1517196682d5ffcda60750f51073b8d704719a17fea75da8b242c804bfa5b994707723043892a2db3cc86988b190b7b8711fe3c0 + languageName: node + linkType: hard + +"@walletconnect/types@npm:2.9.2": + version: 2.9.2 + resolution: "@walletconnect/types@npm:2.9.2" + dependencies: + "@walletconnect/events": ^1.0.1 + "@walletconnect/heartbeat": 1.2.1 + "@walletconnect/jsonrpc-types": 1.0.3 + "@walletconnect/keyvaluestorage": ^1.0.2 + "@walletconnect/logger": ^2.0.1 + events: ^3.3.0 + checksum: 81d523cf337f456190b87242ae7843e09f0b1d84127c1138d73420a5cc8e7b05f7f1722dfeaa2ecd12be25331e3896c733e0327221bc51eb6bae192e43b4a99f + languageName: node + linkType: hard + +"@walletconnect/types@npm:^1.8.0": version: 1.8.0 resolution: "@walletconnect/types@npm:1.8.0" checksum: 194d615888068030183489222641332987846aa5c6bcf0a62fa60ca7a282b9f94932c49fcd2b293a859e98624fe3e7a2d3c5fb66545fe30d3391e7ac91a99e34 languageName: node linkType: hard +"@walletconnect/universal-provider@npm:2.9.2": + version: 2.9.2 + resolution: "@walletconnect/universal-provider@npm:2.9.2" + dependencies: + "@walletconnect/jsonrpc-http-connection": ^1.0.7 + "@walletconnect/jsonrpc-provider": 1.0.13 + "@walletconnect/jsonrpc-types": ^1.0.2 + "@walletconnect/jsonrpc-utils": ^1.0.7 + "@walletconnect/logger": ^2.0.1 + "@walletconnect/sign-client": 2.9.2 + "@walletconnect/types": 2.9.2 + "@walletconnect/utils": 2.9.2 + events: ^3.3.0 + checksum: 4f1003d63e5358fb45b15c1156911cda8287c98d606084c6168bda5fa9b9a376a3d08afc777823b9dfb71dad18c3f90896be0c0c7d5fc56c6061086b91177bc7 + languageName: node + linkType: hard + +"@walletconnect/utils@npm:2.9.2": + version: 2.9.2 + resolution: "@walletconnect/utils@npm:2.9.2" + 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.9 + "@walletconnect/safe-json": ^1.0.2 + "@walletconnect/time": ^1.0.2 + "@walletconnect/types": 2.9.2 + "@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 + checksum: 9caf05fa6f7c95945e675845e305220fc1e7832ae595a9ff39799195d2d5865972914f74a8768044473f45450e98db685a0ff965a09d9cd0220cfdc391279eab + languageName: node + linkType: hard + "@walletconnect/utils@npm:^1.8.0": version: 1.8.0 resolution: "@walletconnect/utils@npm:1.8.0" @@ -9962,7 +10486,7 @@ __metadata: languageName: node linkType: hard -"@walletconnect/window-getters@npm:^1.0.0": +"@walletconnect/window-getters@npm:^1.0.0, @walletconnect/window-getters@npm:^1.0.1": version: 1.0.1 resolution: "@walletconnect/window-getters@npm:1.0.1" dependencies: @@ -9980,80 +10504,93 @@ __metadata: languageName: node linkType: hard -"@web3-react/abstract-connector@npm:^6.0.7": - version: 6.0.7 - resolution: "@web3-react/abstract-connector@npm:6.0.7" +"@walletconnect/window-metadata@npm:^1.0.1": + version: 1.0.1 + resolution: "@walletconnect/window-metadata@npm:1.0.1" dependencies: - "@web3-react/types": ^6.0.7 - checksum: fa8b0ea3586e248da84756979dd5c5f6ddc2d1657a1698de63a6d0e38035c4b122841bd0e6b00f1a6f1825614b22f6552a584cafec3470ca6fbc2e127ab30b2a + "@walletconnect/window-getters": ^1.0.1 + tslib: 1.14.1 + checksum: e82aea7195c6fe95c00e87bb38051c5549838c2e8302da94f1afa48206f79f0b620166c9820f847494505d282d1568e2086a1561b0493d2d0a1fa115f9106aef languageName: node linkType: hard -"@web3-react/core@npm:^6.1.9": - version: 6.1.9 - resolution: "@web3-react/core@npm:6.1.9" +"@web3-react/coinbase-wallet@npm:8.2.2": + version: 8.2.2 + resolution: "@web3-react/coinbase-wallet@npm:8.2.2" dependencies: - "@ethersproject/keccak256": ^5.0.0-beta.130 - "@web3-react/abstract-connector": ^6.0.7 - "@web3-react/types": ^6.0.7 - tiny-invariant: ^1.0.6 - tiny-warning: ^1.0.3 + "@web3-react/types": ^8.2.2 + peerDependencies: + "@coinbase/wallet-sdk": ^3.0.4 + checksum: 13791ea2a5bcc0641f7de783d3eb83525110aea4b9344b08db749e6264c788f75a000df26fe39725750385bb8f02fe1e4615ddf7095ddc4c4914d9d263e250af + languageName: node + linkType: hard + +"@web3-react/core@npm:8.2.2": + version: 8.2.2 + resolution: "@web3-react/core@npm:8.2.2" + dependencies: + "@ethersproject/providers": ^5 + "@web3-react/store": ^8.2.2 + "@web3-react/types": ^8.2.2 + zustand: 4.4.0 peerDependencies: react: ">=16.8" - checksum: b7f3ad62812fb0d000c50447f5b22329ce03942cc681cf01038a450872f79252445083a7fb325c7daf2b4de1f6f89e0298a7a54e0cea0b05872c37d64492af8b + dependenciesMeta: + "@ethersproject/providers": + optional: true + checksum: 82d37e8e3743e9f0e006e6bd2b3e60f683c3fb9ae3a5356ff92c29f186b661c7dbd05489ead9eec5df0d4b8154e88b1fc0b6d96fc9f63526b9fec557a7366489 languageName: node linkType: hard -"@web3-react/injected-connector@npm:^6.0.7": - version: 6.0.7 - resolution: "@web3-react/injected-connector@npm:6.0.7" +"@web3-react/metamask@npm:8.2.3": + version: 8.2.3 + resolution: "@web3-react/metamask@npm:8.2.3" dependencies: - "@web3-react/abstract-connector": ^6.0.7 - "@web3-react/types": ^6.0.7 - tiny-warning: ^1.0.3 - checksum: 867a634a12326f33d10eead26f557fe505942ec42f5586d0756eb864fa345187b255a7d9b78bd555eb2395f962e9615731bcfefe6cf07ef9971a7fca151377f8 + "@metamask/detect-provider": ^1.2.0 + "@web3-react/types": ^8.2.2 + checksum: da384421618ecba3d4a3d87eb49189074d811a30c4209ad8361561758fa5d3a50cacb8f1d8e634c5e1240d8c28b389876106a07abf67a1575268171935aeda5e languageName: node linkType: hard -"@web3-react/network-connector@npm:^6.2.9": - version: 6.2.9 - resolution: "@web3-react/network-connector@npm:6.2.9" +"@web3-react/network@npm:8.2.2": + version: 8.2.2 + resolution: "@web3-react/network@npm:8.2.2" dependencies: - "@web3-react/abstract-connector": ^6.0.7 - "@web3-react/types": ^6.0.7 - tiny-invariant: ^1.0.6 - checksum: bd48b2dc150b89cc98fcf3cbc0b7badef51e5a430f7f9778b3167ec5786138f49a9e0966d1527a6a5b1f53242dd5c0447c20473cf4e5178736fc7e7aceb177e1 + "@ethersproject/providers": ^5 + "@web3-react/types": ^8.2.2 + checksum: 1ab4d0c81e1520bd7abe41127ed03be76d985493e3d8d99e2f2041faed19224e3bb8cc3de3d2656d060938165804b14498819be47d50ccd856f108d1e393a3ee languageName: node linkType: hard -"@web3-react/types@npm:^6.0.7": - version: 6.0.7 - resolution: "@web3-react/types@npm:6.0.7" - checksum: 29ae264ae4a126e520a64a4b466ea712ee09b934f3fe13b957e09269249ffc882712cf11fff12c1c19dd66e38503075b4adf5e9d5f588ea0dd31bbedf6fa9a42 +"@web3-react/store@npm:^8.2.2": + version: 8.2.2 + resolution: "@web3-react/store@npm:8.2.2" + dependencies: + "@ethersproject/address": ^5 + "@web3-react/types": ^8.2.2 + zustand: 4.4.0 + checksum: 40615e321e1d2746ab752dc59f194a21d3a53c923094bf31d7dc1ac425363dc30909bf361645336795bab75e19baab960ec51aa921ca8500b07abd1f210a6e4d languageName: node linkType: hard -"@web3-react/walletconnect-connector@npm:^6.2.13": - version: 6.2.13 - resolution: "@web3-react/walletconnect-connector@npm:6.2.13" +"@web3-react/types@npm:^8.2.2": + version: 8.2.2 + resolution: "@web3-react/types@npm:8.2.2" dependencies: - "@walletconnect/ethereum-provider": ^1.7.1 - "@walletconnect/types": ^1.7.1 - "@web3-react/abstract-connector": ^6.0.7 - "@web3-react/types": ^6.0.7 - tiny-invariant: ^1.0.6 - checksum: 2d0299ce5c733689a967179ef268df6f588c0783ab18182d7e38c6bc913ee2ce313b0afed1c54e104e3849461a558385ff8f30803343108c5788e27cdc1a3445 + zustand: 4.4.0 + checksum: b76f87bd9d9b12f8fb8f2b86f0c73a509f898c8e8450877306e4cd83423f532da0c841523701a41bcb4c6b96898e66f3b5636312d167323c68ee82cf4c1bfdfe languageName: node linkType: hard -"@web3-react/walletlink-connector@npm:^6.2.14": - version: 6.2.14 - resolution: "@web3-react/walletlink-connector@npm:6.2.14" +"@web3-react/walletconnect-v2@npm:8.5.0": + version: 8.5.0 + resolution: "@web3-react/walletconnect-v2@npm:8.5.0" dependencies: - "@coinbase/wallet-sdk": ^3.0.4 - "@web3-react/abstract-connector": ^6.0.7 - "@web3-react/types": ^6.0.7 - checksum: bfb0d83e82fdfa60b9444f8c2e2adc37b6a8c00330120e1932a60809917999a112aabcb6e6103c7f6e60a056167e1ebd3c8acadd12c7953c1da7af0c512e0ef2 + "@walletconnect/ethereum-provider": ^2.9.2 + "@walletconnect/modal": ^2.6.1 + "@web3-react/types": ^8.2.2 + eventemitter3: ^4.0.7 + checksum: 310d32dc27578085d4d8acc183d2c51d863606349bebf3e5fef138f5e80f7cedf5e51e754f03eda2c151cfe2e61dc630c0fcc6e0555ef9af2a2edd943cd65dd9 languageName: node linkType: hard @@ -10685,6 +11222,15 @@ __metadata: languageName: node linkType: hard +"agentkeepalive@npm:^4.3.0": + version: 4.5.0 + resolution: "agentkeepalive@npm:4.5.0" + dependencies: + humanize-ms: ^1.2.1 + checksum: 13278cd5b125e51eddd5079f04d6fe0914ac1b8b91c1f3db2c1822f99ac1a7457869068997784342fe455d59daaff22e14fb7b8c3da4e741896e7e31faf92481 + languageName: node + linkType: hard + "aggregate-error@npm:^3.0.0": version: 3.1.0 resolution: "aggregate-error@npm:3.1.0" @@ -11445,12 +11991,13 @@ __metadata: languageName: node linkType: hard -"axios@npm:0.26.1": - version: 0.26.1 - resolution: "axios@npm:0.26.1" +"axios@npm:0.27.2, axios@npm:^0.27.2": + version: 0.27.2 + resolution: "axios@npm:0.27.2" dependencies: - follow-redirects: ^1.14.8 - checksum: d9eb58ff4bc0b36a04783fc9ff760e9245c829a5a1052ee7ca6013410d427036b1d10d04e7380c02f3508c5eaf3485b1ae67bd2adbfec3683704745c8d7a6e1a + follow-redirects: ^1.14.9 + form-data: ^4.0.0 + checksum: 38cb7540465fe8c4102850c4368053c21683af85c5fdf0ea619f9628abbcb59415d1e22ebc8a6390d2bbc9b58a9806c874f139767389c862ec9b772235f06854 languageName: node linkType: hard @@ -11486,7 +12033,7 @@ __metadata: languageName: node linkType: hard -"axios@npm:^0.21.0, axios@npm:^0.21.1": +"axios@npm:^0.21.1": version: 0.21.4 resolution: "axios@npm:0.21.4" dependencies: @@ -11504,16 +12051,6 @@ __metadata: languageName: node linkType: hard -"axios@npm:^0.27.2": - version: 0.27.2 - resolution: "axios@npm:0.27.2" - dependencies: - follow-redirects: ^1.14.9 - form-data: ^4.0.0 - checksum: 38cb7540465fe8c4102850c4368053c21683af85c5fdf0ea619f9628abbcb59415d1e22ebc8a6390d2bbc9b58a9806c874f139767389c862ec9b772235f06854 - languageName: node - linkType: hard - "axobject-query@npm:^2.2.0": version: 2.2.0 resolution: "axobject-query@npm:2.2.0" @@ -13166,16 +13703,6 @@ __metadata: languageName: node linkType: hard -"buffer@npm:6.0.1": - version: 6.0.1 - resolution: "buffer@npm:6.0.1" - dependencies: - base64-js: ^1.3.1 - ieee754: ^1.2.1 - checksum: 0274c2c6c5c5d9e9e1fd48116c26a3e3f824fe262ff379f630771f590c2e4e7d1fa2604a58684bfc4471a3f9cc40c6317be26b50f15c4cca126249bfc84c4f8b - languageName: node - linkType: hard - "buffer@npm:6.0.3, buffer@npm:^6.0.3, buffer@npm:~6.0.3": version: 6.0.3 resolution: "buffer@npm:6.0.3" @@ -14520,10 +15047,10 @@ __metadata: languageName: node linkType: hard -"compare-versions@npm:4.1.3": - version: 4.1.3 - resolution: "compare-versions@npm:4.1.3" - checksum: 54460756ab2d62f8a9d672db249b248fec7ca41c3e8ed242925e2f2257793ad3e83cecb2cdfd60b46a3aabc962a3a4cbf37a4b928c8f30517822d2bde937a3d1 +"compare-versions@npm:4.1.4": + version: 4.1.4 + resolution: "compare-versions@npm:4.1.4" + checksum: c1617544b79c2f36a1d543c50efd0da1a994040294c8923218080bc0df46da83ca414e3378282e93cab073744995124946417d130d8987e8efb5d1a73c0c4ba6 languageName: node linkType: hard @@ -15607,7 +16134,7 @@ __metadata: languageName: node linkType: hard -"decode-uri-component@npm:^0.2.0": +"decode-uri-component@npm:^0.2.0, decode-uri-component@npm:^0.2.2": version: 0.2.2 resolution: "decode-uri-component@npm:0.2.2" checksum: 95476a7d28f267292ce745eac3524a9079058bbb35767b76e3ee87d42e34cd0275d2eb19d9d08c3e167f97556e8a2872747f5e65cbebcac8b0c98d83e285f139 @@ -15942,6 +16469,13 @@ __metadata: languageName: node linkType: hard +"detect-browser@npm:5.3.0": + version: 5.3.0 + resolution: "detect-browser@npm:5.3.0" + checksum: dd6e08d55da1d9e0f22510ac79872078ae03d9dfa13c5e66c96baedc1c86567345a88f96949161f6be8f3e0fafa93bf179bdb1cd311b14f5f163112fcc70ab49 + languageName: node + linkType: hard + "detect-indent@npm:^4.0.0": version: 4.0.0 resolution: "detect-indent@npm:4.0.0" @@ -16420,6 +16954,18 @@ __metadata: languageName: node linkType: hard +"duplexify@npm:^4.1.2": + version: 4.1.2 + resolution: "duplexify@npm:4.1.2" + dependencies: + end-of-stream: ^1.4.1 + inherits: ^2.0.3 + readable-stream: ^3.1.1 + stream-shift: ^1.0.0 + checksum: 964376c61c0e92f6ed0694b3ba97c84f199413dc40ab8dfdaef80b7a7f4982fcabf796214e28ed614a5bc1ec45488a29b81e7d46fa3f5ddf65bcb118c20145ad + languageName: node + linkType: hard + "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -16480,15 +17026,6 @@ __metadata: languageName: node linkType: hard -"eip1193-provider@npm:1.0.1": - version: 1.0.1 - resolution: "eip1193-provider@npm:1.0.1" - dependencies: - "@json-rpc-tools/provider": ^1.5.5 - checksum: a56d6a874786b788c1f09f96d329b118ca6b3d381055865bb1ec1bde17da8d433a4141200baa2922108d67ac0d83813841940d2813814e56ea923fc9fafb369a - languageName: node - linkType: hard - "ejs@npm:^3.1.6, ejs@npm:^3.1.8": version: 3.1.9 resolution: "ejs@npm:3.1.9" @@ -16604,7 +17141,7 @@ __metadata: languageName: node linkType: hard -"encode-utf8@npm:^1.0.2": +"encode-utf8@npm:^1.0.2, encode-utf8@npm:^1.0.3": version: 1.0.3 resolution: "encode-utf8@npm:1.0.3" checksum: 550224bf2a104b1d355458c8a82e9b4ea07f9fc78387bc3a49c151b940ad26473de8dc9e121eefc4e84561cb0b46de1e4cd2bc766f72ee145e9ea9541482817f @@ -17658,7 +18195,19 @@ __metadata: languageName: node linkType: hard -"eth-block-tracker@npm:4.4.3, eth-block-tracker@npm:^4.2.0, eth-block-tracker@npm:^4.4.2": +"eth-block-tracker@npm:6.1.0": + version: 6.1.0 + resolution: "eth-block-tracker@npm:6.1.0" + dependencies: + "@metamask/safe-event-emitter": ^2.0.0 + "@metamask/utils": ^3.0.1 + json-rpc-random-id: ^1.0.1 + pify: ^3.0.0 + checksum: 33ee6375a26822649d1e9ac24a3c39d70338eb505715f72b9102fb82e40d7a48902b4a7dd4a33bb4f121b79707c5ab045777507a2881cfcdb385c8ccbb3ac2a0 + languageName: node + linkType: hard + +"eth-block-tracker@npm:^4.2.0, eth-block-tracker@npm:^4.4.2": version: 4.4.3 resolution: "eth-block-tracker@npm:4.4.3" dependencies: @@ -17710,7 +18259,20 @@ __metadata: languageName: node linkType: hard -"eth-json-rpc-filters@npm:4.2.2, eth-json-rpc-filters@npm:^4.0.2, eth-json-rpc-filters@npm:^4.2.1": +"eth-json-rpc-filters@npm:5.1.0": + version: 5.1.0 + resolution: "eth-json-rpc-filters@npm:5.1.0" + dependencies: + "@metamask/safe-event-emitter": ^2.0.0 + async-mutex: ^0.2.6 + eth-query: ^2.1.2 + json-rpc-engine: ^6.1.0 + pify: ^5.0.0 + checksum: 864092e96277953c399a139df66572b864bd41247c5c1d18e6529973804d4fd8962658d8b10571152554802fa8daaa1003588aee79ffce754e0bc57c39b771d5 + languageName: node + linkType: hard + +"eth-json-rpc-filters@npm:^4.0.2, eth-json-rpc-filters@npm:^4.2.1": version: 4.2.2 resolution: "eth-json-rpc-filters@npm:4.2.2" dependencies: @@ -18408,7 +18970,7 @@ __metadata: languageName: node linkType: hard -"events@npm:^3.0.0, events@npm:^3.1.0, events@npm:^3.2.0": +"events@npm:^3.0.0, events@npm:^3.1.0, events@npm:^3.2.0, events@npm:^3.3.0": version: 3.3.0 resolution: "events@npm:3.3.0" checksum: f6f487ad2198aa41d878fa31452f1a3c00958f46e9019286ff4787c84aac329332ab45c9cdc8c445928fc6d7ded294b9e005a7fce9426488518017831b272780 @@ -19061,6 +19623,13 @@ __metadata: languageName: node linkType: hard +"filter-obj@npm:^1.1.0": + version: 1.1.0 + resolution: "filter-obj@npm:1.1.0" + checksum: cf2104a7c45ff48e7f505b78a3991c8f7f30f28bd8106ef582721f321f1c6277f7751aacd5d83026cb079d9d5091082f588d14a72e7c5d720ece79118fa61e10 + languageName: node + linkType: hard + "finalhandler@npm:1.2.0": version: 1.2.0 resolution: "finalhandler@npm:1.2.0" @@ -19272,7 +19841,7 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.14.7, follow-redirects@npm:^1.14.8, follow-redirects@npm:^1.14.9, follow-redirects@npm:^1.15.0": +"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.14.7, follow-redirects@npm:^1.14.9, follow-redirects@npm:^1.15.0": version: 1.15.2 resolution: "follow-redirects@npm:1.15.2" peerDependenciesMeta: @@ -19486,14 +20055,14 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:10.0.1": - version: 10.0.1 - resolution: "fs-extra@npm:10.0.1" +"fs-extra@npm:10.1.0, fs-extra@npm:^10.0.0, fs-extra@npm:^10.0.1, fs-extra@npm:^10.1.0": + version: 10.1.0 + resolution: "fs-extra@npm:10.1.0" dependencies: graceful-fs: ^4.2.0 jsonfile: ^6.0.1 universalify: ^2.0.0 - checksum: c1faaa5eb9e1c5c7c7ff09f966e93922ecb068ae1b04801cfc983ef05fcc1f66bfbb8d8d0b745c910014c7a2e7317fb6cf3bfe7390450c1157e3cc1a218f221d + checksum: dc94ab37096f813cc3ca12f0f1b5ad6744dfed9ed21e953d72530d103cea193c2f81584a39e9dee1bea36de5ee66805678c0dddc048e8af1427ac19c00fffc50 languageName: node linkType: hard @@ -19522,17 +20091,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^10.0.0, fs-extra@npm:^10.0.1, fs-extra@npm:^10.1.0": - version: 10.1.0 - resolution: "fs-extra@npm:10.1.0" - dependencies: - graceful-fs: ^4.2.0 - jsonfile: ^6.0.1 - universalify: ^2.0.0 - checksum: dc94ab37096f813cc3ca12f0f1b5ad6744dfed9ed21e953d72530d103cea193c2f81584a39e9dee1bea36de5ee66805678c0dddc048e8af1427ac19c00fffc50 - languageName: node - linkType: hard - "fs-extra@npm:^11.1.0": version: 11.1.1 resolution: "fs-extra@npm:11.1.1" @@ -20670,6 +21228,13 @@ __metadata: languageName: node linkType: hard +"hey-listen@npm:^1.0.8": + version: 1.0.8 + resolution: "hey-listen@npm:1.0.8" + checksum: 6bad60b367688f5348e25e7ca3276a74b59ac5a09b0455e6ff8ab7d4a9e38cd2116c708a7dcd8a954d27253ce1d8717ec891d175723ea739885b828cf44e4072 + languageName: node + linkType: hard + "highlight.js@npm:^10.4.1": version: 10.7.3 resolution: "highlight.js@npm:10.7.3" @@ -21407,9 +21972,9 @@ __metadata: languageName: node linkType: hard -"inquirer@npm:8.2.2": - version: 8.2.2 - resolution: "inquirer@npm:8.2.2" +"inquirer@npm:8.2.5, inquirer@npm:^8.0.0": + version: 8.2.5 + resolution: "inquirer@npm:8.2.5" dependencies: ansi-escapes: ^4.2.1 chalk: ^4.1.1 @@ -21425,7 +21990,8 @@ __metadata: string-width: ^4.1.0 strip-ansi: ^6.0.0 through: ^2.3.6 - checksum: 69a2cf32f51af0e94dd66c597fdca42b890ff521b537dbfe1fd532c19a751d54893b7896523691ec30357f6212a80a2417fec7bf34411f369bbf151bdbc95ae9 + wrap-ansi: ^7.0.0 + checksum: f13ee4c444187786fb393609dedf6b30870115a57b603f2e6424f29a99abc13446fd45ee22461c33c9c40a92a60a8df62d0d6b25d74fc6676fa4cb211de55b55 languageName: node linkType: hard @@ -21450,29 +22016,6 @@ __metadata: languageName: node linkType: hard -"inquirer@npm:^8.0.0": - version: 8.2.5 - resolution: "inquirer@npm:8.2.5" - dependencies: - ansi-escapes: ^4.2.1 - chalk: ^4.1.1 - cli-cursor: ^3.1.0 - cli-width: ^3.0.0 - external-editor: ^3.0.3 - figures: ^3.0.0 - lodash: ^4.17.21 - mute-stream: 0.0.8 - ora: ^5.4.1 - run-async: ^2.4.0 - rxjs: ^7.5.5 - string-width: ^4.1.0 - strip-ansi: ^6.0.0 - through: ^2.3.6 - wrap-ansi: ^7.0.0 - checksum: f13ee4c444187786fb393609dedf6b30870115a57b603f2e6424f29a99abc13446fd45ee22461c33c9c40a92a60a8df62d0d6b25d74fc6676fa4cb211de55b55 - languageName: node - linkType: hard - "interface-ipld-format@npm:^1.0.0": version: 1.0.1 resolution: "interface-ipld-format@npm:1.0.1" @@ -22522,9 +23065,9 @@ __metadata: languageName: node linkType: hard -"jayson@npm:^3.4.4": - version: 3.7.0 - resolution: "jayson@npm:3.7.0" +"jayson@npm:^4.1.0": + version: 4.1.0 + resolution: "jayson@npm:4.1.0" dependencies: "@types/connect": ^3.4.33 "@types/node": ^12.12.54 @@ -22536,12 +23079,11 @@ __metadata: eyes: ^0.1.8 isomorphic-ws: ^4.0.1 json-stringify-safe: ^5.0.1 - lodash: ^4.17.20 uuid: ^8.3.2 ws: ^7.4.5 bin: jayson: bin/jayson.js - checksum: 4218a4829168a4927e657bde953ff9699f02af561ec72edcc7464446772b50a0c5c7e9f11d4ee5976e4794d0f1040c0f351a0fee51c542bf8492743d30b7a971 + checksum: 86464322fbdc6db65d2bb4fc278cb6c86fad5c2a506065490d39459f09ba0d30f2b4fb740b33828a1424791419b6c8bd295dc54d361a4ad959bf70cc62b1ca7e languageName: node linkType: hard @@ -24099,6 +24641,37 @@ __metadata: languageName: node linkType: hard +"lit-element@npm:^3.3.0": + version: 3.3.3 + resolution: "lit-element@npm:3.3.3" + dependencies: + "@lit-labs/ssr-dom-shim": ^1.1.0 + "@lit/reactive-element": ^1.3.0 + lit-html: ^2.8.0 + checksum: 29a596fa556e231cce7246ca3e5687ad238f299b0cb374a0934d5e6fe9adf1436e031d4fbd21b280aabfc0e21a66e6c4b52da558a908df2566d09d960f3ca93d + languageName: node + linkType: hard + +"lit-html@npm:^2.7.0, lit-html@npm:^2.8.0": + version: 2.8.0 + resolution: "lit-html@npm:2.8.0" + dependencies: + "@types/trusted-types": ^2.0.2 + checksum: 2d70df07248bcb2f502a3afb1e91d260735024fa669669ffb1417575aa39c3092779725ac1b90f5f39e4ce78c63f431f51176bc67f532389f0285a6991573255 + languageName: node + linkType: hard + +"lit@npm:2.7.6": + version: 2.7.6 + resolution: "lit@npm:2.7.6" + dependencies: + "@lit/reactive-element": ^1.6.0 + lit-element: ^3.3.0 + lit-html: ^2.7.0 + checksum: 984a7fb9c0fa387f20177a07de22ea1c9cdc01a7dc7cb1c400d1df5b43a8956908460482a3259ea173555c6f0f13457d2ddc5c84d4c365007afd86e7ca58b384 + languageName: node + linkType: hard + "load-bmfont@npm:^1.3.1": version: 1.4.1 resolution: "load-bmfont@npm:1.4.1" @@ -24338,7 +24911,7 @@ __metadata: languageName: node linkType: hard -"lodash.isequal@npm:^4.5.0": +"lodash.isequal@npm:4.5.0, lodash.isequal@npm:^4.5.0": version: 4.5.0 resolution: "lodash.isequal@npm:4.5.0" checksum: da27515dc5230eb1140ba65ff8de3613649620e8656b19a6270afe4866b7bd461d9ba2ac8a48dcc57f7adac4ee80e1de9f965d89d4d81a0ad52bb3eec2609644 @@ -25538,6 +26111,20 @@ __metadata: languageName: node linkType: hard +"motion@npm:10.16.2": + version: 10.16.2 + resolution: "motion@npm:10.16.2" + dependencies: + "@motionone/animation": ^10.15.1 + "@motionone/dom": ^10.16.2 + "@motionone/svelte": ^10.16.2 + "@motionone/types": ^10.15.1 + "@motionone/utils": ^10.15.1 + "@motionone/vue": ^10.16.2 + checksum: 0b91256808c2374d8b7f4ac5e7ed513f2ca8df2b7d1be4fbc00ec5baece5162ada648aedaa5bc1d60be9ad2e6c9bc1d3bb160333051c20ab79e241b8e02e3c92 + languageName: node + linkType: hard + "mri@npm:^1.2.0": version: 1.2.0 resolution: "mri@npm:1.2.0" @@ -25981,6 +26568,20 @@ __metadata: languageName: node linkType: hard +"node-fetch@npm:^2.6.12": + version: 2.6.12 + resolution: "node-fetch@npm:2.6.12" + dependencies: + whatwg-url: ^5.0.0 + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: 3bc1655203d47ee8e313c0d96664b9673a3d4dd8002740318e9d27d14ef306693a4b2ef8d6525775056fd912a19e23f3ac0d7111ad8925877b7567b29a625592 + languageName: node + linkType: hard + "node-fetch@npm:~1.7.1": version: 1.7.3 resolution: "node-fetch@npm:1.7.3" @@ -26327,7 +26928,7 @@ __metadata: languageName: node linkType: hard -"object-hash@npm:3.0.0, object-hash@npm:^3.0.0": +"object-hash@npm:^3.0.0": version: 3.0.0 resolution: "object-hash@npm:3.0.0" checksum: 80b4904bb3857c52cc1bfd0b52c0352532ca12ed3b8a6ff06a90cd209dfda1b95cee059a7625eb9da29537027f68ac4619363491eedb2f5d3dddbba97494fd6c @@ -26481,6 +27082,13 @@ __metadata: languageName: node linkType: hard +"on-exit-leak-free@npm:^0.2.0": + version: 0.2.0 + resolution: "on-exit-leak-free@npm:0.2.0" + checksum: d22b0f0538069110626b578db6e68b6ee0e85b1ee9cc5ef9b4de1bba431431d6a8da91a61e09d2ad46f22a96f968e5237833cb9d0b69bc4d294f7ec82f609b05 + languageName: node + linkType: hard + "on-finished@npm:2.4.1": version: 2.4.1 resolution: "on-finished@npm:2.4.1" @@ -27363,6 +27971,16 @@ __metadata: languageName: node linkType: hard +"pino-abstract-transport@npm:v0.5.0": + version: 0.5.0 + resolution: "pino-abstract-transport@npm:0.5.0" + dependencies: + duplexify: ^4.1.2 + split2: ^4.0.0 + checksum: c503f867de3189f8217ab9cf794e8a631dddd0029a829f0f985f5511308152ebd53e363764fbc5570b3d1c715b341e3923456ce16ad84cd41be2b9a074ada234 + languageName: node + linkType: hard + "pino-std-serializers@npm:^3.1.0": version: 3.2.0 resolution: "pino-std-serializers@npm:3.2.0" @@ -27370,6 +27988,34 @@ __metadata: languageName: node linkType: hard +"pino-std-serializers@npm:^4.0.0": + version: 4.0.0 + resolution: "pino-std-serializers@npm:4.0.0" + checksum: 89d487729b58c9d3273a0ee851ead068d6d2e2ccc1af8e1c1d28f1b3442423679bec7ec04d9a2aba36f94f335e82be9f4de19dc4fbc161e71c136aaa15b85ad3 + languageName: node + linkType: hard + +"pino@npm:7.11.0": + version: 7.11.0 + resolution: "pino@npm:7.11.0" + dependencies: + atomic-sleep: ^1.0.0 + fast-redact: ^3.0.0 + on-exit-leak-free: ^0.2.0 + pino-abstract-transport: v0.5.0 + pino-std-serializers: ^4.0.0 + process-warning: ^1.0.0 + quick-format-unescaped: ^4.0.3 + real-require: ^0.1.0 + safe-stable-stringify: ^2.1.0 + sonic-boom: ^2.2.1 + thread-stream: ^0.15.1 + bin: + pino: bin.js + checksum: b919e7dbe41de978bb050dcef94fd687c012eb78d344a18f75f04ce180d5810fc162be1f136722d70cd005ed05832c4023a38b9acbc1076ae63c9f5ec5ca515c + languageName: node + linkType: hard + "pino@npm:^6.13.0": version: 6.14.0 resolution: "pino@npm:6.14.0" @@ -27471,6 +28117,13 @@ __metadata: languageName: node linkType: hard +"pngjs@npm:^5.0.0": + version: 5.0.0 + resolution: "pngjs@npm:5.0.0" + checksum: 04e912cc45fb9601564e2284efaf0c5d20d131d9b596244f8a6789fc6cdb6b18d2975a6bbf7a001858d7e159d5c5c5dd7b11592e97629b7137f7f5cef05904c8 + languageName: node + linkType: hard + "pnp-webpack-plugin@npm:^1.7.0": version: 1.7.0 resolution: "pnp-webpack-plugin@npm:1.7.0" @@ -28346,13 +28999,20 @@ __metadata: languageName: node linkType: hard -"preact@npm:^10.3.3, preact@npm:^10.5.9": +"preact@npm:^10.3.3": version: 10.11.3 resolution: "preact@npm:10.11.3" checksum: 9387115aa0581e8226309e6456e9856f17dfc0e3d3e63f774de80f3d462a882ba7c60914c05942cb51d51e23e120dcfe904b8d392d46f29ad15802941fe7a367 languageName: node linkType: hard +"preact@npm:^10.5.9": + version: 10.17.0 + resolution: "preact@npm:10.17.0" + checksum: a106a5dd4e4e38a24f4ab62a42b4e0d9b14f0a0146819f1f2800b7033b316941987f77913893b78fe4ceb6750ec013f407ad98e2f416978fe8aecc8d7f4d086b + languageName: node + linkType: hard + "precond@npm:0.2": version: 0.2.3 resolution: "precond@npm:0.2.3" @@ -28642,6 +29302,13 @@ __metadata: languageName: node linkType: hard +"proxy-compare@npm:2.5.1": + version: 2.5.1 + resolution: "proxy-compare@npm:2.5.1" + checksum: c7cc151ac255150bcb24becde6495b3e399416c31991af377ce082255b51f07eaeb5d861bf8bf482703e92f88b90a5892ad57d3153ea29450d03ef921683d9fa + languageName: node + linkType: hard + "proxy-from-env@npm:1.0.0": version: 1.0.0 resolution: "proxy-from-env@npm:1.0.0" @@ -28826,7 +29493,21 @@ __metadata: languageName: node linkType: hard -"qs@npm:6.11.0, qs@npm:^6.10.0, qs@npm:^6.10.3, qs@npm:^6.4.0, qs@npm:^6.9.1, qs@npm:^6.9.4": +"qrcode@npm:1.5.3": + version: 1.5.3 + resolution: "qrcode@npm:1.5.3" + dependencies: + dijkstrajs: ^1.0.1 + encode-utf8: ^1.0.3 + pngjs: ^5.0.0 + yargs: ^15.3.1 + bin: + qrcode: bin/qrcode + checksum: 9a8a20a0a9cb1d15de8e7b3ffa214e8b6d2a8b07655f25bd1b1d77f4681488f84d7bae569870c0652872d829d5f8ac4922c27a6bd14c13f0e197bf07b28dead7 + languageName: node + linkType: hard + +"qs@npm:6.11.0, qs@npm:^6.10.0, qs@npm:^6.4.0, qs@npm:^6.9.1, qs@npm:^6.9.4": version: 6.11.0 resolution: "qs@npm:6.11.0" dependencies: @@ -28835,6 +29516,15 @@ __metadata: languageName: node linkType: hard +"qs@npm:^6.10.3": + version: 6.11.2 + resolution: "qs@npm:6.11.2" + dependencies: + side-channel: ^1.0.4 + checksum: e812f3c590b2262548647d62f1637b6989cc56656dc960b893fe2098d96e1bd633f36576f4cd7564dfbff9db42e17775884db96d846bebe4f37420d073ecdc0b + languageName: node + linkType: hard + "qs@npm:~6.5.2": version: 6.5.3 resolution: "qs@npm:6.5.3" @@ -28853,6 +29543,18 @@ __metadata: languageName: node linkType: hard +"query-string@npm:7.1.3": + version: 7.1.3 + resolution: "query-string@npm:7.1.3" + dependencies: + decode-uri-component: ^0.2.2 + filter-obj: ^1.1.0 + split-on-first: ^1.0.0 + strict-uri-encode: ^2.0.0 + checksum: 91af02dcd9cc9227a052841d5c2eecb80a0d6489d05625df506a097ef1c59037cfb5e907f39b84643cbfd535c955abec3e553d0130a7b510120c37d06e0f4346 + languageName: node + linkType: hard + "query-string@npm:^5.0.1": version: 5.1.1 resolution: "query-string@npm:5.1.1" @@ -29824,6 +30526,13 @@ __metadata: languageName: node linkType: hard +"real-require@npm:^0.1.0": + version: 0.1.0 + resolution: "real-require@npm:0.1.0" + checksum: 96745583ed4f82cd5c6a6af012fd1d3c6fc2f13ae1bcff1a3c4f8094696013a1a07c82c5aa66a403d7d4f84949fc2203bc927c7ad120caad125941ca2d7e5e8e + languageName: node + linkType: hard + "rebass@npm:^4.0.7": version: 4.0.7 resolution: "rebass@npm:4.0.7" @@ -29972,6 +30681,13 @@ __metadata: languageName: node linkType: hard +"regenerator-runtime@npm:^0.14.0": + version: 0.14.0 + resolution: "regenerator-runtime@npm:0.14.0" + checksum: 1c977ad82a82a4412e4f639d65d22be376d3ebdd30da2c003eeafdaaacd03fc00c2320f18120007ee700900979284fc78a9f00da7fb593f6e6eeebc673fba9a3 + languageName: node + linkType: hard + "regenerator-transform@npm:^0.10.0": version: 0.10.1 resolution: "regenerator-transform@npm:0.10.1" @@ -30691,9 +31407,9 @@ __metadata: languageName: node linkType: hard -"rpc-websockets@npm:^7.5.0": - version: 7.5.0 - resolution: "rpc-websockets@npm:7.5.0" +"rpc-websockets@npm:^7.5.1": + version: 7.6.0 + resolution: "rpc-websockets@npm:7.6.0" dependencies: "@babel/runtime": ^7.17.2 bufferutil: ^4.0.1 @@ -30706,7 +31422,7 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: cd4c999e54161f9f40e162f57d7f3313edf086ff5facefbdc0629d52066e9843ace987681dbff8b4329db225deb69f58c528d7818a9c7e89f0100969b7789c2d + checksum: af2b254f65985610bd354e8e13de07b5a36010b94672b0b5a9d226b9bb1b8b17d01c63221cad97263845888f3610e55867a32e4c0017dfb92fddf89417c4cb6c languageName: node linkType: hard @@ -30758,12 +31474,12 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:7.5.5": - version: 7.5.5 - resolution: "rxjs@npm:7.5.5" +"rxjs@npm:7.8.0, rxjs@npm:^7.5.1, rxjs@npm:^7.5.4, rxjs@npm:^7.5.5, rxjs@npm:^7.8.0": + version: 7.8.0 + resolution: "rxjs@npm:7.8.0" dependencies: tslib: ^2.1.0 - checksum: e034f60805210cce756dd2f49664a8108780b117cf5d0e2281506e9e6387f7b4f1532d974a8c8b09314fa7a16dd2f6cff3462072a5789672b5dcb45c4173f3c6 + checksum: 61b4d4fd323c1043d8d6ceb91f24183b28bcf5def4f01ca111511d5c6b66755bc5578587fe714ef5d67cf4c9f2e26f4490d4e1d8cabf9bd5967687835e9866a2 languageName: node linkType: hard @@ -30776,15 +31492,6 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:^7.5.1, rxjs@npm:^7.5.4, rxjs@npm:^7.5.5, rxjs@npm:^7.8.0": - version: 7.8.0 - resolution: "rxjs@npm:7.8.0" - dependencies: - tslib: ^2.1.0 - checksum: 61b4d4fd323c1043d8d6ceb91f24183b28bcf5def4f01ca111511d5c6b66755bc5578587fe714ef5d67cf4c9f2e26f4490d4e1d8cabf9bd5967687835e9866a2 - languageName: node - linkType: hard - "safe-buffer@npm:5.1.1": version: 5.1.1 resolution: "safe-buffer@npm:5.1.1" @@ -30849,6 +31556,13 @@ __metadata: languageName: node linkType: hard +"safe-stable-stringify@npm:^2.1.0": + version: 2.4.3 + resolution: "safe-stable-stringify@npm:2.4.3" + checksum: 3aeb64449706ee1f5ad2459fc99648b131d48e7a1fbb608d7c628020177512dc9d94108a5cb61bbc953985d313d0afea6566d243237743e02870490afef04b43 + languageName: node + linkType: hard + "safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:^2.0.2, safer-buffer@npm:^2.1.0, safer-buffer@npm:~2.1.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" @@ -31666,6 +32380,15 @@ __metadata: languageName: node linkType: hard +"sonic-boom@npm:^2.2.1": + version: 2.8.0 + resolution: "sonic-boom@npm:2.8.0" + dependencies: + atomic-sleep: ^1.0.0 + checksum: c7f9c89f931d7f60f8e0741551a729f0d81e6dc407a99420fc847a9a4c25af048a615b1188ab3c4f1fb3708fe4904973ddab6ebcc8ed5b78b50ab81a99045910 + languageName: node + linkType: hard + "sort-keys-length@npm:^1.0.0": version: 1.0.1 resolution: "sort-keys-length@npm:1.0.1" @@ -31917,6 +32640,13 @@ __metadata: languageName: node linkType: hard +"split2@npm:^4.0.0": + version: 4.2.0 + resolution: "split2@npm:4.2.0" + checksum: 05d54102546549fe4d2455900699056580cca006c0275c334611420f854da30ac999230857a85fdd9914dc2109ae50f80fda43d2a445f2aa86eccdc1dfce779d + languageName: node + linkType: hard + "split@npm:0.3": version: 0.3.3 resolution: "split@npm:0.3.3" @@ -32676,6 +33406,13 @@ __metadata: languageName: node linkType: hard +"superstruct@npm:^1.0.3": + version: 1.0.3 + resolution: "superstruct@npm:1.0.3" + checksum: 761790bb111e6e21ddd608299c252f3be35df543263a7ebbc004e840d01fcf8046794c274bcb351bdf3eae4600f79d317d085cdbb19ca05803a4361840cc9bb1 + languageName: node + linkType: hard + "supports-color@npm:6.0.0": version: 6.0.0 resolution: "supports-color@npm:6.0.0" @@ -33327,6 +34064,15 @@ __metadata: languageName: node linkType: hard +"thread-stream@npm:^0.15.1": + version: 0.15.2 + resolution: "thread-stream@npm:0.15.2" + dependencies: + real-require: ^0.1.0 + checksum: 0547795a8f357ba1ac0dba29c71f965182e29e21752951a04a7167515ee37524bfba6c410f31e65a01a8d3e5b93400b812889aa09523e38ce4d744c894ffa6c0 + languageName: node + linkType: hard + "throat@npm:^6.0.1": version: 6.0.2 resolution: "throat@npm:6.0.2" @@ -33403,7 +34149,7 @@ __metadata: languageName: node linkType: hard -"tiny-invariant@npm:^1.0.6, tiny-invariant@npm:^1.1.0, tiny-invariant@npm:^1.2.0": +"tiny-invariant@npm:^1.1.0, tiny-invariant@npm:^1.2.0": version: 1.3.1 resolution: "tiny-invariant@npm:1.3.1" checksum: 872dbd1ff20a21303a2fd20ce3a15602cfa7fcf9b228bd694a52e2938224313b5385a1078cb667ed7375d1612194feaca81c4ecbe93121ca1baebe344de4f84c @@ -33803,14 +34549,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2.3.1": - version: 2.3.1 - resolution: "tslib@npm:2.3.1" - checksum: de17a98d4614481f7fcb5cd53ffc1aaf8654313be0291e1bfaee4b4bb31a20494b7d218ff2e15017883e8ea9626599b3b0e0229c18383ba9dce89da2adf15cb9 - languageName: node - linkType: hard - -"tslib@npm:^2, tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.4.1, tslib@npm:~2.5.0": +"tslib@npm:2.5.0, tslib@npm:^2, tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.4.1, tslib@npm:~2.5.0": version: 2.5.0 resolution: "tslib@npm:2.5.0" checksum: ae3ed5f9ce29932d049908ebfdf21b3a003a85653a9a140d614da6b767a93ef94f460e52c3d787f0e4f383546981713f165037dc2274df212ea9f8a4541004e1 @@ -34128,6 +34867,15 @@ __metadata: languageName: node linkType: hard +"uid@npm:2.0.1": + version: 2.0.1 + resolution: "uid@npm:2.0.1" + dependencies: + "@lukeed/csprng": ^1.0.0 + checksum: 0a3c697d8dd1f3b647afa35c411b11fd8fa2fb6dbd8a49fe109a4aa5214068c2c58781aa6e4516dfd16f0fc524fb7bba0833e9c1dc1ed3f1965b520349be9ad5 + languageName: node + linkType: hard + "uint8arrays@npm:^2.0.5, uint8arrays@npm:^2.1.2": version: 2.1.10 resolution: "uint8arrays@npm:2.1.10" @@ -34137,7 +34885,7 @@ __metadata: languageName: node linkType: hard -"uint8arrays@npm:^3.0.0": +"uint8arrays@npm:^3.0.0, uint8arrays@npm:^3.1.0": version: 3.1.1 resolution: "uint8arrays@npm:3.1.1" dependencies: @@ -34530,7 +35278,7 @@ __metadata: languageName: node linkType: hard -"use-sync-external-store@npm:^1.0.0, use-sync-external-store@npm:^1.2.0": +"use-sync-external-store@npm:1.2.0, use-sync-external-store@npm:^1.0.0, use-sync-external-store@npm:^1.2.0": version: 1.2.0 resolution: "use-sync-external-store@npm:1.2.0" peerDependencies: @@ -34662,7 +35410,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:8.3.2, uuid@npm:^8.3.0, uuid@npm:^8.3.2": +"uuid@npm:^8.3.0, uuid@npm:^8.3.2": version: 8.3.2 resolution: "uuid@npm:8.3.2" bin: @@ -34733,6 +35481,21 @@ __metadata: languageName: node linkType: hard +"valtio@npm:1.11.0": + version: 1.11.0 + resolution: "valtio@npm:1.11.0" + dependencies: + proxy-compare: 2.5.1 + use-sync-external-store: 1.2.0 + peerDependencies: + react: ">=16.8" + peerDependenciesMeta: + react: + optional: true + checksum: 77e42f5841054ba3e41b456fbb96b679eaeb6d9dbb46b7ce9aee6acf1352de73969858dea837a706c969ca908155d6cb97966e33be10b69b097744dd99b5174a + languageName: node + linkType: hard + "value-or-promise@npm:1.0.12, value-or-promise@npm:^1.0.11": version: 1.0.12 resolution: "value-or-promise@npm:1.0.12" @@ -36107,7 +36870,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^7.3.1, ws@npm:^7.4.0, ws@npm:^7.4.5, ws@npm:^7.4.6": +"ws@npm:^7.3.1, ws@npm:^7.4.5, ws@npm:^7.4.6, ws@npm:^7.5.1": version: 7.5.9 resolution: "ws@npm:7.5.9" peerDependencies: @@ -36515,3 +37278,23 @@ __metadata: checksum: b7289084bc1fc74a559b7259faa23d3214b14b538a8843d2b001a35e27147833f4107590b1b44bf5bc7f6dfe6f488660d3a3725f268e09b3925b3476153b7821 languageName: node linkType: hard + +"zustand@npm:4.4.0": + version: 4.4.0 + resolution: "zustand@npm:4.4.0" + dependencies: + use-sync-external-store: 1.2.0 + peerDependencies: + "@types/react": ">=16.8" + immer: ">=9.0" + react: ">=16.8" + peerDependenciesMeta: + "@types/react": + optional: true + immer: + optional: true + react: + optional: true + checksum: 37e69eec1b56677a93712e5aa6d0048b55997379919dc0f78f61181f8a58994a6cae064f816f8101f5b1039008d3c1c9d136432a62e0edeb796807cc84cf45ef + languageName: node + linkType: hard