Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 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
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
6 changes: 3 additions & 3 deletions apps/kyberswap-interface/src/assets/svg/gas_less_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { AutoColumn } from 'components/Column'
import { CheckCircle } from 'components/Icons'
import IconFailure from 'components/Icons/Failed'
import WarningIcon from 'components/Icons/WarningIcon'
import { AutoRow } from 'components/Row'
import useTheme from 'hooks/useTheme'
import { cn } from 'utils/cn'

Expand Down Expand Up @@ -40,8 +39,8 @@ export default function SimplePopup({
type === NotificationType.SUCCESS ? 'text-primary' : type === NotificationType.WARNING ? 'text-warning' : 'text-red'
const mapIcon = {
[NotificationType.SUCCESS]: <CheckCircle color={color} size={'20px'} />,
[NotificationType.WARNING]: <WarningIcon solid color={color} />,
[NotificationType.ERROR]: <IconFailure color={color} />,
[NotificationType.WARNING]: <WarningIcon solid color={color} size={20} />,
[NotificationType.ERROR]: <IconFailure color={color} size={20} />,
}

const navigate = useNavigate()
Expand All @@ -50,9 +49,9 @@ export default function SimplePopup({
onRemove?.()
}
return (
<AutoRow className="flex-nowrap">
<div className="pr-2.5">{icon || mapIcon[type]}</div>
<AutoColumn className="gap-2">
<div className="grid min-w-0 grid-cols-[20px_minmax(0,1fr)] gap-x-4 gap-y-1">
<div className="pt-0.5">{icon || mapIcon[type]}</div>
<AutoColumn className="min-w-0 gap-1">
<span className={cn('text-base font-medium', colorClass)}>{title}</span>
{summary && <span className="text-sm font-normal text-text">{summary}</span>}
{link && (
Expand All @@ -61,6 +60,6 @@ export default function SimplePopup({
</span>
)}
</AutoColumn>
</AutoRow>
</div>
)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { motion } from 'framer-motion'
import { CSSProperties, useCallback, useEffect, useState } from 'react'
import { X } from 'react-feather'

import getPopupTopRightDescriptionByType from 'components/Announcement/Popups/PopupTopRightDescriptions'
import SimplePopup from 'components/Announcement/Popups/SimplePopup'
Expand All @@ -16,6 +15,7 @@ import {
import { useSuccessSound } from 'hooks/useSuccessSound'
import useTheme from 'hooks/useTheme'
import { useRemovePopup } from 'state/application/hooks'
import { CloseIcon } from 'theme'

const delta = typeof window !== 'undefined' ? window.innerWidth + 'px' : '0px'

Expand Down Expand Up @@ -105,17 +105,17 @@ export default function PopupItem({ popup, hasOverlay }: { popup: PopupItemType;
<div />
) : (
<div
className="relative w-[min(calc(100vw-32px),425px)] overflow-hidden rounded-[10px] [isolation:isolate] max-md:m-auto [&:not(:first-of-type)]:mt-[15px]"
className="relative w-[min(calc(100vw-32px),425px)] overflow-hidden rounded-[10px] [isolation:isolate] max-md:m-auto"
style={wrapperStyle}
>
<div className="absolute left-0 top-0 size-full bg-bg2" />
<div
className="relative inline-block w-full py-5 pl-5 pr-3"
className="relative inline-block w-full p-4 pr-3"
style={{ background: getBackgroundColor(theme, notiType) }}
>
<div className="flex justify-between">
<div className="flex justify-between gap-2">
{popupContent}
<X onClick={removeThisPopup} className="ml-[10px] min-w-[24px] text-text2 hover:cursor-pointer" />
<CloseIcon onClick={removeThisPopup} />
</div>
{removeAfterMs && <WrappedAnimatedFader removeAfterMs={removeAfterMs} />}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ const SUMMARY: { [type in TRANSACTION_TYPE]: SummaryFunction } = {
[TRANSACTION_TYPE.ELASTIC_WITHDRAW_LIQUIDITY]: summaryTypeOnly,
[TRANSACTION_TYPE.ELASTIC_FORCE_WITHDRAW_LIQUIDITY]: summaryTypeOnly,

[TRANSACTION_TYPE.FILL_LIMIT_ORDER]: summary2Token,
[TRANSACTION_TYPE.CANCEL_LIMIT_ORDER]: summaryCancelLimitOrder,
[TRANSACTION_TYPE.TRANSFER_TOKEN]: summaryTransferToken,

Expand Down Expand Up @@ -277,19 +278,19 @@ export default function TransactionPopup({ hash, notiType }: { hash: string; not
const { title, summary } = getSummary(transaction)

return (
<div>
<div className="flex flex-row flex-nowrap">
<div className="pr-4">
{success ? <CheckCircle className="text-primary" size={'20px'} /> : <IconFailure className="text-red" />}
</div>
<AutoColumn className="gap-2">
<span className={success ? 'text-base font-medium text-primary' : 'text-base font-medium text-red'}>
{title}
</span>
<span className="text-sm font-normal leading-[1.6] text-text">{summary}</span>
</AutoColumn>
<div className="grid min-w-0 grid-cols-[20px_minmax(0,1fr)] gap-x-4 gap-y-1">
<div className="pt-0.5">
{success ? (
<CheckCircle className="text-primary" size="20px" />
) : (
<IconFailure className="text-red" size={20} />
)}
</div>
<HideSmall className="ml-10 mt-2 block">
<AutoColumn className="min-w-0 gap-1">
<span className={cn('break-words text-base font-medium', success ? 'text-primary' : 'text-red')}>{title}</span>
<span className="break-words text-sm font-normal leading-[1.6] text-text">{summary}</span>
</AutoColumn>
<HideSmall className="col-start-2 block">
<ExternalLink
href={getEtherscanLink(chainId, hash, 'transaction')}
className={cn('text-sm', success ? 'text-primary' : 'text-red')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import SnippetPopup from 'components/Announcement/Popups/SnippetPopup'
import TopRightPopup from 'components/Announcement/Popups/TopRightPopup'
import { PopupType, PrivateAnnouncementType } from 'components/Announcement/type'
import { ButtonEmpty } from 'components/Button'
import useNotificationLimitOrder from 'components/swapv2/LimitOrder/useNotificationLimitOrder'
import { useNotificationLimitOrder } from 'components/LimitOrder/hooks/useNotificationLimitOrder'
import { TIMES_IN_SECS } from 'constants/index'
import { useActiveWeb3React } from 'hooks'
import {
Expand Down Expand Up @@ -103,37 +103,41 @@ export default function Popups() {
useNotificationLimitOrder()
const totalTopRightPopup = topRightPopups.length
const hasTopbarPopup = topPopups.length !== 0
const showTopRightPopupActions = totalTopRightPopup >= MAX_NOTIFICATION || totalTopRightPopup > 1

return (
<>
{topRightPopups.length > 0 && (
<div
className={cn(
'fixed right-4 z-[9999] flex flex-col items-end',
hasTopbarPopup ? 'top-[156px]' : 'top-[108px]',
'fixed right-4 z-[9999] flex flex-col items-end gap-4',
'max-md:inset-x-0 max-md:items-center',
hasTopbarPopup ? 'max-md:top-[170px]' : 'max-md:top-[110px]',
hasTopbarPopup ? 'max-sm:top-[170px]' : 'max-sm:top-[70px]',
{
'top-[136px] max-md:top-[150px] max-sm:top-[150px]': hasTopbarPopup,
'top-[88px] max-md:top-[90px] max-sm:top-[50px]': !hasTopbarPopup,
},
)}
>
<div className="flex w-full justify-end gap-2.5 max-md:pr-4">
{totalTopRightPopup >= MAX_NOTIFICATION && (
<ButtonEmpty
onClick={toggleNotificationCenter}
className="w-fit rounded-[30px] bg-border px-2.5 py-1 text-[10px] text-text"
>
<Trans>See All</Trans>
</ButtonEmpty>
)}
{totalTopRightPopup > 1 && (
<ButtonEmpty
onClick={clearAllTopRightPopup}
className="w-fit rounded-[30px] bg-border px-2.5 py-1 text-[10px] text-text"
>
<Trans>Clear All</Trans>
</ButtonEmpty>
)}
</div>
{showTopRightPopupActions && (
<div className="flex w-full justify-end gap-2.5 max-md:pr-4">
{totalTopRightPopup >= MAX_NOTIFICATION && (
<ButtonEmpty
onClick={toggleNotificationCenter}
className="w-fit rounded-[30px] bg-border px-2.5 py-1 text-[10px] text-text"
>
<Trans>See All</Trans>
</ButtonEmpty>
)}
{totalTopRightPopup > 1 && (
<ButtonEmpty
onClick={clearAllTopRightPopup}
className="w-fit rounded-[30px] bg-border px-2.5 py-1 text-[10px] text-text"
>
<Trans>Clear All</Trans>
</ButtonEmpty>
)}
</div>
)}

{topRightPopups.slice(0, MAX_NOTIFICATION).map((item, i) => (
<TopRightPopup key={item.key} popup={item} hasOverlay={i === MAX_NOTIFICATION - 1} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import {
} from 'components/Announcement/PrivateAnnoucement/styled'
import { AnnouncementTemplateLimitOrder } from 'components/Announcement/type'
import { CheckCircle } from 'components/Icons'
import { LimitOrderStatus } from 'components/LimitOrder/types'
import { TokenLogoWithShadow } from 'components/Logo'
import { LimitOrderStatus } from 'components/swapv2/LimitOrder/type'
import { APP_PATHS } from 'constants/index'
import { NETWORKS_INFO } from 'constants/networks'
import { useNavigateToUrl } from 'utils/redirect'
Expand Down Expand Up @@ -135,7 +135,9 @@ function InboxItemLimitOrder({
const navigate = useNavigateToUrl()
const onClick = () => {
const route = NETWORKS_INFO[chainId]?.route ?? NETWORKS_INFO[ChainId.MAINNET].route
navigate(`${APP_PATHS.LIMIT}/${route}?activeTab=my_order`, chainId)
const orderTab =
isFilled || isPartialFilled || isCancelled || status === LimitOrderStatus.EXPIRED ? 'closed' : 'active'
navigate(`${APP_PATHS.LIMIT}/${route}?tab=my_order&orderTab=${orderTab}`, chainId)
onRead(announcement, statusMessage)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import InboxIcon from 'components/Announcement/PrivateAnnoucement/Icon'
import { PrivateAnnouncementPropCenter } from 'components/Announcement/PrivateAnnoucement/NotificationCenter'
import { Desc, Time, Title, Wrapper } from 'components/Announcement/PrivateAnnoucement/NotificationCenter/styled'
import { AnnouncementTemplateLimitOrder } from 'components/Announcement/type'
import { LimitOrderStatus } from 'components/LimitOrder/types'
import Logo from 'components/Logo'
import { LimitOrderStatus } from 'components/swapv2/LimitOrder/type'
import { APP_PATHS } from 'constants/index'
import { formatTime } from 'utils/time'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
SmartExitReason,
SmartExitStatus,
} from 'components/Announcement/type'
import { LimitOrderStatus } from 'components/swapv2/LimitOrder/type'
import { LimitOrderStatus } from 'components/LimitOrder/types'
import { EnvKeys, NOTI_ENV } from 'constants/env'
import { Metric, SmartExitCondition } from 'pages/Earns/types'
import { formatDisplayNumber } from 'utils/numbers'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode } from 'react'

import { LimitOrderStatus } from 'components/swapv2/LimitOrder/type'
import { LimitOrderStatus } from 'components/LimitOrder/types'
import { SmartExitDexType } from 'pages/Earns/components/SmartExit/constants'
import { SmartExitCondition } from 'pages/Earns/types'
import { HistoricalPriceAlert } from 'pages/NotificationCenter/const'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Card from 'components/Card'
import TokenInfo from 'components/CurrencyInputPanel/TokenInfo'
import CurrencyLogo from 'components/CurrencyLogo'
import Wallet from 'components/Icons/Wallet'
import { Input as NumericalInput } from 'components/NumericalInput'
import NumericalInput from 'components/NumericalInput'
import { RowFixed } from 'components/Row'
import TokenSelectorModal from 'components/TokenSelectorModal'
import { useActiveWeb3React } from 'hooks'
Expand Down
3 changes: 3 additions & 0 deletions apps/kyberswap-interface/src/components/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ import Picker from 'react-date-picker'
export default function DatePicker({ onChange, value }: { value: Date; onChange: (date: Date) => void }) {
const today = new Date()
const minDate = new Date(today.getFullYear(), today.getMonth(), today.getDate())
const dateKey = `${value.getFullYear()}-${value.getMonth()}-${value.getDate()}`

return (
<div className="ks-date-picker">
<Picker
key={dateKey}
calendarIcon={null}
clearIcon={null}
autoFocus
Expand Down
Loading
Loading