diff --git a/src/components/table/Table.module.sass b/src/components/table/Table.module.sass index 42a6759..fe1c808 100644 --- a/src/components/table/Table.module.sass +++ b/src/components/table/Table.module.sass @@ -27,6 +27,10 @@ $zero_margin: 0 .DfCol width: 100% +.RowValue + display: flex + flex-direction: column + .Card min-height: 5rem border-radius: $border_radius_normal @@ -322,6 +326,7 @@ $zero_margin: 0 border-bottom: 1px solid #f0f0f0 .NonTokenImage - width: 24px + max-width: 24px + width: 100% height: 24px font-size: $font_small diff --git a/src/components/table/balancesTable/parseData/parseBalanceInfo.tsx b/src/components/table/balancesTable/parseData/parseBalanceInfo.tsx index c40773b..5e4f666 100644 --- a/src/components/table/balancesTable/parseData/parseBalanceInfo.tsx +++ b/src/components/table/balancesTable/parseData/parseBalanceInfo.tsx @@ -31,13 +31,13 @@ import { convertAddressToChainFormat, SubIcon } from '../../../utils/index' import { AccountIdentitiesRecord } from '../../../../rtk/features/identities/identitiesSlice' import { AccountInfoByChain } from '../../../identity/types' import { getSubsocialIdentityByAccount } from '../../../../rtk/features/identities/identitiesHooks' -import { RiQuestionLine } from 'react-icons/ri' import { BalanceView } from '../../../homePage/address-views/utils/index' import { TFunction } from 'i18next' import { Button, Tooltip } from 'antd' import { FiSend } from 'react-icons/fi' import { LinksButton } from '../../links/Links' -import { PnlData } from '../utils' +import { PnlInDollars, PriceChangedOn } from '../utils' +import { InfoCircleOutlined } from '@ant-design/icons' const getAccountData = (info: AccountInfoByChain, t: TFunction) => { const { reservedBalance, freeBalance, lockedBalance } = info @@ -306,7 +306,7 @@ export const parseBalancesTableInfo = ({ className='d-flex align-items-center' >
{label}
- + ) @@ -346,6 +346,25 @@ export const parseBalancesTableInfo = ({ ) + const priceView = ( +
+ {price} + {!isMulti && } +
+ ) + + const totalView = ( +
+ + {!isMulti && ( + + )} +
+ ) + const chain = !isMulti ? ( - } /> ) : ( , - total: ( - - ), + price: !isMulti ? priceView : <>, + total: totalView, totalTokensValue, icon, name, @@ -400,7 +410,7 @@ export const parseBalancesTableInfo = ({ balanceWithoutChildren: getBalancePart(false), balanceValue, balanceView: getBalancePart(true), - links: ( + links: isMulti ? [] : ( ), showLinks: (isShow: boolean) => ( - ), - transferAction: ( + transferAction: !isMulti && ( ) diff --git a/src/components/table/utils.tsx b/src/components/table/utils.tsx index f1ce0e2..dac11c7 100644 --- a/src/components/table/utils.tsx +++ b/src/components/table/utils.tsx @@ -843,6 +843,7 @@ export const getParentBalances = ( ) => { let balanceValueBN = BIGNUMBER_ZERO let totalValueBN = BIGNUMBER_ZERO + let totalTokensValueBN = BIGNUMBER_ZERO let priceValue let decimals = balances[0]?.decimals || 0 @@ -850,7 +851,9 @@ export const getParentBalances = ( .filter(isDef) .forEach(({ balanceValue, totalValue, totalTokensValue, price }) => { balanceValueBN = balanceValueBN.plus(balanceValue) - totalValueBN = totalValueBN.plus(totalTokensValue || totalValue) + totalValueBN = totalValueBN.plus(totalValue) + totalTokensValueBN = totalTokensValueBN.plus(totalTokensValue || 0) + priceValue = price }) @@ -870,6 +873,7 @@ export const getParentBalances = ( priceValue, balance, total, + totalTokensValueBN } }