Skip to content

Commit

Permalink
Merge branch 'main' into feat/earn-landing
Browse files Browse the repository at this point in the history
  • Loading branch information
viet-nv authored Dec 27, 2024
2 parents 3305eda + 3b460b3 commit 283dc0c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/Header/groups/CampaignNavGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useMedia } from 'react-use'
import styled from 'styled-components'

import Column from 'components/Column'
import { NewLabel } from 'components/Menu'
import { APP_PATHS } from 'constants/index'

import { DropdownTextAnchor, StyledNavLink } from '../styleds'
Expand All @@ -29,9 +28,8 @@ const CampaignNavGroup = () => {
dropdownAlign={upTo500 ? 'right' : 'left'}
isActive={isActive}
anchor={
<DropdownTextAnchor style={{ position: 'relative', width: '115px' }}>
<DropdownTextAnchor style={{ position: 'relative', width: 'max-content' }}>
<Trans>Campaigns</Trans>
<NewLabel style={{ position: 'absolute', right: '0' }}>New</NewLabel>
</DropdownTextAnchor>
}
dropdownContent={
Expand Down
11 changes: 11 additions & 0 deletions src/components/swapv2/LimitOrder/LimitOrderForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,17 @@ const LimitOrderForm = forwardRef<LimitOrderFormHandle, Props>(function LimitOrd
if (isEdit) return
setRotate(prev => !prev)
switchCurrency()
setInputAmount(outputAmount)
setOutputAmount(inputAmount)
if (currencyIn) {
const rate = calcRate(outputAmount, inputAmount, currencyIn?.decimals)
setRateInfo({
...rateInfo,
rate,
rateFraction: parseFraction(rate),
invertRate: calcInvert(rate),
})
}
}

const parseInputAmount = tryParseAmount(inputAmount, currencyIn ?? undefined)
Expand Down

0 comments on commit 283dc0c

Please sign in to comment.