Skip to content

Commit

Permalink
chore: fix chain not found error in tx monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
npty committed Jan 10, 2025
1 parent 70a1986 commit ad05b00
Showing 1 changed file with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ const GMPTxStatusMonitor = ({ txHash, onAllChainsExecuted }: Props) => {
);

const statusList = Object.values(statuses ?? {});
const pendingItsHubTx = Object.keys(statuses).includes("axelarnet") || Object.keys(statuses).includes("axelar");
const pendingItsHubTx =
Object.keys(statuses).includes("axelarnet") ||
Object.keys(statuses).includes("axelar");

useEffect(() => {
if (
Expand Down Expand Up @@ -289,21 +291,27 @@ export const CollapsedChainStatusGroup: FC<ChainStatusItemsProps> = ({
<GMPStatusIndicator txHash={`${txHash}`} status={status} />
<div className="flex translate-x-5 items-center">
{leading.map((chain, i) => (
<span key={chain.id} className="-ml-2 flex items-center">
<span key={chain?.id || i} className="-ml-2 flex items-center">
<Tooltip
tip={chain ? `${chain?.name} - view tx on Axelarscan` : "View tx on Axelarscan"}
tip={
chain
? `${chain?.name} - view tx on Axelarscan`
: "View tx on Axelarscan"
}
$position="left"
>
<Link
href={`${NEXT_PUBLIC_EXPLORER_URL}/gmp/${txHash}:${logIndexes[i]}`}
target="_blank"
rel="noopener noreferrer"
>
<ChainIcon
src={chain.image}
size={compact ? "sm" : "md"}
alt={chain?.name || "chain"}
/>
{chain && (
<ChainIcon
src={chain.image}
size={compact ? "sm" : "md"}
alt={chain?.name || "chain"}
/>
)}
</Link>
</Tooltip>{" "}
</span>
Expand Down

0 comments on commit ad05b00

Please sign in to comment.