Skip to content

Commit

Permalink
Merge pull request #70 from AstraProtocol/feat/info-page
Browse files Browse the repository at this point in the history
fix: info page for mainnet
  • Loading branch information
Tien Dao authored Aug 28, 2023
2 parents 402a694 + 56abdd9 commit e2cb90c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
8 changes: 2 additions & 6 deletions src/state/info/queries/pools/topPools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ const fetchTopPools = async (timestamp24hAgo: number): Promise<string[]> => {
query topPools($blacklist: [String!]) {
pairDayDatas(
first: 1
where: {
dailyTxns_gt: 0
token0_not_in: $blacklist
token1_not_in: $blacklist
}
where: { dailyTxns_gt: 0, token0_not_in: $blacklist, token1_not_in: $blacklist }
orderBy: dailyVolumeUSD
orderDirection: desc
) {
Expand Down Expand Up @@ -61,7 +57,7 @@ const useTopPoolAddresses = (): string[] => {
}

export const fetchTopPoolAddresses = async () => {
const [, , , timestamp24hAgo] = getDeltaTimestamps()
const [timestamp24hAgo] = getDeltaTimestamps()

const addresses = await fetchTopPools(timestamp24hAgo)
return addresses
Expand Down
4 changes: 2 additions & 2 deletions src/state/info/queries/tokens/poolsForToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ const POOLS_FOR_TOKEN = gql`
first: 15
orderBy: trackedReserveBNB
orderDirection: desc
where: { totalTransactions_gt: 100, token0: $address, token1_not_in: $blacklist }
where: { totalTransactions_gt: 0, token0: $address, token1_not_in: $blacklist }
) {
id
}
asToken1: pairs(
first: 15
orderBy: trackedReserveBNB
orderDirection: desc
where: { totalTransactions_gt: 100, token1: $address, token0_not_in: $blacklist }
where: { totalTransactions_gt: 0, token1: $address, token0_not_in: $blacklist }
) {
id
}
Expand Down
2 changes: 1 addition & 1 deletion src/state/info/queries/tokens/topTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const fetchTopTokens = async (timestamp24hAgo: number): Promise<string[]> => {
}

export const fetchTokenAddresses = async () => {
const [, , , timestamp24hAgo] = getDeltaTimestamps()
const [timestamp24hAgo] = getDeltaTimestamps()

const addresses = await fetchTopTokens(timestamp24hAgo)

Expand Down
4 changes: 2 additions & 2 deletions src/views/Info/components/InfoCharts/ChartCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ const ChartCard: React.FC<React.PropsWithChildren<ChartCardProps>> = ({
size="sm"
>
<ButtonMenuItem variant="tertiary">
<b>{t('Volume')}</b>
<b>{t('Liquidity')}</b>
</ButtonMenuItem>
<ButtonMenuItem variant="tertiary">
<b>{t('Liquidity')}</b>
<b>{t('Volume')}</b>
</ButtonMenuItem>
{variant === 'token' ? (
<ButtonMenuItem variant="tertiary">
Expand Down

0 comments on commit e2cb90c

Please sign in to comment.