From b33b21a7712dcbb3e6c94aa467bcbe61cdcd89d6 Mon Sep 17 00:00:00 2001 From: CAst Date: Thu, 29 Feb 2024 22:28:39 +0500 Subject: [PATCH] [fix-scheme] fixed (#73) --- src/graphql/subgraph/vault/vaultQuery.graphql | 4 ++-- src/methods/vault/requests/getVault/modifyVault.spec.ts | 2 +- src/methods/vault/requests/getVault/modifyVault.ts | 4 ++-- src/methods/vault/requests/getVault/types.ts | 2 +- src/utils/configs/gnosis.ts | 1 + src/utils/configs/goerli.ts | 3 +++ src/utils/configs/holesky.ts | 1 + src/utils/configs/mainnet.ts | 3 +++ 8 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/graphql/subgraph/vault/vaultQuery.graphql b/src/graphql/subgraph/vault/vaultQuery.graphql index 35d86c98..f22afa1c 100644 --- a/src/graphql/subgraph/vault/vaultQuery.graphql +++ b/src/graphql/subgraph/vault/vaultQuery.graphql @@ -2,6 +2,7 @@ query Vault($address: ID!) { vault(id: $address) { address: id performance: score + apy admin isErc20 imageUrl @@ -21,9 +22,8 @@ query Vault($address: ID!) { tokenSymbol feeRecipient validatorsRoot - blocklistManager - weeklyApy blocklistCount whitelistCount + blocklistManager } } diff --git a/src/methods/vault/requests/getVault/modifyVault.spec.ts b/src/methods/vault/requests/getVault/modifyVault.spec.ts index 04ccb0a1..e2f82589 100644 --- a/src/methods/vault/requests/getVault/modifyVault.spec.ts +++ b/src/methods/vault/requests/getVault/modifyVault.spec.ts @@ -20,7 +20,7 @@ describe('modifyVault', () => { tokenName: 'mockToken', createdAt: '1693395816', displayName: 'Mock Vault', - weeklyApy: '2.80', + apy: '2.80', blocklistCount: '0', whitelistCount: '0', totalAssets: '150000000000', diff --git a/src/methods/vault/requests/getVault/modifyVault.ts b/src/methods/vault/requests/getVault/modifyVault.ts index e08ae507..88d5b7e2 100644 --- a/src/methods/vault/requests/getVault/modifyVault.ts +++ b/src/methods/vault/requests/getVault/modifyVault.ts @@ -26,7 +26,7 @@ const modifyVault = (input: ModifyVaultInput): ModifiedVault => { feeRecipient, blocklistCount, whitelistCount, - weeklyApy, + apy, ...rest } = vault @@ -41,7 +41,7 @@ const modifyVault = (input: ModifyVaultInput): ModifiedVault => { totalAssets: formatEther(totalAssets), feeRecipient: getAddress(feeRecipient), vaultKeysManager: getAddress(keysManager), - apy: Number(weeklyApy), + apy: Number(apy), blocklistCount: Number(blocklistCount), whitelistCount: Number(whitelistCount), whitelister: vault.whitelister ? getAddress(vault.whitelister) : '', diff --git a/src/methods/vault/requests/getVault/types.ts b/src/methods/vault/requests/getVault/types.ts index 61fab980..ed02d90a 100644 --- a/src/methods/vault/requests/getVault/types.ts +++ b/src/methods/vault/requests/getVault/types.ts @@ -3,7 +3,7 @@ import type { VaultQueryPayload } from '../../../../graphql/subgraph/vault' export type ModifiedVault = Omit< VaultQueryPayload['vault'], - 'admin' | 'address' | 'mevEscrow' | 'keysManager' | 'weeklyApy' | 'performance' | 'createdAt' | 'blocklistCount' | 'whitelistCount' + 'admin' | 'address' | 'mevEscrow' | 'keysManager' | 'apy' | 'performance' | 'createdAt' | 'blocklistCount' | 'whitelistCount' > & { apy: number createdAt: number diff --git a/src/utils/configs/gnosis.ts b/src/utils/configs/gnosis.ts index bba26c72..13c55e5a 100644 --- a/src/utils/configs/gnosis.ts +++ b/src/utils/configs/gnosis.ts @@ -31,6 +31,7 @@ export default { mintToken: ZeroAddress, v2RewardToken: '0x6aC78efae880282396a335CA2F79863A1e6831D4', v2StakedToken: '0xA4eF9Da5BA71Cc0D2e5E877a910A37eC43420445', + strk: ZeroAddress, }, base: { keeper: ZeroAddress, diff --git a/src/utils/configs/goerli.ts b/src/utils/configs/goerli.ts index 2419cd55..dc49251f 100644 --- a/src/utils/configs/goerli.ts +++ b/src/utils/configs/goerli.ts @@ -1,3 +1,5 @@ +import { ZeroAddress } from 'ethers' + import tokens from '../constants/tokens' @@ -29,6 +31,7 @@ export default { mintToken: '0xBcF097a3d3D846934694C47058A3cc9D5A6f7457', v2RewardToken: '0x826f88d423440c305D9096cC1581Ae751eFCAfB0', v2StakedToken: '0x221D9812823DBAb0F1fB40b0D294D9875980Ac19', + strk: ZeroAddress, }, base: { keeper: '0x893ceb1cF23475defE3747670EbE4b40e629c6fD', diff --git a/src/utils/configs/holesky.ts b/src/utils/configs/holesky.ts index 4b95f24e..28174f3d 100644 --- a/src/utils/configs/holesky.ts +++ b/src/utils/configs/holesky.ts @@ -31,6 +31,7 @@ export default { mintToken: '0xF603c5A3F774F05d4D848A9bB139809790890864', v2RewardToken: ZeroAddress, v2StakedToken: ZeroAddress, + strk: '0xe8a222D887b468a71Ee8a27df4fa3b886A4B7BA1', }, base: { keeper: '0xB580799Bf7d62721D1a523f0FDF2f5Ed7BA4e259', diff --git a/src/utils/configs/mainnet.ts b/src/utils/configs/mainnet.ts index edd3d559..ab9b51bb 100644 --- a/src/utils/configs/mainnet.ts +++ b/src/utils/configs/mainnet.ts @@ -1,3 +1,5 @@ +import { ZeroAddress } from 'ethers' + import tokens from '../constants/tokens' @@ -29,6 +31,7 @@ export default { mintToken: '0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38', v2RewardToken: '0x20BC832ca081b91433ff6c17f85701B6e92486c5', v2StakedToken: '0xFe2e637202056d30016725477c5da089Ab0A043A', + strk: ZeroAddress, }, base: { keeper: '0x6B5815467da09DaA7DC83Db21c9239d98Bb487b5',