Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions composables/useEulerAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export type EulerLensAddresses = {
export type EulerTokenAddresses = {
EUL: string | undefined
rEUL: string | undefined
eUSD: string | undefined
seUSD: string | undefined
} | null

const allowedChainIds = ref<number[]>([])
Expand Down Expand Up @@ -135,8 +133,6 @@ export const useEulerAddresses = () => {
return {
EUL: config.addresses.tokenAddrs.EUL,
rEUL: config.addresses.tokenAddrs.rEUL,
eUSD: config.addresses.tokenAddrs.eUSD,
seUSD: config.addresses.tokenAddrs.seUSD,
}
})

Expand All @@ -150,18 +146,11 @@ export const useEulerAddresses = () => {
capRiskStewardFactory: peripheryAddrs.capRiskStewardFactory,
escrowedCollateralPerspective: peripheryAddrs.escrowedCollateralPerspective,
eulerEarnFactoryPerspective: peripheryAddrs.eulerEarnFactoryPerspective,
eulerEarnGovernedPerspective: peripheryAddrs.eulerEarnGovernedPerspective,
eulerUngoverned0xPerspective: peripheryAddrs.eulerUngoverned0xPerspective,
eulerUngovernedNzxPerspective: peripheryAddrs.eulerUngovernedNzxPerspective,
evkFactoryPerspective: peripheryAddrs.evkFactoryPerspective,
externalVaultRegistry: peripheryAddrs.externalVaultRegistry,
feeFlowController: peripheryAddrs.feeFlowController,
governedPerspective: peripheryAddrs.governedPerspective,
governorAccessControlEmergencyFactory: peripheryAddrs.governorAccessControlEmergencyFactory,
irmRegistry: peripheryAddrs.irmRegistry,
kinkIRMFactory: peripheryAddrs.kinkIRMFactory,
kinkyIRMFactory: peripheryAddrs.kinkyIRMFactory,
oracleAdapterRegistry: peripheryAddrs.oracleAdapterRegistry,
oracleRouterFactory: peripheryAddrs.oracleRouterFactory,
securitizeFactory: peripheryAddrs.securitizeFactory,
swapVerifier: peripheryAddrs.swapVerifier,
Expand Down
2 changes: 1 addition & 1 deletion server/utils/labels-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
labels: EulerLabelsData,
): Promise<{ snapshot: ChainVaultsSnapshot, escrowAddresses: Set<Address> }> {
const escrowAddresses = new Set<Address>(
uniqueAddresses(await sdk.eVaultService.fetchVerifiedVaultAddresses(chainId, [StandardEVaultPerspectives.ESCROW])),
uniqueAddresses(await sdk.eVaultService.fetchPerspectiveVaultAddresses(chainId, [StandardEVaultPerspectives.ESCROW])),

Check failure on line 232 in server/utils/labels-view.ts

View workflow job for this annotation

GitHub Actions / typecheck

Property 'fetchPerspectiveVaultAddresses' does not exist on type 'IEVaultService'. Did you mean 'fetchVerifiedVaultAddresses'?
)
const candidates = uniqueAddresses([
...labels.verifiedVaultAddresses,
Expand Down
2 changes: 1 addition & 1 deletion server/utils/vaults-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@

const fetchEscrowAddrs = async (sdk: EulerSDK, chainId: number): Promise<Address[]> => {
try {
const list = await sdk.eVaultService.fetchVerifiedVaultAddresses(
const list = await sdk.eVaultService.fetchPerspectiveVaultAddresses(

Check failure on line 154 in server/utils/vaults-cache.ts

View workflow job for this annotation

GitHub Actions / typecheck

Property 'fetchPerspectiveVaultAddresses' does not exist on type 'IEVaultService'. Did you mean 'fetchVerifiedVaultAddresses'?
chainId,
[StandardEVaultPerspectives.ESCROW],
)
Expand Down
8 changes: 4 additions & 4 deletions tests/composables/useVaults.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const makeEarnVault = (address: string): EulerEarn => ({
const fetchVaults = vi.fn()
const fetchEarnVaults = vi.fn()
const fetchEarnVault = vi.fn()
const fetchVerifiedVaultAddresses = vi.fn()
const fetchPerspectiveVaultAddresses = vi.fn()
const fetchVaultTypes = vi.fn()
const chainId = ref(1)

Expand All @@ -36,7 +36,7 @@ describe('useVaults EVault verification metadata', () => {
fetchVaults.mockReset()
fetchEarnVaults.mockReset()
fetchEarnVault.mockReset()
fetchVerifiedVaultAddresses.mockReset()
fetchPerspectiveVaultAddresses.mockReset()
fetchVaultTypes.mockReset()

fetchVaults.mockImplementation(async (_chainId: number, addresses: Address[]) => ({
Expand All @@ -48,7 +48,7 @@ describe('useVaults EVault verification metadata', () => {
errors: [],
result: makeEarnVault(address),
}))
fetchVerifiedVaultAddresses.mockResolvedValue([])
fetchPerspectiveVaultAddresses.mockResolvedValue([])
fetchVaultTypes.mockResolvedValue({})
chainId.value = 1

Expand All @@ -61,7 +61,7 @@ describe('useVaults EVault verification metadata', () => {
}))
vi.stubGlobal('useEulerLabels', useEulerLabels)
const sdk = {
eVaultService: { fetchVaults, fetchVerifiedVaultAddresses },
eVaultService: { fetchVaults, fetchPerspectiveVaultAddresses },
eulerEarnService: { fetchVaults: fetchEarnVaults, fetchVault: fetchEarnVault },
vaultMetaService: { fetchVaultTypes },
}
Expand Down
8 changes: 4 additions & 4 deletions tests/server/vaults-cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const VAULTS = [

const mocks = vi.hoisted(() => ({
fetchVaults: vi.fn(),
fetchVerifiedVaultAddresses: vi.fn(),
fetchPerspectiveVaultAddresses: vi.fn(),
fetchVaultTypes: vi.fn(),
refreshLabelFile: vi.fn(),
warn: vi.fn(),
Expand All @@ -39,7 +39,7 @@ vi.mock('~/server/utils/sdk-server', () => ({
getServerSdk: vi.fn(async () => ({
eVaultService: {
fetchVaults: mocks.fetchVaults,
fetchVerifiedVaultAddresses: mocks.fetchVerifiedVaultAddresses,
fetchPerspectiveVaultAddresses: mocks.fetchPerspectiveVaultAddresses,
},
eulerEarnService: {
fetchVaults: vi.fn(async () => ({ result: [], errors: [] })),
Expand All @@ -64,14 +64,14 @@ describe('vaults cache', () => {
beforeEach(() => {
vi.resetModules()
mocks.fetchVaults.mockReset()
mocks.fetchVerifiedVaultAddresses.mockReset()
mocks.fetchPerspectiveVaultAddresses.mockReset()
mocks.fetchVaultTypes.mockReset()
mocks.refreshLabelFile.mockReset()
mocks.warn.mockReset()
mocks.error.mockReset()
process.env.EVAULT_FETCH_CHUNK_CHAINS = '146'

mocks.fetchVerifiedVaultAddresses.mockResolvedValue([])
mocks.fetchPerspectiveVaultAddresses.mockResolvedValue([])
mocks.fetchVaultTypes.mockResolvedValue({})
mocks.refreshLabelFile.mockImplementation(async (_scope, file) => {
if (file === 'products.json') {
Expand Down
8 changes: 4 additions & 4 deletions utils/sdk-vault-meta-stub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@
): Promise<ServiceResult<(VaultEntity | undefined)[]>> {
throw new Error('registry meta-stub: fetchVaults() not supported')
},
async fetchVerifiedVaultAddresses(): Promise<Address[]> {
throw new Error('registry meta-stub: fetchVerifiedVaultAddresses() not supported')
async fetchPerspectiveVaultAddresses(): Promise<Address[]> {

Check failure on line 62 in utils/sdk-vault-meta-stub.ts

View workflow job for this annotation

GitHub Actions / typecheck

Object literal may only specify known properties, but 'fetchPerspectiveVaultAddresses' does not exist in type 'IVaultMetaService<VaultEntity>'. Did you mean to write 'fetchVerifiedVaultAddresses'?
throw new Error('registry meta-stub: fetchPerspectiveVaultAddresses() not supported')
},
async fetchVerifiedVaults(): Promise<ServiceResult<(VaultEntity | undefined)[]>> {
throw new Error('registry meta-stub: fetchVerifiedVaults() not supported')
async fetchPerspectiveVaults(): Promise<ServiceResult<(VaultEntity | undefined)[]>> {
throw new Error('registry meta-stub: fetchPerspectiveVaults() not supported')
},
async fetchAllVaults(
_chainId: number,
Expand Down
2 changes: 1 addition & 1 deletion utils/vault/categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
if (existing) return existing

const promise = getSdk(chainId)
.then(sdk => sdk.eVaultService.fetchVerifiedVaultAddresses(chainId, [StandardEVaultPerspectives.ESCROW]))
.then(sdk => sdk.eVaultService.fetchPerspectiveVaultAddresses(chainId, [StandardEVaultPerspectives.ESCROW]))

Check failure on line 85 in utils/vault/categories.ts

View workflow job for this annotation

GitHub Actions / typecheck

Property 'fetchPerspectiveVaultAddresses' does not exist on type 'IEVaultService'. Did you mean 'fetchVerifiedVaultAddresses'?
.then(addresses => new Set(uniqueAddresses(addresses).map(address => address.toLowerCase())))
.then((set) => {
escrowAddressCache.set(chainId, set)
Expand Down
Loading