From 752f2346bb9eedabc1592f9721e2bdd16068e4d4 Mon Sep 17 00:00:00 2001 From: Majorfi Date: Fri, 22 Mar 2024 11:31:34 +0100 Subject: [PATCH] build: bump --- package.json | 4 +- src/components/ModalMobileMenu.tsx | 2 +- src/contexts/useYearn.helper.tsx | 158 ++++++++++++++++++++++------- src/contexts/useYearn.tsx | 121 +++++++++------------- src/contexts/useYearnWallet.tsx | 12 +-- yarn.lock | 141 +++++++++++++++++++++---- 6 files changed, 301 insertions(+), 137 deletions(-) diff --git a/package.json b/package.json index 81c92429..a483a883 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yearn-finance/web-lib", - "version": "3.0.182", + "version": "3.0.184", "main": "./dist/index.js", "types": "./dist/index.d.js", "files": [ @@ -25,7 +25,7 @@ "export": "tsc && next build && next export -o ipfs" }, "dependencies": { - "@builtbymom/web3": "^0.0.43", + "@builtbymom/web3": "^0.0.59", "@headlessui/react": "^1.7.18", "@rainbow-me/rainbowkit": "^2.0.1", "@react-hookz/web": "^24.0.4", diff --git a/src/components/ModalMobileMenu.tsx b/src/components/ModalMobileMenu.tsx index 00debc57..7be899e2 100755 --- a/src/components/ModalMobileMenu.tsx +++ b/src/components/ModalMobileMenu.tsx @@ -88,7 +88,7 @@ export function ModalMobileMenu(props: TModalMobileMenu): ReactElement { const noFork = config.chains.filter(({id}): boolean => id !== 1337); return noFork.map((network: Chain): TNetwork => ({value: network.id, label: network.name})); } catch (error) { - const config = getConfig({chains: props.supportedNetworks}); + const config = getConfig({chains: props.supportedNetworks as any[]}); const noFork = config.chains.filter(({id}): boolean => id !== 1337); return noFork.map((network: Chain): TNetwork => ({value: network.id, label: network.name})); } diff --git a/src/contexts/useYearn.helper.tsx b/src/contexts/useYearn.helper.tsx index 882d91fc..bd0a7032 100644 --- a/src/contexts/useYearn.helper.tsx +++ b/src/contexts/useYearn.helper.tsx @@ -1,8 +1,12 @@ -import {useCallback, useMemo} from 'react'; +import {useCallback, useMemo, useState} from 'react'; +import {useTokenList} from '@builtbymom/web3/contexts/WithTokenList'; import {useBalances} from '@builtbymom/web3/hooks/useBalances.multichains'; +import {useChainID} from '@builtbymom/web3/hooks/useChainID'; import {toAddress} from '@builtbymom/web3/utils'; +import {getNetwork} from '@builtbymom/web3/utils/wagmi'; import {useDeepCompareMemo} from '@react-hookz/web'; +import {useFetchYearnTokens} from '../hooks/useFetchYearnTokens'; import { CRV_TOKEN_ADDRESS, CVXCRV_TOKEN_ADDRESS, @@ -14,18 +18,63 @@ import { YVBOOST_TOKEN_ADDRESS, YVECRV_TOKEN_ADDRESS } from '../utils/constants'; -import {useYearn} from './useYearn'; import type {TUseBalancesTokens} from '@builtbymom/web3/hooks/useBalances.multichains'; -import type {TDict} from '@builtbymom/web3/types'; +import type {TDict, TNDict} from '@builtbymom/web3/types'; import type {TYChainTokens} from '../types'; +import type {TYDaemonToken} from '../utils/schemas/yDaemonTokensSchema'; import type {TYDaemonVault} from '../utils/schemas/yDaemonVaultsSchemas'; -export function useYearnTokens({shouldUseForknetBalances}: {shouldUseForknetBalances: boolean}): TUseBalancesTokens[] { - const {vaults, vaultsMigrations, vaultsRetired, isLoadingVaultList} = useYearn(); +export function useYearnTokens({ + vaults, + vaultsMigrations, + vaultsRetired, + isLoadingVaultList +}: { + vaults: TDict; + vaultsMigrations: TDict; + vaultsRetired: TDict; + isLoadingVaultList: boolean; +}): TUseBalancesTokens[] { + const yearnTokens = useFetchYearnTokens() as unknown as TNDict>; + const {currentNetworkTokenList} = useTokenList(); + const {safeChainID} = useChainID(); + const [isReady, set_isReady] = useState(false); + + /************************************************************************** + ** Define the list of available tokens. This list is retrieved from the + ** tokenList context and filtered to only keep the tokens of the current + ** network. + **************************************************************************/ + const availableTokenListTokens = useMemo((): TUseBalancesTokens[] => { + const withTokenList = [...Object.values(currentNetworkTokenList)]; + const tokens: TUseBalancesTokens[] = []; + withTokenList.forEach((token): void => { + tokens.push({ + address: toAddress(token.address), + chainID: token.chainID, + decimals: Number(token.decimals), + name: token.name, + symbol: token.symbol + }); + }); + const {wrappedToken} = getNetwork(safeChainID).contracts; + if (wrappedToken) { + tokens.push({ + address: toAddress(ETH_TOKEN_ADDRESS), + chainID: safeChainID, + decimals: wrappedToken.decimals, + name: wrappedToken.coinName, + symbol: wrappedToken.coinSymbol + }); + } + return tokens; + }, [safeChainID, currentNetworkTokenList]); + + //List available tokens const availableTokens = useMemo((): TUseBalancesTokens[] => { - if (isLoadingVaultList) { + if (isLoadingVaultList || !yearnTokens) { return []; } const tokens: TUseBalancesTokens[] = []; @@ -51,7 +100,7 @@ export function useYearnTokens({shouldUseForknetBalances}: {shouldUseForknetBala ); for (const token of extraTokens) { - tokensExists[token.address] = true; + tokensExists[toAddress(token.address)] = true; tokens.push(token); } @@ -60,27 +109,57 @@ export function useYearnTokens({shouldUseForknetBalances}: {shouldUseForknetBala return; } if (vault?.address && !tokensExists[toAddress(vault?.address)]) { - tokens.push({address: vault.address, chainID: vault.chainID}); + tokens.push({ + address: vault.address, + chainID: vault.chainID, + symbol: vault.symbol, + decimals: vault.decimals, + name: vault.name + }); tokensExists[vault.address] = true; } if (vault?.token?.address && !tokensExists[toAddress(vault?.token?.address)]) { - tokens.push({address: vault.token.address, chainID: vault.chainID}); + tokens.push({ + address: vault.token.address, + chainID: vault.chainID, + symbol: vault.symbol, + decimals: vault.decimals, + name: vault.name + }); tokensExists[vault.token.address] = true; } if (vault?.staking?.available && !tokensExists[toAddress(vault?.staking?.address)]) { tokens.push({ - address: vault?.staking?.address, + address: toAddress(vault?.staking?.address), chainID: vault.chainID, symbol: vault.symbol, decimals: vault.decimals, name: vault.name }); - tokensExists[vault?.staking?.address] = true; + tokensExists[toAddress(vault?.staking?.address)] = true; } }); + for (const [chainID, tokensData] of Object.entries(yearnTokens)) { + if (tokensData) { + for (const [address, token] of Object.entries(tokensData)) { + if (token && !tokensExists[toAddress(address)]) { + tokens.push({ + address: toAddress(address), + chainID: Number(chainID), + decimals: token.decimals, + name: token.name, + symbol: token.symbol + }); + tokensExists[toAddress(address)] = true; + } + } + } + } + + set_isReady(true); return tokens; - }, [isLoadingVaultList, vaults]); + }, [isLoadingVaultList, vaults, yearnTokens]); //List all vaults with a possible migration const migratableTokens = useMemo((): TUseBalancesTokens[] => { @@ -94,6 +173,7 @@ export function useYearnTokens({shouldUseForknetBalances}: {shouldUseForknetBala return tokens; }, [vaultsMigrations]); + //List retried tokens const retiredTokens = useMemo((): TUseBalancesTokens[] => { const tokens: TUseBalancesTokens[] = []; Object.values(vaultsRetired || {}).forEach((vault?: TYDaemonVault): void => { @@ -106,39 +186,45 @@ export function useYearnTokens({shouldUseForknetBalances}: {shouldUseForknetBala }, [vaultsRetired]); const allTokens = useMemo((): TUseBalancesTokens[] => { - const tokens = [...availableTokens, ...migratableTokens, ...retiredTokens]; - if (!shouldUseForknetBalances) { - return tokens; - } - for (const token of tokens) { - if (token.chainID === 1) { - //remove it - tokens.push({...token, chainID: 1337}); - } + if (!isReady) { + return []; } + const tokens = [...availableTokens, ...migratableTokens, ...retiredTokens, ...availableTokenListTokens]; return tokens; - }, [availableTokens, migratableTokens, retiredTokens, shouldUseForknetBalances]); + }, [isReady, availableTokens, migratableTokens, retiredTokens, availableTokenListTokens]); return allTokens; } -export function useYearnBalances({shouldUseForknetBalances}: {shouldUseForknetBalances: boolean}): { - tokens: TYChainTokens; - isLoading: boolean; +export function useYearnBalances({ + vaults, + vaultsMigrations, + vaultsRetired, + isLoadingVaultList +}: { + vaults: TDict; + vaultsMigrations: TDict; + vaultsRetired: TDict; + isLoadingVaultList: boolean; +}): { + balances: TYChainTokens; + isLoadingBalances: boolean; onRefresh: (tokenToUpdate?: TUseBalancesTokens[]) => Promise; } { - const {prices} = useYearn(); - const allTokens = useYearnTokens({shouldUseForknetBalances}); - const {data: tokensRaw, onUpdate, onUpdateSome, isLoading} = useBalances({tokens: allTokens, prices}); - - const tokens = useDeepCompareMemo((): TYChainTokens => { + const allTokens = useYearnTokens({vaults, vaultsMigrations, vaultsRetired, isLoadingVaultList}); + const { + data: tokensRaw, + onUpdate, + onUpdateSome, + isLoading + } = useBalances({ + tokens: allTokens + }); + + const balances = useDeepCompareMemo((): TYChainTokens => { const _tokens = {...tokensRaw}; - if (shouldUseForknetBalances) { - _tokens[1] = _tokens[1337]; // eslint-disable-line prefer-destructuring - } - return _tokens as TYChainTokens; - }, [tokensRaw, shouldUseForknetBalances]); + }, [tokensRaw]); const onRefresh = useCallback( async (tokenToUpdate?: TUseBalancesTokens[]): Promise => { @@ -152,5 +238,5 @@ export function useYearnBalances({shouldUseForknetBalances}: {shouldUseForknetBa [onUpdate, onUpdateSome] ); - return {tokens, isLoading, onRefresh}; + return {balances, isLoadingBalances: isLoading, onRefresh}; } diff --git a/src/contexts/useYearn.tsx b/src/contexts/useYearn.tsx index ddcd5bda..3b550564 100755 --- a/src/contexts/useYearn.tsx +++ b/src/contexts/useYearn.tsx @@ -1,4 +1,4 @@ -import {createContext, memo, useCallback, useContext, useEffect, useMemo, useState} from 'react'; +import {createContext, memo, useCallback, useContext, useMemo} from 'react'; import {deserialize, serialize} from 'wagmi'; import {useWeb3} from '@builtbymom/web3/contexts/useWeb3'; import {isZeroAddress, toAddress, toNormalizedBN, zeroNormalizedBN} from '@builtbymom/web3/utils'; @@ -6,7 +6,6 @@ import {useLocalStorageValue} from '@react-hookz/web'; import {useFetchYearnEarnedForUser} from '../hooks/useFetchYearnEarnedForUser'; import {useFetchYearnPrices} from '../hooks/useFetchYearnPrices'; -import {useFetchYearnTokens} from '../hooks/useFetchYearnTokens'; import {useFetchYearnVaults} from '../hooks/useFetchYearnVaults'; import {Solver} from '../utils/schemas/yDaemonTokenListBalances'; import {useYearnBalances} from './useYearn.helper'; @@ -19,7 +18,6 @@ import type {TYChainTokens, TYToken} from '../types'; import type {TYDaemonEarned} from '../utils/schemas/yDaemonEarnedSchema'; import type {TYDaemonPricesChain} from '../utils/schemas/yDaemonPricesSchema'; import type {TSolver} from '../utils/schemas/yDaemonTokenListBalances'; -import type {TYDaemonTokens} from '../utils/schemas/yDaemonTokensSchema'; import type {TYDaemonVault, TYDaemonVaults} from '../utils/schemas/yDaemonVaultsSchemas'; export const DEFAULT_SLIPPAGE = 0.5; @@ -30,7 +28,6 @@ export type TYearnContext = { currentPartner: TAddress; earned?: TYDaemonEarned; prices?: TYDaemonPricesChain; - tokens?: TYDaemonTokens; vaults: TDict; vaultsMigrations: TDict; vaultsRetired: TDict; @@ -53,9 +50,7 @@ export type TYearnContext = { cumulatedValueInV2Vaults: number; cumulatedValueInV3Vaults: number; isLoading: boolean; - shouldUseForknetBalances: boolean; onRefresh: (tokenList?: TUseBalancesTokens[]) => Promise; - triggerForknetBalances: () => void; }; const defaultToken: TYToken = { @@ -66,7 +61,6 @@ const defaultToken: TYToken = { chainID: 1, value: 0, stakingValue: 0, - price: zeroNormalizedBN, balance: zeroNormalizedBN, supportedZaps: [] }; @@ -79,7 +73,6 @@ const YearnContext = createContext({ totalUnrealizedGainsUSD: 0 }, prices: {}, - tokens: {}, vaults: {}, vaultsMigrations: {}, vaultsRetired: {}, @@ -103,14 +96,11 @@ const YearnContext = createContext({ cumulatedValueInV2Vaults: 0, cumulatedValueInV3Vaults: 0, isLoading: true, - shouldUseForknetBalances: false, - onRefresh: async (): Promise => ({}), - triggerForknetBalances: (): void => {} + onRefresh: async (): Promise => ({}) }); export const YearnContextApp = memo(function YearnContextApp({children}: {children: ReactElement}): ReactElement { const {address: userAddress} = useWeb3(); - const [shouldUseForknetBalances, set_shouldUseForknetBalances] = useState(false); const {value: maxLoss, set: set_maxLoss} = useLocalStorageValue('yearn.fi/max-loss', { defaultValue: DEFAULT_MAX_LOSS, parse: (str, fallback): bigint => (str ? deserialize(str) : fallback ?? DEFAULT_MAX_LOSS), @@ -130,83 +120,82 @@ export const YearnContextApp = memo(function YearnContextApp({children}: {childr ); const prices = useFetchYearnPrices(); - const tokens = useFetchYearnTokens(); const earned = useFetchYearnEarnedForUser(); const {vaults, vaultsMigrations, vaultsRetired, isLoading, mutate} = useFetchYearnVaults(); - const {tokens: balances, isLoading: isLoadingBalances, onRefresh} = useYearnBalances({shouldUseForknetBalances}); - - useEffect(() => { - const tokensToRefresh: TUseBalancesTokens[] = []; - for (const [chainID, tokensData] of Object.entries(tokens)) { - if (tokensData) { - for (const [address, token] of Object.entries(tokensData)) { - if (token) { - tokensToRefresh.push({address: toAddress(address), chainID: Number(chainID)}); - } - } + const {balances, isLoadingBalances, onRefresh} = useYearnBalances({ + vaults, + vaultsMigrations, + vaultsRetired, + isLoadingVaultList: isLoading + }); + + const getToken = useCallback( + ({address, chainID}: TTokenAndChain): TYToken => balances?.[chainID || 1]?.[address] || defaultToken, + [balances] + ); + + const getBalance = useCallback( + ({address, chainID}: TTokenAndChain): TNormalizedBN => { + if (isZeroAddress(userAddress)) { + return zeroNormalizedBN; } - } + return balances?.[chainID || 1]?.[address]?.balance || zeroNormalizedBN; + }, + [balances, userAddress] + ); - onRefresh(tokensToRefresh); - }, [tokens, onRefresh]); + const getPrice = useCallback( + ({address, chainID}: TTokenAndChain): TNormalizedBN => { + return toNormalizedBN(prices?.[chainID]?.[address] || 0, 6) || zeroNormalizedBN; + }, + [prices] + ); const [cumulatedValueInV2Vaults, cumulatedValueInV3Vaults] = useMemo((): [number, number] => { let cumulatedValueInV2Vaults = 0; let cumulatedValueInV3Vaults = 0; - for (const [, perChain] of Object.entries(balances)) { + + for (const perChain of Object.values(balances)) { for (const [tokenAddress, tokenData] of Object.entries(perChain)) { - if (tokenData.value + tokenData.stakingValue === 0) { + if (!vaults?.[toAddress(tokenData.address)]) { continue; } + const tokenBalance = getBalance({address: tokenData.address, chainID: tokenData.chainID}); + const tokenPrice = getPrice({address: tokenData.address, chainID: tokenData.chainID}); + const tokenValue = tokenBalance.normalized * tokenPrice.normalized; + + let stakingValue = 0; + const hasStaking = vaults[toAddress(tokenData.address)].staking.available; + if (hasStaking) { + const stakingAddress = vaults[toAddress(tokenData.address)].staking.address; + const stakingBalance = getBalance({address: stakingAddress, chainID: tokenData.chainID}); + stakingValue = stakingBalance.normalized * tokenPrice.normalized; + } + // console.log(tokenValue, stakingValue, tokenBalance.normalized, tokenPrice.normalized); + if (vaults?.[toAddress(tokenAddress)]) { if (vaults[toAddress(tokenAddress)].version.split('.')?.[0] === '3') { - cumulatedValueInV3Vaults += tokenData.value + tokenData.stakingValue; + cumulatedValueInV3Vaults += tokenValue + stakingValue; } else { - cumulatedValueInV2Vaults += tokenData.value + tokenData.stakingValue; + cumulatedValueInV2Vaults += tokenValue + stakingValue; } } else if (vaultsMigrations?.[toAddress(tokenAddress)]) { if (vaultsMigrations[toAddress(tokenAddress)].version.split('.')?.[0] === '3') { - cumulatedValueInV3Vaults += tokenData.value + tokenData.stakingValue; + cumulatedValueInV3Vaults += tokenValue + stakingValue; } else { - cumulatedValueInV2Vaults += tokenData.value + tokenData.stakingValue; + cumulatedValueInV2Vaults += tokenValue + stakingValue; } } } } return [cumulatedValueInV2Vaults, cumulatedValueInV3Vaults]; - }, [vaults, vaultsMigrations, balances]); - - const getToken = useCallback( - ({address, chainID}: TTokenAndChain): TYToken => balances?.[chainID || 1]?.[address] || defaultToken, - [balances] - ); - const getBalance = useCallback( - ({address, chainID}: TTokenAndChain): TNormalizedBN => { - if (isZeroAddress(userAddress)) { - return zeroNormalizedBN; - } - return balances?.[chainID || 1]?.[address]?.balance || zeroNormalizedBN; - }, - [balances, userAddress] - ); - - const getPrice = useCallback( - ({address, chainID}: TTokenAndChain): TNormalizedBN => { - const price = balances?.[chainID || 1]?.[address]?.price; - if (!price) { - return toNormalizedBN(prices?.[chainID]?.[address] || 0, 6) || zeroNormalizedBN; - } - return price; - }, - [prices, balances] - ); + }, [balances, getBalance, getPrice, vaults, vaultsMigrations]); return ( - set_shouldUseForknetBalances((s): boolean => { - const isEnabled = !s; - if (!(window as any).ethereum) { - (window as any).ethereum = {}; - } - (window as any).ethereum.useForknetForMainnet = isEnabled; - return isEnabled; - }) + onRefresh }}> {children} diff --git a/src/contexts/useYearnWallet.tsx b/src/contexts/useYearnWallet.tsx index 8d5335c4..5abf3f30 100755 --- a/src/contexts/useYearnWallet.tsx +++ b/src/contexts/useYearnWallet.tsx @@ -45,7 +45,6 @@ const defaultToken: TYToken = { chainID: 1, value: 0, stakingValue: 0, - price: zeroNormalizedBN, balance: zeroNormalizedBN, supportedZaps: [] }; @@ -169,9 +168,8 @@ function useYearnBalances({shouldUseForknetBalances}: {shouldUseForknetBalances: isLoading: boolean; onRefresh: (tokenToUpdate?: TUseBalancesTokens[]) => Promise; } { - const {prices} = useYearn(); const allTokens = useYearnTokens({shouldUseForknetBalances}); - const {data: tokensRaw, onUpdate, onUpdateSome, isLoading} = useBalances({tokens: allTokens, prices}); + const {data: tokensRaw, onUpdate, onUpdateSome, isLoading} = useBalances({tokens: allTokens}); const tokens = useDeepCompareMemo((): TYChainTokens => { const _tokens = {...tokensRaw}; @@ -252,13 +250,9 @@ export const YearnWalletContextApp = memo(function YearnWalletContextApp(props: const getPrice = useCallback( ({address, chainID}: TTokenAndChain): TNormalizedBN => { - const price = balances?.[chainID || 1]?.[address]?.price; - if (!price) { - return toNormalizedBN(prices?.[chainID]?.[address] || 0, 6) || zeroNormalizedBN; - } - return price; + return toNormalizedBN(prices?.[chainID]?.[address] || 0, 6) || zeroNormalizedBN; }, - [prices, balances] + [prices] ); /* 🔵 - Yearn Finance ****************************************************** diff --git a/yarn.lock b/yarn.lock index ed60b402..c3a455e7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -395,25 +395,25 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@builtbymom/web3@^0.0.43": - version "0.0.43" - resolved "https://registry.yarnpkg.com/@builtbymom/web3/-/web3-0.0.43.tgz#f402959b4cee26960ce8b0eb0dff64a627ed6434" - integrity sha512-ikXThfH0Yn9XaAtUkGJKu3KB25nxog+3O0uxdMlgUvjY817U1ywsSOFaO247dRGEYK+PkZ2uObVu6ighIFE4Qw== +"@builtbymom/web3@^0.0.59": + version "0.0.59" + resolved "https://registry.yarnpkg.com/@builtbymom/web3/-/web3-0.0.59.tgz#a909ec5138dc90a9f284b57fc91d3d61ae1bd510" + integrity sha512-gwjDfdmRxvW1q9ROME98yrJDIW4i3qUo+okpGxRXRZoqIRftQx/3XkqekLscGLNBZIUZ6/gH5Lw51DpSqGAoiw== dependencies: - "@rainbow-me/rainbowkit" "^2.0.1" + "@rainbow-me/rainbowkit" "^2.0.2" "@react-hookz/web" "^24.0.4" - "@tanstack/react-query" "^5.25.0" + "@tanstack/react-query" "^5.28.2" "@total-typescript/ts-reset" "^0.5.1" "@wagmi/core" "^2.6.5" bun-types "^1.0.30" ethers "5.7.2" eventemitter3 "^5.0.1" lint-staged "^15.2.2" - next "^14.0.4" + next "^14.1.3" prettier "^3.2.5" react-hot-toast "2.4.1" swr "^2.2.5" - viem "^2.7.20" + viem "^2.8.9" wagmi "^2.5.7" zod "^3.22.4" @@ -1913,6 +1913,11 @@ resolved "https://registry.yarnpkg.com/@next/env/-/env-14.0.4.tgz#d5cda0c4a862d70ae760e58c0cd96a8899a2e49a" integrity sha512-irQnbMLbUNQpP1wcE5NstJtbuA/69kRfzBrpAD7Gsn8zm/CY6YQYc3HQBz8QPxwISG26tIm5afvvVbu508oBeQ== +"@next/env@14.1.4": + version "14.1.4" + resolved "https://registry.yarnpkg.com/@next/env/-/env-14.1.4.tgz#432e80651733fbd67230bf262aee28be65252674" + integrity sha512-e7X7bbn3Z6DWnDi75UWn+REgAbLEqxI8Tq2pkFOFAMpWAWApz/YCUhtWMWn410h8Q2fYiYL7Yg5OlxMOCfFjJQ== + "@next/eslint-plugin-next@14.1.3": version "14.1.3" resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-14.1.3.tgz#31ffb36dbd5d04537aff83eb69ec23007d081608" @@ -1925,46 +1930,91 @@ resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.0.4.tgz#27b1854c2cd04eb1d5e75081a1a792ad91526618" integrity sha512-mF05E/5uPthWzyYDyptcwHptucf/jj09i2SXBPwNzbgBNc+XnwzrL0U6BmPjQeOL+FiB+iG1gwBeq7mlDjSRPg== +"@next/swc-darwin-arm64@14.1.4": + version "14.1.4" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.4.tgz#a3bca0dc4393ac4cf3169bbf24df63441de66bb7" + integrity sha512-ubmUkbmW65nIAOmoxT1IROZdmmJMmdYvXIe8211send9ZYJu+SqxSnJM4TrPj9wmL6g9Atvj0S/2cFmMSS99jg== + "@next/swc-darwin-x64@14.0.4": version "14.0.4" resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.0.4.tgz#9940c449e757d0ee50bb9e792d2600cc08a3eb3b" integrity sha512-IZQ3C7Bx0k2rYtrZZxKKiusMTM9WWcK5ajyhOZkYYTCc8xytmwSzR1skU7qLgVT/EY9xtXDG0WhY6fyujnI3rw== +"@next/swc-darwin-x64@14.1.4": + version "14.1.4" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.4.tgz#ba3683d4e2d30099f3f2864dd7349a4d9f440140" + integrity sha512-b0Xo1ELj3u7IkZWAKcJPJEhBop117U78l70nfoQGo4xUSvv0PJSTaV4U9xQBLvZlnjsYkc8RwQN1HoH/oQmLlQ== + "@next/swc-linux-arm64-gnu@14.0.4": version "14.0.4" resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.0.4.tgz#0eafd27c8587f68ace7b4fa80695711a8434de21" integrity sha512-VwwZKrBQo/MGb1VOrxJ6LrKvbpo7UbROuyMRvQKTFKhNaXjUmKTu7wxVkIuCARAfiI8JpaWAnKR+D6tzpCcM4w== +"@next/swc-linux-arm64-gnu@14.1.4": + version "14.1.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.4.tgz#3519969293f16379954b7e196deb0c1eecbb2f8b" + integrity sha512-457G0hcLrdYA/u1O2XkRMsDKId5VKe3uKPvrKVOyuARa6nXrdhJOOYU9hkKKyQTMru1B8qEP78IAhf/1XnVqKA== + "@next/swc-linux-arm64-musl@14.0.4": version "14.0.4" resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.0.4.tgz#2b0072adb213f36dada5394ea67d6e82069ae7dd" integrity sha512-8QftwPEW37XxXoAwsn+nXlodKWHfpMaSvt81W43Wh8dv0gkheD+30ezWMcFGHLI71KiWmHK5PSQbTQGUiidvLQ== +"@next/swc-linux-arm64-musl@14.1.4": + version "14.1.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.4.tgz#4bb3196bd402b3f84cf5373ff1021f547264d62f" + integrity sha512-l/kMG+z6MB+fKA9KdtyprkTQ1ihlJcBh66cf0HvqGP+rXBbOXX0dpJatjZbHeunvEHoBBS69GYQG5ry78JMy3g== + "@next/swc-linux-x64-gnu@14.0.4": version "14.0.4" resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.0.4.tgz#68c67d20ebc8e3f6ced6ff23a4ba2a679dbcec32" integrity sha512-/s/Pme3VKfZAfISlYVq2hzFS8AcAIOTnoKupc/j4WlvF6GQ0VouS2Q2KEgPuO1eMBwakWPB1aYFIA4VNVh667A== +"@next/swc-linux-x64-gnu@14.1.4": + version "14.1.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.4.tgz#1b3372c98c83dcdab946cdb4ee06e068b8139ba3" + integrity sha512-BapIFZ3ZRnvQ1uWbmqEGJuPT9cgLwvKtxhK/L2t4QYO7l+/DxXuIGjvp1x8rvfa/x1FFSsipERZK70pewbtJtw== + "@next/swc-linux-x64-musl@14.0.4": version "14.0.4" resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.0.4.tgz#67cd81b42fb2caf313f7992fcf6d978af55a1247" integrity sha512-m8z/6Fyal4L9Bnlxde5g2Mfa1Z7dasMQyhEhskDATpqr+Y0mjOBZcXQ7G5U+vgL22cI4T7MfvgtrM2jdopqWaw== +"@next/swc-linux-x64-musl@14.1.4": + version "14.1.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.4.tgz#8459088bdc872648ff78f121db596f2533df5808" + integrity sha512-mqVxTwk4XuBl49qn2A5UmzFImoL1iLm0KQQwtdRJRKl21ylQwwGCxJtIYo2rbfkZHoSKlh/YgztY0qH3wG1xIg== + "@next/swc-win32-arm64-msvc@14.0.4": version "14.0.4" resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.0.4.tgz#be06585906b195d755ceda28f33c633e1443f1a3" integrity sha512-7Wv4PRiWIAWbm5XrGz3D8HUkCVDMMz9igffZG4NB1p4u1KoItwx9qjATHz88kwCEal/HXmbShucaslXCQXUM5w== +"@next/swc-win32-arm64-msvc@14.1.4": + version "14.1.4" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.4.tgz#84280a08c00cc3be24ddd3a12f4617b108e6dea6" + integrity sha512-xzxF4ErcumXjO2Pvg/wVGrtr9QQJLk3IyQX1ddAC/fi6/5jZCZ9xpuL9Tzc4KPWMFq8GGWFVDMshZOdHGdkvag== + "@next/swc-win32-ia32-msvc@14.0.4": version "14.0.4" resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.0.4.tgz#e76cabefa9f2d891599c3d85928475bd8d3f6600" integrity sha512-zLeNEAPULsl0phfGb4kdzF/cAVIfaC7hY+kt0/d+y9mzcZHsMS3hAS829WbJ31DkSlVKQeHEjZHIdhN+Pg7Gyg== +"@next/swc-win32-ia32-msvc@14.1.4": + version "14.1.4" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.4.tgz#23ff7f4bd0a27177428669ef6fa5c3923c738031" + integrity sha512-WZiz8OdbkpRw6/IU/lredZWKKZopUMhcI2F+XiMAcPja0uZYdMTZQRoQ0WZcvinn9xZAidimE7tN9W5v9Yyfyw== + "@next/swc-win32-x64-msvc@14.0.4": version "14.0.4" resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.0.4.tgz#e74892f1a9ccf41d3bf5979ad6d3d77c07b9cba1" integrity sha512-yEh2+R8qDlDCjxVpzOTEpBLQTEFAcP2A8fUFLaWNap9GitYKkKv1//y2S6XY6zsR4rCOPRpU7plYDR+az2n30A== +"@next/swc-win32-x64-msvc@14.1.4": + version "14.1.4" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.4.tgz#bccf5beccfde66d6c66fa4e2509118c796385eda" + integrity sha512-4Rto21sPfw555sZ/XNLqfxDUNeLhNYGO2dlPqsnuCg8N8a2a9u1ltqBOPQ4vj1Gf7eJC0W2hHG2eYUHuiXgY2w== + "@noble/curves@1.2.0", "@noble/curves@~1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" @@ -2120,6 +2170,19 @@ react-remove-scroll "2.5.7" ua-parser-js "^1.0.37" +"@rainbow-me/rainbowkit@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@rainbow-me/rainbowkit/-/rainbowkit-2.0.2.tgz#6122e349b7b87e4bb57ece374747c21915816ae7" + integrity sha512-xm/3iWxwL/ATVVWjtYVGviTJ4ldXwcvaic+bQnGg/pqzf8zKONkuzd5gNWLw0ft1iNG2IPHL1ABP9UoR2Trlaw== + dependencies: + "@vanilla-extract/css" "1.14.0" + "@vanilla-extract/dynamic" "2.1.0" + "@vanilla-extract/sprinkles" "1.6.1" + clsx "2.1.0" + qrcode "1.5.3" + react-remove-scroll "2.5.7" + ua-parser-js "^1.0.37" + "@react-hookz/deep-equal@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@react-hookz/deep-equal/-/deep-equal-1.0.4.tgz#68a71f36cbc88724b3ce6f4036183778b6e7f282" @@ -2451,17 +2514,17 @@ lodash.merge "^4.6.2" postcss-selector-parser "6.0.10" -"@tanstack/query-core@5.25.0": - version "5.25.0" - resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.25.0.tgz#e08ed0a9fad34c8005d1a282e57280031ac50cdc" - integrity sha512-vlobHP64HTuSE68lWF1mEhwSRC5Q7gaT+a/m9S+ItuN+ruSOxe1rFnR9j0ACWQ314BPhBEVKfBQ6mHL0OWfdbQ== +"@tanstack/query-core@5.28.6": + version "5.28.6" + resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.28.6.tgz#a3bdb108f9f8d4e2ba3163068dbe6ff55b905a81" + integrity sha512-hnhotV+DnQtvtR3jPvbQMPNMW4KEK0J4k7c609zJ8muiNknm+yoDyMHmxTWM5ZnlZpsz0zOxYFr+mzRJNHWJsA== -"@tanstack/react-query@^5.25.0": - version "5.25.0" - resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.25.0.tgz#f4dac794cf10dd956aa56dbbdf67049a5ba2669d" - integrity sha512-u+n5R7mLO7RmeiIonpaCRVXNRWtZEef/aVZ/XGWRPa7trBIvGtzlfo0Ah7ZtnTYfrKEVwnZ/tzRCBcoiqJ/tFw== +"@tanstack/react-query@^5.28.2": + version "5.28.6" + resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.28.6.tgz#0d52b0a98a1d842debf9c65496e20a9981a23bc4" + integrity sha512-/DdYuDBSsA21Qbcder1R8Cr/3Nx0ZnA2lgtqKsLMvov8wL4+g0HBz/gWYZPlIsof7iyfQafyhg4wUVUsS3vWZw== dependencies: - "@tanstack/query-core" "5.25.0" + "@tanstack/query-core" "5.28.6" "@tanstack/react-virtual@^3.0.0-beta.60": version "3.0.1" @@ -3792,6 +3855,11 @@ caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001565: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001576.tgz#893be772cf8ee6056d6c1e2d07df365b9ec0a5c4" integrity sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg== +caniuse-lite@^1.0.30001579: + version "1.0.30001600" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz#93a3ee17a35aa6a9f0c6ef1b2ab49507d1ab9079" + integrity sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ== + caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001591: version "1.0.30001596" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001596.tgz#da06b79c3d9c3d9958eb307aa832ac68ead79bee" @@ -7301,6 +7369,29 @@ next@^14.0.4: "@next/swc-win32-ia32-msvc" "14.0.4" "@next/swc-win32-x64-msvc" "14.0.4" +next@^14.1.3: + version "14.1.4" + resolved "https://registry.yarnpkg.com/next/-/next-14.1.4.tgz#203310f7310578563fd5c961f0db4729ce7a502d" + integrity sha512-1WTaXeSrUwlz/XcnhGTY7+8eiaFvdet5z9u3V2jb+Ek1vFo0VhHKSAIJvDWfQpttWjnyw14kBeq28TPq7bTeEQ== + dependencies: + "@next/env" "14.1.4" + "@swc/helpers" "0.5.2" + busboy "1.6.0" + caniuse-lite "^1.0.30001579" + graceful-fs "^4.2.11" + postcss "8.4.31" + styled-jsx "5.1.1" + optionalDependencies: + "@next/swc-darwin-arm64" "14.1.4" + "@next/swc-darwin-x64" "14.1.4" + "@next/swc-linux-arm64-gnu" "14.1.4" + "@next/swc-linux-arm64-musl" "14.1.4" + "@next/swc-linux-x64-gnu" "14.1.4" + "@next/swc-linux-x64-musl" "14.1.4" + "@next/swc-win32-arm64-msvc" "14.1.4" + "@next/swc-win32-ia32-msvc" "14.1.4" + "@next/swc-win32-x64-msvc" "14.1.4" + node-addon-api@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" @@ -9393,7 +9484,7 @@ viem@^1.0.0, viem@^1.1.4: isows "1.0.3" ws "8.13.0" -viem@^2.7.20, viem@^2.7.22: +viem@^2.7.22: version "2.7.22" resolved "https://registry.yarnpkg.com/viem/-/viem-2.7.22.tgz#b6991b73f348d8e3a151f4acea08fddfdc449805" integrity sha512-R/d9AkWXkhiNF4Gk4/A389LSO5PGDdHUBFDKIUkhrdLTDpOhKzbNln6qDry3kYUcmH7lErx3C2eA6rajnc0s9A== @@ -9407,6 +9498,20 @@ viem@^2.7.20, viem@^2.7.22: isows "1.0.3" ws "8.13.0" +viem@^2.8.9: + version "2.8.18" + resolved "https://registry.yarnpkg.com/viem/-/viem-2.8.18.tgz#ffb051bf80381ffefc98087a20c177b25463c9f4" + integrity sha512-Kq3kwkKziJ8rQeLkmdbSLheHDnA+tx2EdLKLmQ3N4FVtjKYjBP9tPL1r+fI6KltVUM1TDOhIHOdslDSp57VMMg== + dependencies: + "@adraffy/ens-normalize" "1.10.0" + "@noble/curves" "1.2.0" + "@noble/hashes" "1.3.2" + "@scure/bip32" "1.3.2" + "@scure/bip39" "1.2.1" + abitype "1.0.0" + isows "1.0.3" + ws "8.13.0" + void-elements@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-3.1.0.tgz#614f7fbf8d801f0bb5f0661f5b2f5785750e4f09"