Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
fix(angle): Remove Perps (#2988)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpoulin authored Oct 19, 2023
1 parent 5c5c737 commit ca830a6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 155 deletions.
2 changes: 0 additions & 2 deletions src/apps/angle/angle.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { AbstractApp } from '~app/app.dynamic-module';

import { AngleApiHelper } from './common/angle.api';
import { AngleContractFactory } from './contracts';
import { EthereumAnglePerpetualsContractPositionFetcher } from './ethereum/angle.perpetual.contract-position-fetcher';
import { EthereumAngleSanTokenTokenFetcher } from './ethereum/angle.san-token.token-fetcher';
import { EthereumAngleVaultsContractPositionFetcher } from './ethereum/angle.vault.contract-position-fetcher';
import { EthereumAngleVeAngleContractPositionFetcher } from './ethereum/angle.voting-escrow.contract-position-fetcher';
Expand All @@ -16,7 +15,6 @@ import { EthereumAngleVeAngleContractPositionFetcher } from './ethereum/angle.vo
// Ethereum
EthereumAngleSanTokenTokenFetcher,
EthereumAngleVeAngleContractPositionFetcher,
EthereumAnglePerpetualsContractPositionFetcher,
EthereumAngleVaultsContractPositionFetcher,
],
})
Expand Down
57 changes: 0 additions & 57 deletions src/apps/angle/common/angle.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ type TAPR = {
};
};

type TokenInfo = {
readonly name: string;
readonly decimals: number;
readonly symbol: string;
readonly isSanToken?: boolean;
readonly useInSwap?: boolean;
readonly hasPermit?: boolean;
readonly permitVersion?: string;
readonly logoURI?: string;
readonly tags?: string[];
};

type TVaultManager = {
address: string;
borrowFee: number;
Expand All @@ -52,26 +40,6 @@ type TVaultManager = {
treasury: string;
};

type TPerpetual = {
perpetualID: string;
owner: string;
decimals: string;
margin: string;
committedAmount: string;
entryRate: string;
perpetualManager: string;
stableAddress: string;
collatAddress: string;
stableName: string;
collatName: string;
openingTimestamp: string;
lastUpdateTimestamp: string;
openingBlockNumber: string;
lastUpdateBlockNumber: string;
status: string;
claimable: number;
};

type TVault = {
address: string;
collateral: string;
Expand Down Expand Up @@ -117,18 +85,6 @@ export class AngleApiHelper {
return this.callAngleApi<Record<string, TVaultManager>>('vaultManagers', { chainId: 1 });
}

@Cache({
instance: 'user',
key: (network: Network) => `studio:angle:perpetuals:${network}:angle`,
ttl: 15 * 60,
})
async getUserPerpetuals(address: string, _network: Network) {
return this.callAngleApi<{ perpetuals: TPerpetual[] }>('perpetuals', {
chainId: 1,
user: address,
});
}

@Cache({
instance: 'user',
key: (network: Network) => `studio:angle:vaults:${network}:angle`,
Expand Down Expand Up @@ -156,17 +112,4 @@ export class AngleApiHelper {
user: address,
});
}

@Cache({
instance: 'business',
key: (network: Network) => `studio:angle:tokenlist:${network}:angle`,
ttl: 60 * 60,
})
async fetchTokenList(_network: Network, networkName = 'mainnet') {
const tokenListEndpoint = 'https://raw.githubusercontent.com/AngleProtocol/angle-token-list/main/ERC20_LIST.json';
const tokenList = await Axios.get<[{ [network: string]: Record<string, TokenInfo> }]>(tokenListEndpoint).then(
v => v.data[0][networkName],
);
return tokenList;
}
}

This file was deleted.

0 comments on commit ca830a6

Please sign in to comment.