Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: centrifuge/apps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 517a559ff99c02264febc87e037b0c0b53b1fb33
Choose a base ref
..
head repository: centrifuge/apps
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5727c8186a72a19789e1b0fa85d911968f9f29b2
Choose a head ref
Showing with 4 additions and 3 deletions.
  1. +4 −3 centrifuge-app/src/components/InvestRedeem/InvestRedeemDrawer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CurrencyBalance, DailyPoolState, Perquintill, Pool } from '@centrifuge/centrifuge-js'
import { Box, Drawer, Stack, Tabs, TabsItem, Text } from '@centrifuge/fabric'
import * as React from 'react'
import { TinlakePool } from 'src/utils/tinlake/useTinlakePools'
import { useDailyPoolStates, usePool } from '../../utils/usePools'
import { FilterOptions, PriceChart } from '../Charts/PriceChart'
import { LoadBoundary } from '../LoadBoundary'
@@ -98,7 +99,7 @@ export function InvestRedeemDrawer({
</Box>

<TokenPriceChart
poolId={poolId}
pool={pool}
trancheId={trancheId}
dailyPoolStates={dailyPoolStates}
filter={filter}
@@ -120,7 +121,7 @@ const TokenPriceChart = React.memo(function TokenPriceChart({
setFilter,
index,
}: {
pool: Pool
pool: Pool | TinlakePool
trancheId: string
dailyPoolStates: DailyPoolStateProps[]
filter: FilterOptions
@@ -150,7 +151,7 @@ const TokenPriceChart = React.memo(function TokenPriceChart({
return tokenData
}, [dailyPoolStates, pool?.tranches, trancheId, filter])

if (!data.length) return
if (!data.length || !pool) return

return (
<PriceChart