|
2 | 2 |
|
3 | 3 | import { useQuery } from "@tanstack/react-query"; |
4 | 4 | import { CircleCheckIcon, XIcon } from "lucide-react"; |
5 | | -import { Badge } from "@/components/ui/badge"; |
6 | 5 | import { CopyTextButton } from "@/components/ui/CopyTextButton"; |
7 | 6 | import { Skeleton } from "@/components/ui/skeleton"; |
8 | 7 | import { ToolTipLabel } from "@/components/ui/tooltip"; |
@@ -182,17 +181,34 @@ export function ChainLiveStats(props: { rpc: string }) { |
182 | 181 | </PrimaryInfoItem> |
183 | 182 |
|
184 | 183 | {/* EIP-7702 */} |
185 | | - <PrimaryInfoItem title="EIP-7702"> |
186 | | - {eip7702Support.isError ? ( |
187 | | - <Badge variant="destructive">Disabled</Badge> |
188 | | - ) : eip7702Support.data ? ( |
189 | | - <Badge |
190 | | - variant={ |
191 | | - eip7702Support.data.isSupported ? "success" : "destructive" |
192 | | - } |
193 | | - > |
194 | | - {eip7702Support.data.isSupported ? "Enabled" : "Disabled"} |
195 | | - </Badge> |
| 184 | + <PrimaryInfoItem |
| 185 | + title="EIP-7702" |
| 186 | + titleIcon={ |
| 187 | + eip7702Support.data ? ( |
| 188 | + eip7702Support.data.isSupported ? ( |
| 189 | + <ToolTipLabel label="Enabled"> |
| 190 | + <CircleCheckIcon className="size-4 text-success-text" /> |
| 191 | + </ToolTipLabel> |
| 192 | + ) : ( |
| 193 | + <ToolTipLabel label="Disabled"> |
| 194 | + <XIcon className="size-4 text-destructive-text" /> |
| 195 | + </ToolTipLabel> |
| 196 | + ) |
| 197 | + ) : eip7702Support.isError ? ( |
| 198 | + <ToolTipLabel label="Disabled"> |
| 199 | + <XIcon className="size-4 text-destructive-text" /> |
| 200 | + </ToolTipLabel> |
| 201 | + ) : null |
| 202 | + } |
| 203 | + > |
| 204 | + {eip7702Support.data ? ( |
| 205 | + eip7702Support.data.isSupported ? ( |
| 206 | + "Enabled" |
| 207 | + ) : ( |
| 208 | + "Disabled" |
| 209 | + ) |
| 210 | + ) : eip7702Support.isError ? ( |
| 211 | + "Disabled" |
196 | 212 | ) : ( |
197 | 213 | <div className="flex h-[28px] w-[80px] py-1"> |
198 | 214 | <Skeleton className="h-full w-full" /> |
|
0 commit comments