Skip to content

Commit

Permalink
build: bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Apr 10, 2024
1 parent 752f234 commit 1ce0317
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
5 changes: 3 additions & 2 deletions src/hooks/useFetchYearnVaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TYDaemonVault>;
vaultsMigrations: TDict<TYDaemonVault>;
vaultsRetired: TDict<TYDaemonVault>;
Expand All @@ -38,14 +38,15 @@ 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
});

const {data: vaultsMigrations} = useFetch<TYDaemonVaults>({
endpoint: `${yDaemonBaseUriWithoutChain}/vaults?${new URLSearchParams({
chainIDs: chainIDs ? chainIDs.join(',') : [1, 10, 137, 250, 8453, 42161].join(','),
migratable: 'nodust'
})}`,
schema: yDaemonVaultsSchema
Expand Down
9 changes: 6 additions & 3 deletions src/utils/schemas/yDaemonVaultsSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 1ce0317

Please sign in to comment.