|
3 | 3 | import Link from "next/link"; |
4 | 4 | import { useRouter } from "next/navigation"; |
5 | 5 | import { useCallback, useEffect, useState } from "react"; |
6 | | -import type { MeterBundleResponse, RejectedTransaction } from "@/lib/s3"; |
| 6 | +import { |
| 7 | + formatRejectionReason, |
| 8 | + type MeterBundleResponse, |
| 9 | + type RejectedTransaction, |
| 10 | +} from "@/lib/s3"; |
7 | 11 | import type { BlockSummary, BlocksResponse } from "./api/blocks/route"; |
8 | 12 | import type { RejectedTransactionsResponse } from "./api/rejected/route"; |
9 | 13 |
|
@@ -319,7 +323,8 @@ function RejectedTxRow({ |
319 | 323 | <span className="text-xs text-gray-400">{timeAgo}</span> |
320 | 324 | </div> |
321 | 325 | <div className="text-xs text-gray-500 mt-0.5 truncate"> |
322 | | - Block #{tx.blockNumber.toLocaleString()} — {tx.reason} |
| 326 | + Block #{tx.blockNumber.toLocaleString()} —{" "} |
| 327 | + {formatRejectionReason(tx.reason)} |
323 | 328 | </div> |
324 | 329 | </div> |
325 | 330 | <svg |
@@ -357,7 +362,9 @@ function RejectedTxRow({ |
357 | 362 | </tr> |
358 | 363 | <tr className="border-b border-gray-200/60"> |
359 | 364 | <td className="text-gray-500 py-2">Reason</td> |
360 | | - <td className="py-2 text-red-700 font-medium">{tx.reason}</td> |
| 365 | + <td className="py-2 text-red-700 font-medium"> |
| 366 | + {formatRejectionReason(tx.reason)} |
| 367 | + </td> |
361 | 368 | </tr> |
362 | 369 | <tr> |
363 | 370 | <td className="text-gray-500 py-2">Rejected At</td> |
|
0 commit comments