From 1436a60070bef5e8b6acb6a9a7ad03b0d360ec05 Mon Sep 17 00:00:00 2001 From: tommy0x <128688932+tommy0x@users.noreply.github.com> Date: Tue, 7 Nov 2023 19:09:56 +0100 Subject: [PATCH] feat(frontend): tx link in recent warps (#393) --- .../components/RecentWarps/RecentWarps.tsx | 39 ++++++++++++++----- .../frontend/src/hooks/useRecentWarps.tsx | 2 + 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/packages/frontend/src/components/RecentWarps/RecentWarps.tsx b/packages/frontend/src/components/RecentWarps/RecentWarps.tsx index 5a7f2b46..46022d4a 100644 --- a/packages/frontend/src/components/RecentWarps/RecentWarps.tsx +++ b/packages/frontend/src/components/RecentWarps/RecentWarps.tsx @@ -2,8 +2,9 @@ import { Table, formatTokenAmount, Skeleton } from '@sifi/shared-ui'; import { FunctionComponent } from 'react'; import { useRecentWarps } from 'src/hooks/useRecentWarps'; import { useTokens } from 'src/hooks/useTokens'; -import { getIconFromSymbol } from 'src/utils'; -import { getChainIcon } from 'src/utils/chains'; +import { getChainById, getChainIcon } from 'src/utils/chains'; +import { firstAndLast, getEvmTxUrl, getIconFromSymbol } from 'src/utils'; +import { useSwapFormValues } from 'src/hooks/useSwapFormValues'; const RecentWarpsTableData: FunctionComponent = () => { const { data: warps, error, isLoading } = useRecentWarps(); @@ -36,9 +37,11 @@ const RecentWarpsTableData: FunctionComponent = () => { return ( <> {warps?.map(warp => { + const hash = warp.id.split('-')[0]; + return (