Skip to content

Commit

Permalink
Merge branch 'master' into release/kintsugi/2.41.7
Browse files Browse the repository at this point in the history
* master: (225 commits)
  chore: release v2.41.7
  fix: chart counter enum and lower value for collateral (#1638)
  chore: release v2.41.6
  refactor: line chart config (#1635)
  chore: release v2.41.5
  chore: bump bridge (#1631)
  chore: release v2.41.4
  api: rewrite python functions in javascript (#1630)
  chore: release v2.41.3
  Switch Bifrost RPC node (#1627)
  chore: release v2.41.2
  api: add dia fair price feed (#1619)
  chore: release v2.41.1
  Tom/update parallel xcm nodes (#1621)
  Tom/hotfix/disable parallel xcm channel (#1620)
  chore: release v2.41.0
  Feat: expose TVLs fetched via lib as part of api endpoints (#1605)
  [release] Interlay 2.40.2 (#1611)
  chore: release v2.40.2
  update staking labels and format valuers (#1609)
  ...

# Conflicts:
#	package.json
#	src/config/charts.ts
#	src/pages/Dashboard/sub-pages/Home/LockedCollateralsCard/index.tsx
#	src/pages/Dashboard/sub-pages/Vaults/LockedCollateralCard/index.tsx
  • Loading branch information
tomjeatt committed Feb 9, 2024
2 parents 596ed11 + 853586e commit d979e00
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "interbtc-ui",
"version": "2.41.6",
"version": "2.41.7",
"private": true,
"dependencies": {
"@craco/craco": "^6.1.1",
Expand Down
7 changes: 5 additions & 2 deletions src/config/charts.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const COUNT_OF_DATES_FOR_CHART = 180;
enum CountOfDatesForChart {
SIX_MONTHS = 180,
ONE_MONTH = 30
}

export { COUNT_OF_DATES_FOR_CHART };
export { CountOfDatesForChart };
4 changes: 2 additions & 2 deletions src/pages/Dashboard/IssuedChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
import { useQuery } from 'react-query';

import { getLastMidnightTimestamps } from '@/common/utils/utils';
import { COUNT_OF_DATES_FOR_CHART } from '@/config/charts';
import { CountOfDatesForChart } from '@/config/charts';
import { WRAPPED_TOKEN, WRAPPED_TOKEN_SYMBOL } from '@/config/relay-chains';
import ErrorFallback from '@/legacy-components/ErrorFallback';
import cumulativeVolumesFetcher, {
Expand All @@ -17,7 +17,7 @@ import { KUSAMA, POLKADOT } from '@/utils/constants/relay-chain-names';

import LineChart from '../LineChart';

const cutoffTimestamps = getLastMidnightTimestamps(COUNT_OF_DATES_FOR_CHART, true);
const cutoffTimestamps = getLastMidnightTimestamps(CountOfDatesForChart.SIX_MONTHS, true);

const IssuedChart = (): JSX.Element => {
const { t } = useTranslation();
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Dashboard/cards/ActiveVaultsCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next';
import { useQuery } from 'react-query';

import { formatNumber, getLastMidnightTimestamps } from '@/common/utils/utils';
import { COUNT_OF_DATES_FOR_CHART } from '@/config/charts';
import { CountOfDatesForChart } from '@/config/charts';
import ErrorFallback from '@/legacy-components/ErrorFallback';
import graphqlFetcher, { GRAPHQL_FETCHER, GraphqlReturn } from '@/services/fetchers/graphql-fetcher';
import { INTERLAY_DENIM, KINTSUGI_SUNDOWN } from '@/utils/constants/colors';
Expand All @@ -23,7 +23,7 @@ interface VaultRegistration {
registrationTimestamp: number;
}

const cutoffTimestamps = getLastMidnightTimestamps(COUNT_OF_DATES_FOR_CHART, true);
const cutoffTimestamps = getLastMidnightTimestamps(CountOfDatesForChart.SIX_MONTHS, true);

const ActiveVaultsCard = ({ hasLinks }: Props): JSX.Element => {
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useErrorHandler, withErrorBoundary } from 'react-error-boundary';
import { useTranslation } from 'react-i18next';

import { convertMonetaryAmountToValueInUSD, formatUSD, getLastMidnightTimestamps } from '@/common/utils/utils';
import { COUNT_OF_DATES_FOR_CHART } from '@/config/charts';
import { CountOfDatesForChart } from '@/config/charts';
import { useGetPrices } from '@/hooks/api/use-get-prices';
import useAllCumulativeVaultCollateralVolumes from '@/hooks/use-all-cumulative-vault-collateral-volumes';
import ErrorFallback from '@/legacy-components/ErrorFallback';
Expand All @@ -16,7 +16,7 @@ import DashboardCard from '../../../cards/DashboardCard';
import LineChart from '../../../LineChart';
import Stats, { StatsDd, StatsDt, StatsRouterLink } from '../../../Stats';

const cutoffTimestamps = getLastMidnightTimestamps(COUNT_OF_DATES_FOR_CHART, true);
const cutoffTimestamps = getLastMidnightTimestamps(CountOfDatesForChart.ONE_MONTH, true);

const LockedCollateralsCard = (): JSX.Element => {
const { t } = useTranslation();
Expand All @@ -31,7 +31,7 @@ const LockedCollateralsCard = (): JSX.Element => {
const cumulativeUSDVolumes = React.useMemo(() => {
if (allCumulativeVaultCollateralVolumes === undefined) return;

return Array<number>(COUNT_OF_DATES_FOR_CHART)
return Array<number>(CountOfDatesForChart.ONE_MONTH)
.fill(0)
.map((_, index) => {
const collateralTickers = Object.keys(allCumulativeVaultCollateralVolumes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
import { useQuery } from 'react-query';

import { getLastMidnightTimestamps } from '@/common/utils/utils';
import { COUNT_OF_DATES_FOR_CHART } from '@/config/charts';
import { CountOfDatesForChart } from '@/config/charts';
import { WRAPPED_TOKEN } from '@/config/relay-chains';
import ErrorFallback from '@/legacy-components/ErrorFallback';
import cumulativeVolumesFetcher, {
Expand All @@ -17,7 +17,7 @@ import { KUSAMA, POLKADOT } from '@/utils/constants/relay-chain-names';

import LineChart from '../../../../LineChart';

const cutoffTimestamps = getLastMidnightTimestamps(COUNT_OF_DATES_FOR_CHART, true);
const cutoffTimestamps = getLastMidnightTimestamps(CountOfDatesForChart.SIX_MONTHS, true);

const RedeemedChart = (): JSX.Element => {
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
displayMonetaryAmountInUSDFormat,
getLastMidnightTimestamps
} from '@/common/utils/utils';
import { COUNT_OF_DATES_FOR_CHART } from '@/config/charts';
import { CountOfDatesForChart } from '@/config/charts';
import useCumulativeCollateralVolumes from '@/hooks/use-cumulative-collateral-volumes';
import ErrorFallback from '@/legacy-components/ErrorFallback';
import DashboardCard from '@/pages/Dashboard/cards/DashboardCard';
Expand All @@ -16,7 +16,7 @@ import Stats, { StatsDd, StatsDt } from '@/pages/Dashboard/Stats';
import { INTERLAY_DENIM, KINTSUGI_SUPERNOVA } from '@/utils/constants/colors';
import { KUSAMA, POLKADOT } from '@/utils/constants/relay-chain-names';

const cutoffTimestamps = getLastMidnightTimestamps(COUNT_OF_DATES_FOR_CHART, true);
const cutoffTimestamps = getLastMidnightTimestamps(CountOfDatesForChart.SIX_MONTHS, true);

interface Props {
collateralToken: CollateralCurrencyExt;
Expand Down

0 comments on commit d979e00

Please sign in to comment.