Skip to content

Commit

Permalink
fix some issues related to pairData
Browse files Browse the repository at this point in the history
  • Loading branch information
solproc committed Jan 24, 2021
1 parent 49df9ce commit a9502e7
Show file tree
Hide file tree
Showing 8 changed files with 479 additions and 472 deletions.
2 changes: 1 addition & 1 deletion src/apollo/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const healthClient = new ApolloClient({

export const v1Client = new ApolloClient({
link: new HttpLink({
uri: 'https://graph.chipsfryer.world/subgraphs/name/blockartist/cheesegraph3'
uri: 'https://graph.chipsfryer.world/subgraphs/name/blockartist/cheesegraph'
}),
cache: new InMemoryCache(),
shouldBatch: true
Expand Down
2 changes: 1 addition & 1 deletion src/apollo/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FACTORY_ADDRESS, BUNDLE_ID } from '../constants'

export const SUBGRAPH_HEALTH = gql`
query health {
indexingStatusForCurrentVersion(subgraphName: "cheesegraph3") {
indexingStatusForCurrentVersion(subgraphName: "blockartist/cheesegraph3") {
synced
health
chains {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Dashboard = styled(Box)`
width: 100%;
grid-template-columns: 1fr 1fr 1fr;
grid-template-areas:
/* "statsHeader statsHeader statsHeader" */
'statsHeader statsHeader statsHeader'
'fill fill fill'
'pairHeader pairHeader pairHeader'
'transactions2 transactions2 transactions2'
Expand Down
10 changes: 5 additions & 5 deletions src/components/GlobalStats/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useMedia } from 'react-use'
import { useGlobalData, useEthPrice } from '../../contexts/GlobalData'
import { formattedNum, localNumber } from '../../utils'

import UniPrice from '../UniPrice'
//import UniPrice from '../UniPrice'
import { TYPE } from '../../Theme'

const Header = styled.div`
Expand Down Expand Up @@ -48,22 +48,22 @@ export default function GlobalStats() {
style={{ position: 'relative' }}
>
BNB Price: <Medium>{formattedEthPrice}</Medium>
{showPriceCard && <UniPrice />}
{ /* {<UniPrice />} */ }
</TYPE.main>
)}

{!below1180 && (
<TYPE.main mr={'1rem'}>
<TYPE.main mr={'1.2rem'}>
Transactions (24H): <Medium>{localNumber(oneDayTxns)}</Medium>
</TYPE.main>
)}
{!below1024 && (
<TYPE.main mr={'1rem'}>
<TYPE.main mr={'1.2rem'}>
Pairs: <Medium>{localNumber(pairCount)}</Medium>
</TYPE.main>
)}
{!below1295 && (
<TYPE.main mr={'1rem'}>
<TYPE.main mr={'1.2rem'}>
Fees (24H): <Medium>{oneDayFees}</Medium>&nbsp;
</TYPE.main>
)}
Expand Down
6 changes: 3 additions & 3 deletions src/components/PairList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function PairList({ pairs, color, disbaleLinks, maxItems = 15 }) {
if (pairData && pairData.token0 && pairData.token1) {
const liquidity = formattedNum(pairData.reserveUSD, true)
const volume = formattedNum(pairData.oneDayVolumeUSD, true)
const apy = formattedPercent((pairData.oneDayVolumeUSD * 0.003 * 365 * 100) / pairData.reserveUSD)
// const apy = formattedPercent((pairData.oneDayVolumeUSD * 0.003 * 365 * 100) / pairData.reserveUSD)

return (
<DashGrid style={{ height: '48px' }} disbaleLinks={disbaleLinks} focus={true}>
Expand All @@ -174,10 +174,10 @@ function PairList({ pairs, color, disbaleLinks, maxItems = 15 }) {
</DataText>
<DataText area="liq">{liquidity}</DataText>
<DataText area="vol">{volume}</DataText>
<DataText area="apy">{apy}</DataText>
{ /* <DataText area="apy">{apy}</DataText> */ }
{!below1080 && <DataText area="volWeek">{formattedNum(pairData.oneWeekVolumeUSD, true)}</DataText>}
{!below1080 && <DataText area="fees">{formattedNum(pairData.oneDayVolumeUSD * 0.003, true)}</DataText>}
{!below1080 && <DataText area="apy">{formattedPercent((pairData.oneDayVolumeUSD * 0.003 * 365 * 100,) / pairData.reserveUSD, true)}</DataText>}
{!below1080 && <DataText area="apy">{formattedPercent((pairData.oneDayVolumeUSD * 0.003 * 365 * 100) / pairData.reserveUSD, true)}</DataText>}
</DashGrid>
)
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/components/PinnedData/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function PinnedData({ history, open, setSavedOpen }) {
<TYPE.header>
<FormattedName
text={pair.token0Symbol + '/' + pair.token1Symbol}
maxCharacters={12}
maxCharacters={16}
fontSize={'16px'}
/>
</TYPE.header>
Expand Down Expand Up @@ -127,7 +127,7 @@ function PinnedData({ history, open, setSavedOpen }) {
<RowFixed>
<TokenLogo address={address} size={'14px'} />
<TYPE.header ml={'6px'}>
<FormattedName text={token.symbol} maxCharacters={12} fontSize={'16px'} />
<FormattedName text={token.symbol} maxCharacters={16} fontSize={'16px'} />
</TYPE.header>
</RowFixed>
</ButtonFaded>
Expand Down
2 changes: 1 addition & 1 deletion src/components/UserChart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const UserChart = ({ account }) => {
labelStyle={{ paddingTop: 4 }}
contentStyle={{
padding: '10px 14px',
borderRadius: 10,
borderRadius: 16,
borderColor: '#D455B5',
color: 'black'
}}
Expand Down
Loading

0 comments on commit a9502e7

Please sign in to comment.