Skip to content

Commit 1fff5db

Browse files
committed
Refactor AccountListItem to use mappedOrderedTokenList
1 parent 6c810aa commit 1fff5db

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ui/components/multichain/account-list-item/account-list-item.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ export const AccountListItem = ({
9393
const { totalWeiBalance, orderedTokenList } = useAccountTotalFiatBalance(
9494
identity.address,
9595
);
96-
96+
const mappedOrderedTokenList = orderedTokenList.map((item) => ({
97+
avatarValue: item.iconUrl,
98+
}));
9799
let balanceToTranslate = totalWeiBalance;
98100
if (showFiat) {
99101
balanceToTranslate = identity.balance;
@@ -278,8 +280,8 @@ export const AccountListItem = ({
278280
{shortenAddress(toChecksumHexAddress(identity.address))}
279281
</Text>
280282
</Box>
281-
{orderedTokenList.length > 1 ? (
282-
<AvatarGroup members={orderedTokenList} limit={4} />
283+
{mappedOrderedTokenList.length > 1 ? (
284+
<AvatarGroup members={mappedOrderedTokenList} limit={4} />
283285
) : (
284286
<Box
285287
display={Display.Flex}

0 commit comments

Comments
 (0)