Skip to content

Commit

Permalink
refactor: API stats to use chainstack when consulting the subgraph.
Browse files Browse the repository at this point in the history
  • Loading branch information
brunomenezes committed Jun 28, 2024
1 parent 57509f8 commit 6d27878
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/staking/src/pages/api/[chain]/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
// PARTICULAR PURPOSE. See the GNU General Public License for more details.

import { NextApiRequest, NextApiResponse } from 'next';
import Cors from 'cors';
import axios from 'axios';
import { constants, FixedNumber } from 'ethers';
import Cors from 'cors';
import { FixedNumber, constants } from 'ethers';
import { NextApiRequest, NextApiResponse } from 'next';

import runMiddleware from '../../../utils/runMiddleware';
import { getEstimatedRewardRate, getRewardRate } from '../../../utils/reward';
import runMiddleware from '../../../utils/runMiddleware';
import { toCTSI } from '../../../utils/token';

import { createApollo } from '../../../services/apollo';
Expand Down Expand Up @@ -44,7 +44,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
)
) || 1;

const client = createApollo(chainId, false);
const client = createApollo(chainId, true);

const {
data: { summary },
Expand Down

0 comments on commit 6d27878

Please sign in to comment.