Skip to content

Commit 7bad58b

Browse files
Merge pull request #1749 from curvefi/refactor/merge-mint-routes
refactor: merge mint create and manage loan pages
2 parents e1c7d44 + 40fcd35 commit 7bad58b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+583
-917
lines changed

apps/main/src/llamalend/queries/market-list/llama-markets.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,7 @@ const convertMintMarket = (
319319
},
320320
type: LlamaMarketType.Mint,
321321
deprecatedMessage: DEPRECATED_LLAMAS[chain]?.[llamma] ?? null,
322-
url: getInternalUrl(
323-
'crvusd',
324-
chain,
325-
`${CRVUSD_ROUTES.PAGE_MARKETS}/${name}/${hasBorrow ? 'manage/loan' : 'create'}`,
326-
),
322+
url: getInternalUrl('crvusd', chain, `${CRVUSD_ROUTES.PAGE_MARKETS}/${name}`),
327323
isFavorite: favoriteMarkets.has(llamma),
328324
rewards: [...(campaigns[address.toLowerCase()] ?? []), ...(campaigns[llamma.toLowerCase()] ?? [])],
329325
leverage,

apps/main/src/loan/components/ChartBandBalances/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { styled } from 'styled-components'
1717
import ChartBandBalancesSettings from '@/loan/components/ChartBandBalances/ChartBandBalancesSettings'
1818
import type { BrushStartEndIndex } from '@/loan/components/ChartBandBalances/types'
1919
import ChartTooltip, { TipContent, TipIcon, TipTitle } from '@/loan/components/ChartTooltip'
20-
import type { PageLoanManageProps } from '@/loan/components/PageLoanManage/types'
20+
import type { ManageLoanProps } from '@/loan/components/PageMintMarket/types'
2121
import useStore from '@/loan/store/useStore'
2222
import { BandsBalancesData } from '@/loan/types/loan.types'
2323
import { getTokenName } from '@/loan/utils/utilsLoan'
@@ -26,7 +26,7 @@ import Spinner, { SpinnerWrapper } from '@ui/Spinner'
2626
import { BN, FORMAT_OPTIONS, formatNumber } from '@ui/utils'
2727
import { t } from '@ui-kit/lib/i18n'
2828

29-
interface Props extends Pick<PageLoanManageProps, 'llamma'> {
29+
interface Props extends Pick<ManageLoanProps, 'market'> {
3030
brushIndex: BrushStartEndIndex
3131
data: BandsBalancesData[]
3232
oraclePrice: string | undefined
@@ -38,7 +38,7 @@ interface Props extends Pick<PageLoanManageProps, 'llamma'> {
3838

3939
const ChartBandBalances = ({
4040
brushIndex,
41-
llamma,
41+
market: llamma,
4242
data,
4343
oraclePrice,
4444
oraclePriceBand,

apps/main/src/loan/components/ChartUserBands.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const ChartUserBands = ({
7979
<ChartBandBalances
8080
brushIndex={brushIndex}
8181
data={chartBandBalancesData}
82-
llamma={llamma}
82+
market={llamma}
8383
oraclePrice={oraclePrice}
8484
oraclePriceBand={oraclePriceBand}
8585
showLiquidationIndicator={!!userLiquidationBand}

apps/main/src/loan/components/LoanInfoLlamma/components/DetailsBandsChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const DetailsBandsChart = ({
7070

7171
return (
7272
<ChartBandBalances
73-
llamma={llamma}
73+
market={llamma}
7474
brushIndex={brushIndex}
7575
data={parsedChartBandBalancesData}
7676
oraclePrice={oraclePrice}

apps/main/src/loan/components/PageLoanCreate/Page.tsx

Lines changed: 0 additions & 222 deletions
This file was deleted.

0 commit comments

Comments
 (0)