Skip to content

Commit

Permalink
fix(tangle-dapp): Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yurixander committed Dec 18, 2024
1 parent 4aabf31 commit a990956
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import calculateCommission from '../../utils/calculateCommission';
import { HeaderCell, StringCell } from '../tableCells';
import PercentageCell from '../tableCells/PercentageCell';
import TokenAmountCell from '../tableCells/TokenAmountCell';
import pluralize from '../../utils/pluralize';
import pluralize from '@webb-tools/webb-ui-components/utils/pluralize';

const columnHelper = createColumnHelper<Nominee>();

Expand Down
2 changes: 1 addition & 1 deletion apps/tangle-dapp/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './BondedTokensBalanceInfo';
export { default as GlassCardWithLogo } from './GlassCardWithLogo';
export { default as CardWithTangleLogo } from './CardWithTangleLogo';
export * from './HeaderChip';
export * from './KeyStatsItem';
export * from './NominationsTable';
Expand Down
2 changes: 1 addition & 1 deletion apps/tangle-dapp/src/components/tables/Vaults/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { twMerge } from 'tailwind-merge';
import { PagePath, QueryParamKey } from '../../../types';
import type { Props, VaultData } from './types';
import sortByLocaleCompare from '../../../utils/sortByLocaleCompare';
import pluralize from '../../../utils/pluralize';
import pluralize from '@webb-tools/webb-ui-components/utils/pluralize';

const columnHelper = createColumnHelper<VaultData>();

Expand Down
15 changes: 8 additions & 7 deletions apps/tangle-dapp/src/containers/AssetsAndBalancesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@ import {
import { TableVariant } from '@webb-tools/webb-ui-components/components/Table/types';
import { FC, useCallback, useMemo, useState } from 'react';

import LsTokenIcon from '../components/LsTokenIcon';
import StatItem from '../components/StatItem';
import TableCellWrapper from '../components/tables/TableCellWrapper';
import { HeaderCell } from '../components/tableCells';
import addCommasToNumber from '@webb-tools/webb-ui-components/utils/addCommasToNumber';
import { ArrowRight } from '@webb-tools/icons';
import { PagePath } from '../types';
import { Link } from 'react-router';
import sortByLocaleCompare from '../utils/sortByLocaleCompare';
import { twMerge } from 'tailwind-merge';
import formatFractional from '../utils/formatFractional';
import useRestakeBalances from '../data/restake/useRestakeBalances';
import useRestakeAssetMap from '@webb-tools/tangle-shared-ui/data/restake/useRestakeAssetMap';
import { TableStatus } from '../components';
import useRestakeRewardConfig from '../data/restake/useRestakeRewardConfig';
import useRestakeDelegatorInfo from '../data/restake/useRestakeDelegatorInfo';
import useIsAccountConnected from '../hooks/useIsAccountConnected';
import useLsPools from '../data/liquidStaking/useLsPools';
import { TANGLE_TOKEN_DECIMALS } from '@webb-tools/dapp-config';
import TableCellWrapper from '@webb-tools/tangle-shared-ui/components/tables/TableCellWrapper';
import LsTokenIcon from '@webb-tools/tangle-shared-ui/components/LsTokenIcon';
import formatFractional from '@webb-tools/webb-ui-components/utils/formatFractional';
import useRestakeBalances from '@webb-tools/tangle-shared-ui/data/restake/useRestakeBalances';
import useRestakeRewardConfig from '../data/restake/useRestakeRewardConfig';
import useRestakeDelegatorInfo from '@webb-tools/tangle-shared-ui/data/restake/useRestakeDelegatorInfo';
import TableStatus from '@webb-tools/tangle-shared-ui/components/tables/TableStatus';

enum RowType {
ASSET,
Expand Down Expand Up @@ -327,6 +327,7 @@ const AssetsAndBalancesTable: FC = () => {
});
}, [allPools, getTotalLockedInAsset]);

// All rows combined.
const rows = useMemo<Row[]>(() => {
// Sort by highest available balance (descending).
return [...assetRows, ...lsPoolRows].sort((a, b) => {
Expand Down
4 changes: 2 additions & 2 deletions apps/tangle-dapp/src/containers/LockedBalancesTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import useLockRows from './useLockRows';
import { BN } from '@polkadot/util';
import { SubstrateLockId } from '../../constants';
import useIsAccountConnected from '../../hooks/useIsAccountConnected';
import { TableStatus } from '../../components';
import pluralize from '../../utils/pluralize';
import { CheckboxCircleFill } from '@webb-tools/icons';
import TableStatus from '@webb-tools/tangle-shared-ui/components/tables/TableStatus';
import pluralize from '@webb-tools/webb-ui-components/utils/pluralize';

export enum LockUnlocksAtKind {
ERA,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { useCallback } from 'react';
import useVestingInfo from '../../data/vesting/useVestingInfo';
import useApi from '../../hooks/useApi';
import useApiRx from '@webb-tools/tangle-shared-ui/hooks/useApiRx';
import { sortVestingSchedulesAscending } from '../BalancesTableContainer/LockedBalanceDetails/VestingScheduleBalances';
import getBlockDate from '../../utils/getBlockDate';
import calculateTimeRemaining from '../../utils/calculateTimeRemaining';
import { BalanceLockRow, LockUnlocksAtKind } from '.';
import { SubstrateLockId } from '../../constants';
import addCommasToNumber from '@webb-tools/webb-ui-components/utils/addCommasToNumber';
import { sortVestingSchedulesAscending } from '../BalancesTableContainer/LockedBalanceDetails/utils';

const useVestingLockRows = (): BalanceLockRow[] | null => {
const { schedulesOpt: vestingSchedulesOpt } = useVestingInfo();
Expand Down
2 changes: 1 addition & 1 deletion apps/tangle-dapp/src/data/balances/useBalanceLocks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import useApiRx from '@webb-tools/tangle-shared-ui/hooks/useApiRx';
import useSubstrateAddress from '../../hooks/useSubstrateAddress';
import useSubstrateAddress from '@webb-tools/tangle-shared-ui/hooks/useSubstrateAddress';
import { useCallback } from 'react';

const useBalanceLocks = () => {
Expand Down

0 comments on commit a990956

Please sign in to comment.