Skip to content

Commit

Permalink
ci(tangle-dapp): Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yurixander committed Nov 13, 2024
1 parent 1676a0f commit 48687a1
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion apps/tangle-dapp/app/liquid-staking/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ import OnboardingModal from '../../components/OnboardingModal/OnboardingModal';
import { LsSearchParamKey } from '../../constants/liquidStaking/types';
import LsCreatePoolModal from '../../containers/LsCreatePoolModal';
import LsMyProtocolsTable from '../../containers/LsMyProtocolsTable';
import { LsAllProtocolsTable } from '../../containers/LsPoolsTable';
import { useLsStore } from '../../data/liquidStaking/useLsStore';
import useIsAccountConnected from '../../hooks/useIsAccountConnected';
import useSearchParamState from '../../hooks/useSearchParamState';
import getLsTangleNetwork from '../../utils/liquidStaking/getLsTangleNetwork';
import TabListItem from '../restake/TabListItem';
import TabsList from '../restake/TabsList';
import { LsAllProtocolsTable } from '../../containers/LsPoolsTable';

enum SearchParamAction {
STAKE = 'stake',
Expand Down
2 changes: 1 addition & 1 deletion apps/tangle-dapp/components/AddressLink.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HexString } from '@polkadot/util/types';
import { ExternalLinkLine } from '@webb-tools/icons';
import { shortenString, Typography } from '@webb-tools/webb-ui-components';
import { FC, useCallback, MouseEvent } from 'react';
import { FC, MouseEvent, useCallback } from 'react';

import { SubstrateAddress } from '../types/utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { LsPool } from '../../constants/liquidStaking/types';
import useLsSetStakingIntent from '../../data/liquidStaking/useLsSetStakingIntent';
import { useLsStore } from '../../data/liquidStaking/useLsStore';
import useIsAccountConnected from '../../hooks/useIsAccountConnected';
import getLsProtocolDef from '../../utils/liquidStaking/getLsProtocolDef';
import tryEncodeAddressWithPrefix from '../../utils/liquidStaking/tryEncodeAddressWithPrefix';
import pluralize from '../../utils/pluralize';
import { TableStatus } from '..';
Expand All @@ -40,7 +41,6 @@ import PercentageCell from '../tableCells/PercentageCell';
import TokenAmountCell from '../tableCells/TokenAmountCell';
import { sharedTableStatusClxs } from '../tables/shared';
import UpdateCommissionModal from './UpdateCommissionModal';
import getLsProtocolDef from '../../utils/liquidStaking/getLsProtocolDef';

export interface LsMyPoolRow extends LsPool {
myStake: BN;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import { LS_DERIVATIVE_TOKEN_PREFIX } from '../../constants/liquidStaking/consta
import { LsNetworkId } from '../../constants/liquidStaking/types';
import getLsNetwork from '../../utils/liquidStaking/getLsNetwork';
import getLsProtocolDef from '../../utils/liquidStaking/getLsProtocolDef';
import DropdownChevronIcon from '../DropdownChevronIcon';
import InputWrapper from '../InputWrapper';
import LsTokenIcon from '../LsTokenIcon';
import DropdownChevronIcon from '../DropdownChevronIcon';

type LsProtocolDropdownInputProps = {
id: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import useInputAmount from '../../../hooks/useInputAmount';
import formatBn from '../../../utils/formatBn';
import getLsProtocolDef from '../../../utils/liquidStaking/getLsProtocolDef';
import LsNetworkSwitcher from './LsNetworkSwitcher';
import SelectedPoolIndicator from './SelectedPoolIndicator';
import LsTokenChip from './LsTokenChip';
import SelectedPoolIndicator from './SelectedPoolIndicator';

export type LsInputProps = {
id: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import { NETWORK_FEATURE_MAP } from '../../../constants/networks';
import { NetworkFeature } from '../../../types';
import getLsNetwork from '../../../utils/liquidStaking/getLsNetwork';
import getLsTangleNetwork from '../../../utils/liquidStaking/getLsTangleNetwork';
import { ChainList } from '../../Lists/ChainList';
import DropdownChevronIcon from '../../DropdownChevronIcon';
import { ChainList } from '../../Lists/ChainList';

type LsNetworkSwitcherProps = {
activeLsNetworkId: LsNetworkId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { twMerge } from 'tailwind-merge';

import { LS_DERIVATIVE_TOKEN_PREFIX } from '../../../constants/liquidStaking/constants';
import { LsToken } from '../../../constants/liquidStaking/types';
import LsTokenIcon from '../../LsTokenIcon';
import DropdownChevronIcon from '../../DropdownChevronIcon';
import LsTokenIcon from '../../LsTokenIcon';

type LsTokenChipProps = {
token?: LsToken;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { LS_DERIVATIVE_TOKEN_PREFIX } from '../../../constants/liquidStaking/con
import { LsNetworkId } from '../../../constants/liquidStaking/types';
import getLsNetwork from '../../../utils/liquidStaking/getLsNetwork';
import getLsProtocolDef from '../../../utils/liquidStaking/getLsProtocolDef';
import LsTokenIcon from '../../LsTokenIcon';
import DropdownChevronIcon from '../../DropdownChevronIcon';
import LsTokenIcon from '../../LsTokenIcon';

type ProtocolSelectorProps = {
selectedNetworkId: LsNetworkId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { u8aToString } from '@polkadot/util';
import { useMemo } from 'react';

import { LsPoolDisplayName } from '../../constants/liquidStaking/types';
Expand Down Expand Up @@ -30,7 +29,7 @@ const useLsActivePoolDisplayName = (): ActivePoolDisplayNameReturn => {
return null;
}

return u8aToString(activePool[1].metadata.name);
return activePool[1].metadata.name.toUtf8();
}, [activePool]);

const displayName = useMemo<LsPoolDisplayName | null>(() => {
Expand Down
4 changes: 2 additions & 2 deletions apps/tangle-dapp/data/liquidStaking/useLsUnbonding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import useApiRx from '../../hooks/useApiRx';
import useSubstrateAddress from '../../hooks/useSubstrateAddress';
import getLsProtocolDef from '../../utils/liquidStaking/getLsProtocolDef';
import useCurrentEra from '../staking/useCurrentEra';
import { useLsStore } from './useLsStore';
import useLsPools from './useLsPools';
import { useLsStore } from './useLsStore';

const useLsUnbonding = () => {
const pools = useLsPools();
Expand Down Expand Up @@ -64,7 +64,7 @@ const useLsUnbonding = () => {
} satisfies LsPoolUnstakeRequest;
})
.toArray();
}, [lsProtocol.decimals, lsProtocol.token, unbondingOpt]);
}, [currentEra, lsProtocol.decimals, lsProtocol.token, pools, unbondingOpt]);

return unstakeRequests;
};
Expand Down

0 comments on commit 48687a1

Please sign in to comment.