Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mantasfam committed Jul 21, 2023
1 parent b1da239 commit 4fd91a5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions src/app.controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { Body, Controller, Get, Post, Query, UseFilters } from '@nestjs/common';
import {
Body,
Controller,
Get,
Post,
Query,
UseFilters,
HttpException,
} from '@nestjs/common';
import { AppService } from './app.service';
import {
GetPoolAndTokenVolumesReply,
Expand All @@ -14,7 +22,11 @@ export class AppController {

@Get('tvl')
async getTvl(@Query() req: GetTvlRequest): Promise<GetTvlReply> {
return await this.appService.getTvl(req);
try {
return await this.appService.getTvl(req);
} catch (e) {
throw new HttpException(e.message, 500);
}
}

@Post('pool-token-volumes')
Expand Down
2 changes: 1 addition & 1 deletion src/factory/providers/polygon/balancer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { log } from '../../../../util/logger/logger';

const START_BLOCK = 15832998;
const THEGRAPTH_ENDPOINT =
'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-v2-beta';
'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-v2';
const POOL_COUNT_QUERY = gql`
query getPoolCount($block: Int!) {
balancer(id: 2, block: { number: $block }) {
Expand Down

0 comments on commit 4fd91a5

Please sign in to comment.