From 1ce03176df6085af5b2be5363883dd19f7c847b6 Mon Sep 17 00:00:00 2001 From: Majorfi Date: Wed, 10 Apr 2024 11:49:21 +0200 Subject: [PATCH] build: bump --- package.json | 2 +- src/hooks/useFetchYearnVaults.ts | 5 +++-- src/utils/schemas/yDaemonVaultsSchemas.ts | 9 ++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index a483a883..fe663e91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yearn-finance/web-lib", - "version": "3.0.184", + "version": "3.0.185", "main": "./dist/index.js", "types": "./dist/index.d.js", "files": [ diff --git a/src/hooks/useFetchYearnVaults.ts b/src/hooks/useFetchYearnVaults.ts index c9a7eb83..8ec13f94 100644 --- a/src/hooks/useFetchYearnVaults.ts +++ b/src/hooks/useFetchYearnVaults.ts @@ -17,7 +17,7 @@ import type {TYDaemonVault, TYDaemonVaults} from '../utils/schemas/yDaemonVaults ** - The vaults that are in the migration process ** - The retired vaults *****************************************************************************/ -function useFetchYearnVaults(): { +function useFetchYearnVaults(chainIDs?: number[] | undefined): { vaults: TDict; vaultsMigrations: TDict; vaultsRetired: TDict; @@ -38,7 +38,7 @@ function useFetchYearnVaults(): { strategiesDetails: 'withDetails', strategiesRisk: 'withRisk', strategiesCondition: 'inQueue', - chainIDs: [1, 10, 137, 250, 8453, 42161].join(','), + chainIDs: chainIDs ? chainIDs.join(',') : [1, 10, 137, 250, 8453, 42161].join(','), limit: '2500' })}`, schema: yDaemonVaultsSchema @@ -46,6 +46,7 @@ function useFetchYearnVaults(): { const {data: vaultsMigrations} = useFetch({ endpoint: `${yDaemonBaseUriWithoutChain}/vaults?${new URLSearchParams({ + chainIDs: chainIDs ? chainIDs.join(',') : [1, 10, 137, 250, 8453, 42161].join(','), migratable: 'nodust' })}`, schema: yDaemonVaultsSchema diff --git a/src/utils/schemas/yDaemonVaultsSchemas.ts b/src/utils/schemas/yDaemonVaultsSchemas.ts index 5de230bd..f7d5708b 100644 --- a/src/utils/schemas/yDaemonVaultsSchemas.ts +++ b/src/utils/schemas/yDaemonVaultsSchemas.ts @@ -145,15 +145,18 @@ export const yDaemonVaultSchema = z.object({ staking: z .object({ address: addressSchema, - available: z.boolean().default(false).catch(false) + available: z.boolean().default(false).catch(false), + source: z.string().default('').catch('') }) .default({ address: toAddress(''), - available: false + available: false, + source: '' }) .catch({ address: toAddress(''), - available: false + available: false, + source: '' }), migration: z.object({ available: z.boolean(),