Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
solidovic committed Aug 5, 2024
1 parent d93d073 commit feea85f
Showing 1 changed file with 0 additions and 110 deletions.
110 changes: 0 additions & 110 deletions test/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export interface PostRequest {
schema: object;
}

const FLOAT_REGEX = /^\d+(\.\d+)?$/;

const LIDO_STATS_SCHEMA = {
type: 'object',
properties: {
Expand Down Expand Up @@ -164,46 +162,6 @@ const LIDO_STATS_SCHEMA = {
};

export const GET_REQUESTS: GetRequest[] = [
{
uri: '/api/oneinch-rate',
schema: {
type: 'object',
properties: {
rate: { type: 'number', min: 0 },
toReceive: { type: 'string' },
},
required: ['rate', 'toReceive'],
additionalProperties: false,
},
},
{
uri: `/api/short-lido-stats?chainId=${CONFIG.STAND_CONFIG.chainId}`,
schema: {
type: 'object',
properties: {
uniqueAnytimeHolders: { type: 'string' },
uniqueHolders: { type: 'string' },
totalStaked: { type: 'string' },
marketCap: { type: 'number' },
},
required: [
'totalStaked',
'marketCap',
'uniqueAnytimeHolders',
'uniqueHolders',
],
additionalProperties: false,
},
},
{
uri: '/api/eth-apr',
isDeprecated: true,
schema: { type: 'string', pattern: FLOAT_REGEX },
},
{
uri: '/api/totalsupply',
schema: { type: 'string', pattern: FLOAT_REGEX },
},
{
uri: '/api/lidostats',
isDeprecated: true,
Expand All @@ -214,74 +172,6 @@ export const GET_REQUESTS: GetRequest[] = [
isDeprecated: true,
schema: LIDO_STATS_SCHEMA,
},
{
uri: '/api/eth-price',
schema: {
type: 'object',
properties: {
price: {
type: 'number',
min: 0,
},
},
required: ['price'],
additionalProperties: false,
},
},
{
uri: '/api/rewards?address=0x87c0e047F4e4D3e289A56a36570D4CB957A37Ef1&currency=usd&onlyRewards=false&archiveRate=true&skip=0&limit=10',
skipTestnet: true, // api/rewards don't work on testnet
schema: {
type: 'object',
properties: {
averageApr: { type: 'string' },
ethToStEthRatio: { type: 'number' },
events: {
type: 'array',
items: [
{
type: 'object',
additionalProperties: true,
},
],
},
stETHCurrencyPrice: {
type: 'object',
properties: {
eth: { type: 'number' },
usd: { type: 'number' },
},
required: ['eth', 'usd'],
additionalProperties: false,
},
totalItems: { type: 'number' },
totals: {
type: 'object',
properties: {
currencyRewards: { type: 'string' },
ethRewards: { type: 'string' },
},
},
required: [
'averageApr',
'ethToStEthRatio',
'events',
'stETHCurrencyPrice',
'totalItems',
'totals',
],
additionalProperties: false,
},
},
},
{
uri: '/api/sma-steth-apr',
isDeprecated: true,
schema: {
type: 'string',
pattern: FLOAT_REGEX,
},
},
];

export const POST_REQUESTS: PostRequest[] = [
Expand Down

0 comments on commit feea85f

Please sign in to comment.