Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
59b7faa
Mock account
neikop Jun 16, 2026
3b3846d
chore: polish ui first
neikop Jun 16, 2026
83f473b
refactor(limit-order): split form structure
neikop Jun 16, 2026
a3e2dba
First look new UI
neikop Jun 17, 2026
e565dd5
Process order new flow
neikop Jun 18, 2026
e221278
refactor(limit-order): remove edit order flow
neikop Jun 18, 2026
8f7f871
refactor(limit-order): simplify create order flow
neikop Jun 18, 2026
421faac
Chore
neikop Jun 18, 2026
33743da
refactor(limit): polish order form structure
neikop Jun 18, 2026
7a361fa
chore(limit): polish order form UI
neikop Jun 18, 2026
261104a
chore: improve DateTimePicker
neikop Jun 18, 2026
585e1c5
refactor(limit): simplify rate side handling
neikop Jun 18, 2026
02225c0
fix(limit-order): sync rate percent active state
neikop Jun 18, 2026
5e18527
feat(limit-order): revamp order book layout
neikop Jun 18, 2026
b2dee16
refactor(limit-order): revamp order list UI
neikop Jun 18, 2026
b9be044
Update order item navigate
neikop Jun 18, 2026
2eb6f4d
feat(limit-order): add fill order flow
neikop Jun 19, 2026
e075349
feat(limit-order): refine create and fill flows
neikop Jun 19, 2026
eeae442
refactor(limit-order): move module out of swapv2
neikop Jun 19, 2026
717592b
refactor(limit-order): consolidate processing modal
neikop Jun 19, 2026
e4fb599
chore
neikop Jun 19, 2026
501c56a
refactor(limit-order): organize helper utilities
neikop Jun 19, 2026
d3294cf
Chore UI
neikop Jun 19, 2026
c636ae1
refactor(limit): polish order processing and my orders
neikop Jun 19, 2026
f03badb
refactor(limit): organize order flows
neikop Jun 19, 2026
e1e40c0
refactor(limit-order): polish order modals
neikop Jun 19, 2026
869bef7
refactor(limit-order): simplify cancel flow
neikop Jun 19, 2026
8499c9a
Continue take order flow
neikop Jun 19, 2026
3731e35
refactor(limit-order): simplify create and take order flows
neikop Jun 19, 2026
33010f1
refactor(limit-order): share approval processing flow
neikop Jun 19, 2026
fd0cee5
Update polling
neikop Jun 22, 2026
0e7829f
feat(limit): enhance take order confirm modal
neikop Jun 22, 2026
15be6fa
fix(limit): account for taker asset fee
neikop Jun 22, 2026
3c03118
fix(limit): stabilize take order fill amount
neikop Jun 22, 2026
ea1e182
fix(notification): align top right popup layout
neikop Jun 22, 2026
ed8e7f8
refactor(limit): polish order list UI
neikop Jun 22, 2026
bac53de
feat(limit-order): warn on poor take order rates
neikop Jun 22, 2026
77d76a5
feat(limit-order): add order book rate inversion
neikop Jun 22, 2026
59d9134
fix(limit-order): apply date picker expiry presets
neikop Jun 23, 2026
84be21d
update(limit-order): refine order list tables
neikop Jun 23, 2026
c922a54
update(limit-order): polish order table controls
neikop Jun 23, 2026
8fef7b1
chore
neikop Jun 23, 2026
309d6cd
chore
neikop Jun 23, 2026
49d2bba
refactor(limit-order): update cancel order flow
neikop Jun 23, 2026
1a34a98
refactor(limit): simplify cancel order flow
neikop Jun 23, 2026
3b6dd2a
refactor(limit): organize cancel order flow
neikop Jun 24, 2026
3b505d3
refactor(limit): rename helpers to utils
neikop Jun 24, 2026
5767f1b
fix(limit): align order action state and chain
neikop Jun 24, 2026
0093bdf
fix(limit): align take order rate warnings
neikop Jun 24, 2026
634f3b9
refactor(limit): share order row cells
neikop Jun 24, 2026
3f690a7
fix(limit): display maker amounts in order book
neikop Jun 24, 2026
24ee1d7
chore
neikop Jun 24, 2026
eaedef9
Merge remote-tracking branch 'origin/main' into feat-limit-order-v2
neikop Jun 24, 2026
addd717
feat(limit-order): add chain filter for bulk cancel
neikop Jun 24, 2026
375f328
chore
neikop Jun 24, 2026
48d5217
update: polish shared UI controls
neikop Jun 24, 2026
5b9ae57
fix(limit-order): relax processing modal and percent input
neikop Jun 25, 2026
31888bd
fix(limit-order): shrink order book for fewer rows
neikop Jun 25, 2026
e69ce14
fix(limit-order): handle missing prices and account switches
neikop Jun 25, 2026
e6dd29c
fix(limit-order): show wrap actions in order modals
neikop Jun 25, 2026
2c3361e
fix(limit-order): refine warnings and modal styling
neikop Jun 26, 2026
319b4bc
update: polish limit order action controls
neikop Jun 26, 2026
95a5d2e
fix(limit-order): keep take modal before wallet connect
neikop Jun 26, 2026
4d567b2
Merge remote-tracking branch 'origin/main' into feat-limit-order-revamp
neikop Jun 26, 2026
744370c
fix(limit): prevent cancel modal layout shift
neikop Jun 26, 2026
006d9a2
fix(limit): filter unsupported order chains
neikop Jun 26, 2026
32a206d
fix(limit): refine order controls
neikop Jun 26, 2026
e8e2dff
fix: handle near-one decimal formatting
neikop Jun 26, 2026
228975d
refactor(limit): refine take order flow
neikop Jun 26, 2026
bda41f6
fix(limit): hide wrap warning on create form
neikop Jun 26, 2026
98ccb70
chore
neikop Jun 26, 2026
b8228ee
fix(limit-order): separate native and wrapped balances
neikop Jun 26, 2026
85bd4b8
fix(limit-order): scope reserved balance warnings by pair
neikop Jun 26, 2026
f32b6e5
fix(limit-order): split active making amount checks
neikop Jun 26, 2026
f5a41a5
chore
neikop Jun 26, 2026
fa7704b
fix(limit-order): use chainIds and pair search filters
neikop Jun 29, 2026
f117d91
chore
neikop Jun 29, 2026
7134164
refactor(limit-order): update create order layout and warnings
neikop Jun 29, 2026
d45c439
fix(limit-order): display native output symbol
neikop Jun 29, 2026
d3083e2
fix(limit-order): search native symbols in my orders
neikop Jun 29, 2026
09894d9
Merge branch 'main' into feat-limit-order-revamp
neikop Jun 29, 2026
9604f99
update(swap): tighten mobile header spacing
neikop Jun 29, 2026
7de8709
update(swap): tighten action button sizing
neikop Jun 29, 2026
11e1fa3
update(limit-order): adjust take order fill presets
neikop Jun 29, 2026
7371760
chore: clean up claim reward flow
neikop Jun 29, 2026
bf9c616
refactor(menu): update reward and faucet flows
neikop Jun 29, 2026
ef96792
refactor(menu): split menu dropdown into smaller components
neikop Jun 29, 2026
6a2939e
refactor(menu): streamline menu structure
neikop Jun 29, 2026
5dfc6f4
refactor(header): centralize nav group layout state
neikop Jun 29, 2026
c15ecde
Merge branch 'main' into fix/claim-reward-query
neikop Jun 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,53 +1,51 @@
import { Trans } from '@lingui/macro'
import { useLocation } from 'react-router-dom'
import { useMedia } from 'react-use'

import NavGroup from 'components/Header/groups/NavGroup'
import NavGroup, { type DropdownAlign } from 'components/Header/groups/NavGroup'
import { DropdownTextAnchor, StyledNavExternalLink, StyledNavLink } from 'components/Header/styleds'
import { APP_PATHS } from 'constants/index'
import useTracking, { TRACKING_EVENT_TYPE } from 'hooks/useTracking'
import { MEDIA_WIDTHS } from 'theme'

const AboutNavGroup = () => {
type Props = {
dropdownAlign?: DropdownAlign
}

const AboutNavGroup = ({ dropdownAlign }: Props) => {
const { pathname } = useLocation()
const isActive = pathname.includes(APP_PATHS.ABOUT)
const upToSmall = useMedia(`(max-width: ${MEDIA_WIDTHS.upToSmall}px)`)

const { trackingHandler } = useTracking()

if (upToSmall) return null
return (
<span className="hidden xs:inline-flex">
<NavGroup
dropdownAlign={upToSmall ? 'right' : 'left'}
isActive={isActive}
anchor={
<DropdownTextAnchor>
<Trans>About</Trans>
</DropdownTextAnchor>
}
dropdownContent={
<div className="flex flex-col">
<StyledNavLink id="about-kyberswap" to={`${APP_PATHS.ABOUT}/kyberswap`}>
<Trans>KyberSwap</Trans>
</StyledNavLink>
<NavGroup
dropdownAlign={dropdownAlign}
isActive={isActive}
anchor={
<DropdownTextAnchor>
<Trans>About</Trans>
</DropdownTextAnchor>
}
dropdownContent={
<div className="flex flex-col">
<StyledNavLink id="about-kyberswap" to={`${APP_PATHS.ABOUT}/kyberswap`}>
<Trans>KyberSwap</Trans>
</StyledNavLink>

<StyledNavLink id="about-knc" to={`${APP_PATHS.ABOUT}/knc`}>
<Trans> KNC</Trans>
</StyledNavLink>
<StyledNavExternalLink
onClick={() => {
trackingHandler(TRACKING_EVENT_TYPE.BLOG_MENU_CLICKED)
}}
target="_blank"
href="https://blog.kyberswap.com"
>
<Trans>Blog</Trans>
</StyledNavExternalLink>
</div>
}
/>
</span>
<StyledNavLink id="about-knc" to={`${APP_PATHS.ABOUT}/knc`}>
<Trans> KNC</Trans>
</StyledNavLink>
<StyledNavExternalLink
onClick={() => {
trackingHandler(TRACKING_EVENT_TYPE.BLOG_MENU_CLICKED)
}}
target="_blank"
href="https://blog.kyberswap.com"
>
<Trans>Blog</Trans>
</StyledNavExternalLink>
</div>
}
/>
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
import { Trans, t } from '@lingui/macro'
import { useState } from 'react'
import { useLocation } from 'react-router-dom'
import { useMedia } from 'react-use'

import { ReactComponent as DropdownSVG } from 'assets/svg/down.svg'
import Column from 'components/Column'
import NavGroup from 'components/Header/groups/NavGroup'
import { DropdownTextAnchor, StyledNavLink } from 'components/Header/styleds'
import { NewLabel } from 'components/Menu'
import NavGroup, { type DropdownAlign } from 'components/Header/groups/NavGroup'
import { DropdownTextAnchor, NewLabel, StyledNavLink } from 'components/Header/styleds'
import { APP_PATHS } from 'constants/index'
import { cn } from 'utils/cn'

const showCampaignNew = new Date() < new Date('2026-05-04T23:59:59Z')

const CampaignNavGroup = () => {
type Props = {
dropdownAlign?: DropdownAlign
}

const CampaignNavGroup = ({ dropdownAlign }: Props) => {
const { pathname } = useLocation()
const isActiveMayTrading = pathname.includes('/campaigns/may-trading')
const isActive = pathname.includes('/campaigns') && !isActiveMayTrading
const upTo500 = useMedia('(max-width: 500px)')

const [showStip, setShowStip] = useState(false)

if (upTo500) return null

return (
<NavGroup
dropdownAlign={upTo500 ? 'right' : 'left'}
dropdownAlign={dropdownAlign}
isActive={isActive}
anchor={
<DropdownTextAnchor className="relative flex w-max">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import { ReactComponent as PositionsIcon } from 'assets/svg/earn/ic_earn_positio
import { ReactComponent as FarmingIcon } from 'assets/svg/earn/ic_farming.svg'
import { ReactComponent as ListSmartExitIcon } from 'assets/svg/earn/ic_list_smart_exit.svg'
import { ReactComponent as KemIcon } from 'assets/svg/kyber/kem.svg'
import NavGroup from 'components/Header/groups/NavGroup'
import { DropdownTextAnchor, StyledNavLink } from 'components/Header/styleds'
import { NewLabel } from 'components/Menu'
import NavGroup, { type DropdownAlign } from 'components/Header/groups/NavGroup'
import { DropdownTextAnchor, NewLabel, StyledNavLink } from 'components/Header/styleds'
import { APP_PATHS } from 'constants/index'
import { FilterTag } from 'pages/Earns/PoolExplorer/Filter'
import { MEDIA_WIDTHS } from 'theme'

const EarnNavGroup = () => {
const upTo430 = useMedia('(max-width: 430px)')
const upToSmall = useMedia(`(max-width: ${MEDIA_WIDTHS.upToSmall}px)`)
type Props = {
dropdownAlign?: DropdownAlign
}

const EarnNavGroup = ({ dropdownAlign }: Props) => {
const { pathname, search } = useLocation()
const isActive = [
APP_PATHS.EARN,
Expand All @@ -28,9 +28,11 @@ const EarnNavGroup = () => {
APP_PATHS.EARN_SMART_EXIT,
].some(path => pathname.includes(path))

const upToSmall = useMedia(`(max-width: ${MEDIA_WIDTHS.upToSmall}px)`)

return (
<NavGroup
dropdownAlign={upTo430 ? 'right' : 'left'}
dropdownAlign={dropdownAlign}
isActive={isActive}
anchor={
<DropdownTextAnchor>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
import { Trans } from '@lingui/macro'
import { useLocation } from 'react-router-dom'
import { useMedia } from 'react-use'

import { ReactComponent as KyberLogo } from 'assets/svg/kyber/knc_black.svg'
import Column from 'components/Column'
import NavGroup from 'components/Header/groups/NavGroup'
import NavGroup, { type DropdownAlign } from 'components/Header/groups/NavGroup'
import { DropdownTextAnchor, StyledNavLink } from 'components/Header/styleds'
import StakeIcon from 'components/Icons/Stake'
import VoteIcon from 'components/Icons/Vote'
import { TutorialIds } from 'components/Tutorial/TutorialSwap/constant'
import { APP_PATHS } from 'constants/index'
import useTracking, { TRACKING_EVENT_TYPE } from 'hooks/useTracking'

const KyberDAONavGroup = () => {
type Props = {
dropdownAlign?: DropdownAlign
}

const KyberDAONavGroup = ({ dropdownAlign }: Props) => {
const { pathname } = useLocation()
const isActive = pathname.includes(APP_PATHS.KYBERDAO_STAKE)

const { trackingHandler } = useTracking()
const upToMedium = useMedia('(max-width: 992px)')
if (upToMedium) return null

return (
<span id={TutorialIds.KYBER_DAO_LINK} className="inline-flex">
<NavGroup
dropdownAlign={upToMedium ? 'right' : 'left'}
dropdownAlign={dropdownAlign}
isActive={isActive}
anchor={
<DropdownTextAnchor>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { isMobile } from 'react-device-detect'
import { ReactComponent as DropdownSVG } from 'assets/svg/down.svg'
import { cn } from 'utils/cn'

type DropdownAlign = 'left' | 'right' | 'center'
export type DropdownAlign = 'left' | 'right' | 'center'

type Props = {
id?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,36 @@ import { useMedia } from 'react-use'

import { ReactComponent as CrossChainIcon } from 'assets/svg/cross_chain_icon.svg'
import { ReactComponent as LimitOrderIcon } from 'assets/svg/limit_order.svg'
import NavGroup from 'components/Header/groups/NavGroup'
import { DropdownTextAnchor, StyledNavLink } from 'components/Header/styleds'
import { NewLabel } from 'components/Menu'
import NavGroup, { type DropdownAlign } from 'components/Header/groups/NavGroup'
import { DropdownTextAnchor, NewLabel, StyledNavLink } from 'components/Header/styleds'
import { TutorialIds } from 'components/Tutorial/TutorialSwap/constant'
import { APP_PATHS, CHAINS_SUPPORT_CROSS_CHAIN } from 'constants/index'
import { useActiveWeb3React } from 'hooks'
import { useTutorialSwapGuide } from 'state/tutorial/hooks'
import { MEDIA_WIDTHS } from 'theme'
import { isInSafeApp, isSupportLimitOrder } from 'utils'
import { cn } from 'utils/cn'

const IconWrapper = ({ children }: { children: React.ReactNode }) => (
<div className="flex size-4 flex-[0_0_16px] items-center">{children}</div>
)

const SwapNavGroup = () => {
type Props = {
dropdownAlign?: DropdownAlign
}

const SwapNavGroup = ({ dropdownAlign }: Props) => {
const { networkInfo, chainId } = useActiveWeb3React()
const { pathname } = useLocation()
const upTo430 = useMedia('(max-width: 430px)')
const isActive = [APP_PATHS.SWAP, APP_PATHS.LIMIT, APP_PATHS.CROSS_CHAIN].some(path => pathname.startsWith(path))

const [{ show: isShowTutorial = false, stepInfo }] = useTutorialSwapGuide()
const upToSmall = useMedia(`(max-width: ${MEDIA_WIDTHS.upToSmall}px)`)

const isActive = [APP_PATHS.SWAP, APP_PATHS.LIMIT, APP_PATHS.CROSS_CHAIN].some(path => pathname.startsWith(path))
const [{ show: isShowTutorial = false, stepInfo }] = useTutorialSwapGuide()

return (
<NavGroup
dropdownAlign={upTo430 ? 'center' : 'left'}
dropdownAlign={dropdownAlign}
isActive={isActive}
forceOpen={isShowTutorial && stepInfo?.selector === `#${TutorialIds.BRIDGE_LINKS}`}
anchor={
Expand All @@ -39,7 +43,10 @@ const SwapNavGroup = () => {
</DropdownTextAnchor>
}
dropdownContent={
<div id={TutorialIds.BRIDGE_LINKS} className={cn('flex flex-col', upTo430 ? 'min-w-[160px]' : 'min-w-[250px]')}>
<div
id={TutorialIds.BRIDGE_LINKS}
className={cn('flex flex-col', upToSmall ? 'min-w-[180px]' : 'min-w-[240px]')}
>
<StyledNavLink
id={`swapv2-nav-link`}
to={`${APP_PATHS.SWAP}/${networkInfo.route}`}
Expand Down
15 changes: 9 additions & 6 deletions apps/kyberswap-interface/src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ export default function Header() {
const upToXXSmall = useMedia(`(max-width: ${MEDIA_WIDTHS.upToXXSmall}px)`)
const upToLarge = useMedia(`(max-width: ${MEDIA_WIDTHS.upToLarge}px)`)
const upToMedium = useMedia(`(max-width: ${MEDIA_WIDTHS.upToMedium}px)`)
const upToSmall = useMedia(`(max-width: ${MEDIA_WIDTHS.upToSmall}px)`)
const upToExtraSmall = useMedia(`(max-width: ${MEDIA_WIDTHS.upToExtraSmall}px)`)
const upTo500 = useMedia('(max-width: 500px)')

const hide = isEmbeddedSwap && upToLarge
const navGroupDropdownAlign = upToMedium ? 'right' : 'left'

const menu = (
<div className="flex items-center gap-2 rounded-[36px] border border-background bg-background px-1.5 text-subText hover:border-border-primary hover:brightness-105">
Expand Down Expand Up @@ -85,23 +88,23 @@ export default function Header() {
</Link>
)}
{!isEmbeddedSwap && (
<div className="flex w-full flex-row flex-nowrap items-center justify-center gap-1 max-lg:justify-end max-xxs:gap-0">
<SwapNavGroup />
<EarnNavGroup />
<div className="flex w-full flex-row flex-nowrap items-center justify-center gap-1 max-lg:justify-end">
<SwapNavGroup dropdownAlign={navGroupDropdownAlign} />
<EarnNavGroup dropdownAlign={navGroupDropdownAlign} />

{!upToExtraSmall && (
<StyledNavLink to={`${APP_PATHS.MARKET_OVERVIEW}`}>
<Trans>Market</Trans>
</StyledNavLink>
)}
<CampaignNavGroup />
<KyberDAONavGroup />
{!upTo500 && <CampaignNavGroup dropdownAlign={navGroupDropdownAlign} />}
{!upToMedium && <KyberDAONavGroup dropdownAlign={navGroupDropdownAlign} />}
{!upToMedium && (
<StyledNavExternalLink target="_blank" href={AGGREGATOR_ANALYTICS_URL}>
<Trans>Analytics</Trans>
</StyledNavExternalLink>
)}
<AboutNavGroup />
{!upToSmall && <AboutNavGroup dropdownAlign={navGroupDropdownAlign} />}
<RecapButton />
</div>
)}
Expand Down
6 changes: 5 additions & 1 deletion apps/kyberswap-interface/src/components/Header/styleds.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CSSProperties, forwardRef } from 'react'
import { type CSSProperties, type PropsWithChildren, forwardRef } from 'react'
import { NavLink as BaseNavLink, NavLinkProps } from 'react-router-dom'

import usePrefetchOnIntent from 'hooks/usePrefetchOnIntent'
Expand Down Expand Up @@ -95,3 +95,7 @@ export const DropdownTextAnchor = ({ className, ...props }: React.HTMLAttributes
{...props}
/>
)

export const NewLabel = ({ isNew, children }: PropsWithChildren<{ isNew?: boolean }>) => (
<span className={cn('ml-1 text-[10px]', isNew ? 'text-red' : 'text-subText')}>{children}</span>
)
Loading
Loading