Skip to content

Commit

Permalink
chore(cardano-services): remove duplicate query code
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceahasegan committed May 7, 2024
1 parent 52ed870 commit e7a1073
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
} from '@cardano-sdk/core';
import { Logger } from 'ts-log';
import { Pool, QueryResult } from 'pg';
import { findLastEpoch } from '../../util';
import {
mapAddressOwner,
mapBlockfrostPoolMetrics,
Expand All @@ -43,7 +44,6 @@ import Queries, {
addSentenceToQuery,
blockfrostQuery,
buildOrQueryFromClauses,
findLastEpoch,
findPoolStats,
getIdentifierFullJoinClause,
getIdentifierWhereClause,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
/* eslint-disable sonarjs/no-nested-template-literals */
import { Cardano, MultipleChoiceSearchFilter, QueryStakePoolsArgs } from '@cardano-sdk/core';
import { OrderByOptions, SubQuery } from './types';
import { findLastEpoch } from '../../util';
import { getStakePoolSortType } from './util';

export const findLastEpoch = `
SELECT
"no"
FROM epoch
ORDER BY no DESC
LIMIT 1
`;

export const findLastEpochWithData = `
SELECT
epoch."no",
Expand Down

0 comments on commit e7a1073

Please sign in to comment.