Skip to content

Commit

Permalink
Merge branch 'main' into refactor/adapt-api-fetches-from-prices-package
Browse files Browse the repository at this point in the history
  • Loading branch information
OnlyJousting authored Feb 17, 2025
2 parents d478076 + a325a65 commit ee698a9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 38 deletions.
41 changes: 9 additions & 32 deletions apps/main/src/dex/components/PagePool/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import Icon from '@ui/Icon'
import { ExternalLink } from '@ui/Link'
import Tabs, { Tab } from '@ui/Tab'
import TextEllipsis from '@ui/TextEllipsis'
import { Chip } from '@ui/Typography'
import CampaignRewardsBanner from '@/dex/components/PagePool/components/CampaignRewardsBanner'
import PoolInfoData from '@/dex/components/PagePool/PoolDetails/ChartOhlcWrapper'
import PoolParameters from '@/dex/components/PagePool/PoolDetails/PoolParameters'
Expand All @@ -51,11 +50,7 @@ import { ManageGauge } from '@/dex/widgets/manage-gauge'
import { isAddressEqual, type Address } from 'viem'
import { useUserProfileStore } from '@ui-kit/features/user-profile'

export const DEFAULT_ESTIMATED_GAS: EstimatedGas = {
loading: false,
estimatedGas: null,
error: null,
}
export const DEFAULT_ESTIMATED_GAS: EstimatedGas = { loading: false, estimatedGas: null, error: null }

export const DEFAULT_SLIPPAGE: Slippage = {
loading: false,
Expand All @@ -65,10 +60,7 @@ export const DEFAULT_SLIPPAGE: Slippage = {
error: '',
}

const DEFAULT_SEED: Seed = {
isSeed: null,
loaded: false,
}
const DEFAULT_SEED: Seed = { isSeed: null, loaded: false }

const Transfer = (pageTransferProps: PageTransferProps) => {
const { params, curve, hasDepositAndStake, poolData, poolDataCacheOrApi, routerParams } = pageTransferProps
Expand Down Expand Up @@ -204,20 +196,13 @@ const Transfer = (pageTransferProps: PageTransferProps) => {
}
}, [isAvailableManageGauge, rFormType, toggleForm])

const TitleComp = () => {
const referenceAsset: { [referenceAsset: string]: string } = {
CRYPTO: t`CRYPTO V2`,
OTHER: t`OTHER`,
}
return (
<AppPageFormTitleWrapper>
<StyledExternalLink href={scanAddressPath(pool.address)}>
<Title as="h1">{pool?.name || ''}</Title>
</StyledExternalLink>
{pool?.referenceAsset && <StyledChip>{referenceAsset[pool.referenceAsset] ?? pool.referenceAsset}</StyledChip>}
</AppPageFormTitleWrapper>
)
}
const TitleComp = () => (
<AppPageFormTitleWrapper>
<StyledExternalLink href={scanAddressPath(pool.address)}>
<Title as="h1">{pool?.name || ''}</Title>
</StyledExternalLink>
</AppPageFormTitleWrapper>
)

// init rewardsMapper
useEffect(() => {
Expand Down Expand Up @@ -387,14 +372,6 @@ const Wrapper = styled(AppPageFormContainer)<{ chartExpanded: boolean }>`
}
`

const StyledChip = styled(Chip)`
margin-left: var(--spacing-2);
padding: 0 var(--spacing-1);
color: black;
background-color: white;
`

const StyledExternalLink = styled(ExternalLink)`
color: var(--nav--page--color);
text-transform: none;
Expand Down
6 changes: 0 additions & 6 deletions apps/main/src/dex/components/PoolLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import Box from '@ui/Box'
import ChipPool from '@/dex/components/ChipPool'
import ChipToken from '@/dex/components/ChipToken'
import TokenIcons from '@/dex/components/TokenIcons'
import TableCellReferenceAsset from '@/dex/components/PagePoolList/components/TableCellReferenceAsset'
import { PoolData, PoolDataCache } from '@/dex/types/main.types'

type PoolListProps = {
Expand Down Expand Up @@ -83,11 +82,6 @@ const PoolLabel = ({ className = '', imageBaseUrl, isVisible = true, poolData, p
{isVisible && <TokenIcons imageBaseUrl={imageBaseUrl} tokens={tokens} tokenAddresses={tokenAddresses} />}
</IconsWrapper>
<Box fillWidth>
<TableCellReferenceAsset
isCrypto={poolData?.pool?.isCrypto}
referenceAsset={poolData?.pool?.referenceAsset}
/>

<Box flex flexAlignItems="center">
{!isMobile && (
<>
Expand Down

0 comments on commit ee698a9

Please sign in to comment.