Skip to content

Commit

Permalink
(swap) Add Charts
Browse files Browse the repository at this point in the history
  • Loading branch information
lilchizh committed Oct 15, 2024
1 parent 7c04665 commit 71cf342
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
10 changes: 3 additions & 7 deletions src/components/swap/SwapChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,12 @@ const getTokenTitle = (chartPair: SwapChartPairType, currencyA: Currency, curren
}

const mainnetPoolsMapping: { [key: Address]: Address } = {
['0x89406233d4290f405eabb6f320fd648276b8b5b7']: '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640',
['0x9367e79bbc401cec2545b4671a80892a26ae1cd9']: '0x9a772018fbd77fcd2d25657e5c547baff3fd7d16',
['0x9f032424a5a4b0effb7fe4912f3e325c105345bc']: '0x3416cf6c708da44db2624d63ea0aaef7113527c6'
['0x7d2bfee75340767fc0ae49bea7c7378e3eb70949']: '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', // WETH - USDC
}

const mainnetTokensMapping: { [key: Address]: Address } = {
['0x20b28b1e4665fff290650586ad76e977eab90c5d']: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
['0x49a390a3dfd2d01389f799965f3af5961f87d228']: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
['0x5aefba317baba46eaf98fd6f381d07673bca6467']: '0xdac17f958d2ee523a2206206994597c13d831ec7',
['0xbc892d5f23d3733cff8986d011ca8ff1249d16ca']: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
['0x94373a4919b3240d86ea41593d5eba789fef3848']: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH
['0x7d98346b3b000c55904918e3d9e2fc3f94683b01']: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' // USDC
}

const SwapChart = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/swap/useSwapChart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import dayjs from 'dayjs'
import { getBlocksFromTimestamps } from "@/graphql/utils/getBlocksFromTimestamps"

const mainnetInfoClient = new ApolloClient({
uri: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3',
uri: 'https://gateway.thegraph.com/api/a4d37baa6dd0119dfc09526fcbf4976d/subgraphs/id/5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV',
cache: new InMemoryCache(),
});

const mainnetBlocksClient = new ApolloClient({
uri: 'https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks',
uri: 'https://gateway.thegraph.com/api/a4d37baa6dd0119dfc09526fcbf4976d/subgraphs/id/9A6bkprqEG2XsZUYJ5B2XXp6ymz9fNcn4tVPxMWDztYC',
cache: new InMemoryCache()
})

Expand Down
5 changes: 4 additions & 1 deletion src/pages/Swap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import SwapParams from '@/components/swap/SwapParams';
import PageContainer from '@/components/common/PageContainer';
import PageTitle from '@/components/common/PageTitle';
import PoweredByAlgebra from '@/components/common/PoweredByAlgebra';
import SwapChart from '@/components/swap/SwapChart';

const SwapPage = () => {
return (
Expand All @@ -22,7 +23,9 @@ const SwapPage = () => {
<PoweredByAlgebra />
</div>

<div className="col-span-2">{/* <SwapChart /> */}</div>
<div className="col-span-2">
<SwapChart />
</div>
</div>
</PageContainer>
);
Expand Down

0 comments on commit 71cf342

Please sign in to comment.