diff --git a/src/components/DetailItem/DetailItem.tsx b/src/components/DetailItem/DetailItem.tsx index c72f73e8..9e406e2a 100644 --- a/src/components/DetailItem/DetailItem.tsx +++ b/src/components/DetailItem/DetailItem.tsx @@ -1,9 +1,10 @@ +import { ReactNode } from 'react'; import classNames from 'classnames'; import { WithClassnameType } from 'types'; export interface DetailItemUIType extends WithClassnameType { - children?: React.ReactNode; - title?: string | React.ReactNode; + children?: ReactNode; + title?: ReactNode; colWidth?: string; noBorder?: boolean; verticalCenter?: boolean; diff --git a/src/helpers/getValue/getAccountDelegationDetails.ts b/src/helpers/getValue/getAccountDelegationDetails.ts index 9ca9a9b2..335efbe4 100644 --- a/src/helpers/getValue/getAccountDelegationDetails.ts +++ b/src/helpers/getValue/getAccountDelegationDetails.ts @@ -23,20 +23,15 @@ export const getAccountDelegationDetails = ( (a, b) => new BigNumber(a).plus(b), new BigNumber(ZERO) ); - const bNunbondable = delegation - .map(({ userUnBondable }) => userUnBondable) - .reduce((a, b) => new BigNumber(a).plus(b), new BigNumber(ZERO)); const activePlusUnStaked = bNactive.plus(bNunstaked); - const bNlocked = activePlusUnStaked - .plus(bNclaimableRewards) - .plus(bNunbondable); + const bNlocked = activePlusUnStaked.plus(bNclaimableRewards); const show = bNlocked.isGreaterThan(0); return { active: bNactive, - unstaked: bNunstaked.plus(bNunbondable), + unstaked: bNunstaked, claimable: bNclaimableRewards, locked: bNlocked, show diff --git a/src/pages/AccountDetails/AccountStaking/components/DonutChart/helpers/prepareChartData.ts b/src/pages/AccountDetails/AccountStaking/components/DonutChart/helpers/prepareChartData.ts index 911b3500..525c3646 100644 --- a/src/pages/AccountDetails/AccountStaking/components/DonutChart/helpers/prepareChartData.ts +++ b/src/pages/AccountDetails/AccountStaking/components/DonutChart/helpers/prepareChartData.ts @@ -42,12 +42,8 @@ export const prepareChartData = ({ ({ provider }) => delegation.contract === provider ); if (provider) { - const { - userActiveStake, - claimableRewards, - userUnBondable, - userUndelegatedList - } = delegation; + const { userActiveStake, claimableRewards, userUndelegatedList } = + delegation; const undelegatedAmounts = userUndelegatedList && userUndelegatedList.length > 0 @@ -60,7 +56,6 @@ export const prepareChartData = ({ const bNLocked = new BigNumber(userActiveStake) .plus(claimableRewards) - .plus(userUnBondable) .plus(bNtotalUserUnStakedValue); const amount = formatAmount({ diff --git a/src/pages/TransactionDetails/components/EventsList/EventItem.tsx b/src/pages/TransactionDetails/components/EventsList/EventItem.tsx index 1cd7a275..f7db9baf 100644 --- a/src/pages/TransactionDetails/components/EventsList/EventItem.tsx +++ b/src/pages/TransactionDetails/components/EventsList/EventItem.tsx @@ -1,5 +1,6 @@ import { useRef, useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import classNames from 'classnames'; import { CopyButton, @@ -69,9 +70,10 @@ export const EventItem = ({ event, txHash, id }: EventItemUIType) => { return (
diff --git a/src/pages/TransactionDetails/components/ScResultsList/ScResultsList.tsx b/src/pages/TransactionDetails/components/ScResultsList/ScResultsList.tsx index 6725c41d..cd1b5240 100644 --- a/src/pages/TransactionDetails/components/ScResultsList/ScResultsList.tsx +++ b/src/pages/TransactionDetails/components/ScResultsList/ScResultsList.tsx @@ -1,5 +1,6 @@ import { useRef, useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import classNames from 'classnames'; import { MAX_DISPLAY_TX_DATA_LENGTH } from 'appConstants'; import { @@ -55,9 +56,10 @@ export const ScResultsList = ({
diff --git a/src/pages/TransactionDetails/components/TransactionInfo/TransactionInfo.tsx b/src/pages/TransactionDetails/components/TransactionInfo/TransactionInfo.tsx index 9367b747..c2fc59bd 100644 --- a/src/pages/TransactionDetails/components/TransactionInfo/TransactionInfo.tsx +++ b/src/pages/TransactionDetails/components/TransactionInfo/TransactionInfo.tsx @@ -298,10 +298,8 @@ export const TransactionInfo = ({
- {isContract(transaction.receiver) ? ( + {isContract(transaction.receiver) && ( Contract - ) : ( - '' )}
- {isContract(receiver) ? ( + {isContract(receiver) && ( Contract - ) : ( - '' )}