diff --git a/.changeset/tidy-oranges-dream.md b/.changeset/tidy-oranges-dream.md new file mode 100644 index 000000000..602282dd8 --- /dev/null +++ b/.changeset/tidy-oranges-dream.md @@ -0,0 +1,5 @@ +--- +"fuels-wallet": patch +--- + +TransactionList breaking when have a failed transaction diff --git a/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.tsx b/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.tsx index 4da931872..d6644cba9 100644 --- a/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.tsx +++ b/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.tsx @@ -1,7 +1,7 @@ import { cssObj } from '@fuel-ui/css'; import { Box, Card, Copyable, Icon, Text } from '@fuel-ui/react'; import { Address, type TransactionSummary } from 'fuels'; -import type { FC } from 'react'; +import { type FC, useMemo } from 'react'; import { useNavigate } from 'react-router-dom'; import { Pages, shortAddress } from '~/systems/Core'; @@ -34,6 +34,12 @@ export const ActivityItem: TxItemComponent = ({ status, } = useTxMetadata({ ownerAddress, transaction }); + const address = useMemo(() => { + if (!toOrFromAddress) return; + + return Address.fromDynamicInput(toOrFromAddress); + }, [toOrFromAddress]); + return ( {toOrFromText} - - {shortAddress(Address.fromDynamicInput(toOrFromAddress).toB256())} - + {!!address && shortAddress(address.toB256())} {timeFormatted && (