Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre release #2498

Closed
wants to merge 14 commits into from
8 changes: 4 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_AGGREGATOR_API=https://aggregator-api.kyberswap.com
VITE_AGGREGATOR_API=https://pre-router-api.kyberengineering.io
VITE_AGGREGATOR_STATS_API=https://aggregator-stats.kyberswap.com
VITE_SENTRY_DNS=https://d94ee2d3c22043bdaec966758680b5a8@sentry.ops.kyberengineering.io/4

Expand All @@ -12,12 +12,10 @@ VITE_PRICE_API=https://price.kyberswap.com

VITE_NOTIFICATION_API=https://notification.kyberswap.com/api

VITE_TYPE_AND_SWAP_URL=https://type-swap.kyberswap.com/api

VITE_TRANSAK_URL=https://global.transak.com
VITE_TRANSAK_API_KEY=48949c0b-2d20-4e3a-a311-51ca91ae8c0d

VITE_KS_SETTING_API=https://ks-setting.kyberswap.com/api
VITE_KS_SETTING_API=https://pre-ks-setting.kyberengineering.io/api
VITE_COMMON_SERVICE_API=https://common-service.kyberswap.com/api
VITE_BLACKJACK_API=https://blackjack.kyberswap.com/api

Expand All @@ -42,3 +40,5 @@ VITE_ELASTIC_POOL_TOPIC_ID=7
VITE_BFF_API=https://bff.kyberswap.com/api
VITE_BUCKET_NAME=ks-setting-1d682dca
VITE_WALLETCONNECT_PROJECT_ID=b5b37945209ea323811f1032e84eaeb5

VITE_TOKEN_API=https://token-api.stg.kyberengineering.io/api
2 changes: 2 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ VITE_PRICE_ALERT_TOPIC_ID=13
VITE_ELASTIC_POOL_TOPIC_ID=12
VITE_BUCKET_NAME=ks-setting-a3aa20b7
VITE_WALLETCONNECT_PROJECT_ID=b5b37945209ea323811f1032e84eaeb5

VITE_TOKEN_API=https://token-api.stg.kyberengineering.io/api
6 changes: 4 additions & 2 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_AGGREGATOR_API=https://aggregator-api.kyberswap.com
VITE_AGGREGATOR_API=https://pre-router-api.kyberengineering.io
VITE_AGGREGATOR_STATS_API=https://aggregator-stats.kyberswap.com
VITE_SENTRY_DNS=https://d94ee2d3c22043bdaec966758680b5a8@sentry.ops.kyberengineering.io/4

Expand All @@ -17,7 +17,7 @@ VITE_TYPE_AND_SWAP_URL=https://type-swap.kyberswap.com/api
VITE_TRANSAK_URL=https://global.transak.com
VITE_TRANSAK_API_KEY=48949c0b-2d20-4e3a-a311-51ca91ae8c0d

VITE_KS_SETTING_API=https://ks-setting.kyberswap.com/api
VITE_KS_SETTING_API=https://pre-ks-setting.kyberengineering.io/api
VITE_COMMON_SERVICE_API=https://common-service.kyberswap.com/api
VITE_BLACKJACK_API=https://blackjack.kyberswap.com/api

Expand All @@ -42,3 +42,5 @@ VITE_ELASTIC_POOL_TOPIC_ID=7
VITE_BFF_API=https://bff.kyberswap.com/api
VITE_BUCKET_NAME=ks-setting-1d682dca
VITE_WALLETCONNECT_PROJECT_ID=b5b37945209ea323811f1032e84eaeb5

VITE_TOKEN_API=https://token-api.kyberengineering.io/api
2 changes: 2 additions & 0 deletions .env.stg
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ VITE_ELASTIC_POOL_TOPIC_ID=4,5
VITE_BFF_API=https://kyberswap-bff.stg.kyberengineering.io/api
VITE_BUCKET_NAME=ks-setting-6d114fd1
VITE_WALLETCONNECT_PROJECT_ID=b5b37945209ea323811f1032e84eaeb5

VITE_TOKEN_API=https://token-api.stg.kyberengineering.io/api
4 changes: 3 additions & 1 deletion src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { MEDIA_WIDTHS } from 'theme'
import AboutNavGroup from './groups/AboutNavGroup'
import KyberDAONavGroup from './groups/KyberDaoGroup'
import SwapNavGroup from './groups/SwapNavGroup'
import { StyledNavExternalLink } from './styleds'
import { StyledNavExternalLink, StyledNavLink } from './styleds'

const HeaderFrame = styled.div<{ hide?: boolean }>`
height: ${({ hide }) => (hide ? 0 : undefined)};
Expand Down Expand Up @@ -207,6 +207,8 @@ export default function Header() {
{!isPartnerSwap && (
<HeaderLinks>
<SwapNavGroup />

<StyledNavLink to={`${APP_PATHS.MARKET_OVERVIEW}`}>Market</StyledNavLink>
<KyberDAONavGroup />
<StyledNavExternalLink target="_blank" href={AGGREGATOR_ANALYTICS_URL}>
<Trans>Analytics</Trans>
Expand Down
1 change: 0 additions & 1 deletion src/constants/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const AGGREGATOR_STATS_API = required('AGGREGATOR_STATS_API')
export const NOTIFICATION_API = required('NOTIFICATION_API')
export const TRANSAK_URL = required('TRANSAK_URL')
export const TRANSAK_API_KEY = required('TRANSAK_API_KEY')
export const TYPE_AND_SWAP_URL = required('TYPE_AND_SWAP_URL')
export const POOL_FARM_BASE_URL = required('POOL_FARM_BASE_URL')
export const MIXPANEL_PROJECT_TOKEN = required('MIXPANEL_PROJECT_TOKEN')
export const GTM_ID = import.meta.env.VITE_GTM_ID
Expand Down
1 change: 1 addition & 0 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export const APP_PATHS = {

DEPRECATED_NOTI_CENTER: '/notification-center/overview',
ELASTIC_SNAPSHOT: '/elastic-snapshot',
MARKET_OVERVIEW: '/market-overview',
} as const

export const TERM_FILES_PATH = {
Expand Down
1 change: 1 addition & 0 deletions src/hooks/useSyncTokenSymbolToUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default function useSyncTokenSymbolToUrl(
) {
const params = useParams<TokenSymbolParams>()
const { fromCurrency, toCurrency, network } = getUrlMatchParams(params)
console.log(fromCurrency, toCurrency, network)

const { chainId } = useActiveWeb3React()
const navigate = useNavigate()
Expand Down
2 changes: 2 additions & 0 deletions src/pages/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const Logout = lazy(() => import('./Oauth/Logout'))
const Consent = lazy(() => import('./Oauth/Consent'))

const ElasticSnapshot = lazy(() => import('./ElasticSnapshot'))
const MarketOverview = lazy(() => import('./MarketOverview'))

// test page for swap only through elastic
const ElasticSwap = lazy(() => import('./ElasticSwap'))
Expand Down Expand Up @@ -323,6 +324,7 @@ export default function App() {
<Route path={APP_PATHS.IAM_CONSENT} element={<Consent />} />

<Route path={APP_PATHS.ELASTIC_SNAPSHOT} element={<ElasticSnapshot />} />
<Route path={APP_PATHS.MARKET_OVERVIEW} element={<MarketOverview />} />

<Route path="*" element={<RedirectPathToSwapV3Network />} />
</Routes>
Expand Down
35 changes: 35 additions & 0 deletions src/pages/MarketOverview/SortIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { Flex } from 'rebass'

import useTheme from 'hooks/useTheme'

export enum Direction {
ASC = 'asc',
DESC = 'desc',
}

export default function SortIcon({ sorted }: { sorted?: Direction }) {
const theme = useTheme()
return (
<Flex flexDirection="column" sx={{ gap: '2px' }}>
<svg width="8" height="5" viewBox="0 0 8 5" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M1.33333 3.91667L3.99999 1.25L6.66666 3.91667"
stroke={sorted === Direction.ASC ? theme.text : theme.subText}
strokeWidth={sorted === Direction.ASC ? 1.5 : undefined}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>

<svg width="8" height="4" viewBox="0 0 8 4" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M1.33333 0.583332L3.99999 3.25L6.66666 0.583332"
stroke={sorted === Direction.DESC ? theme.text : theme.subText}
strokeWidth={sorted === Direction.DESC ? 1.5 : undefined}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
</Flex>
)
}
Loading
Loading