diff --git a/packages/nextjs/components/HistoryTable.tsx b/packages/nextjs/components/HistoryTable.tsx index be6d108..313241b 100644 --- a/packages/nextjs/components/HistoryTable.tsx +++ b/packages/nextjs/components/HistoryTable.tsx @@ -26,20 +26,20 @@ export const HistoryTable = () => { toastSuccess(message); }; - // function getTooltipText(transaction: HistoricalTransaction) { - // switch (transaction.status) { - // case "pending": - // return "Waiting for the transaction to be included in a block"; - // case "completed": - // return "Expand for more details"; - // case "failed": - // return `Transaction failed: Redeemable at ${new Date(transaction.hashLockTimestamp * 1000).toLocaleString()}`; - // case "refunded": - // return "Transaction refunded"; - // default: - // return ""; - // } - // } + function getTooltipText(transaction: HistoricalTransaction) { + switch (transaction.status) { + case "pending": + return "Waiting for the transaction to be included in a block"; + case "completed": + return "Expand for more details"; + case "failed": + return `Transaction failed: Redeemable at ${new Date(transaction.hashLockTimestamp * 1000).toLocaleString()}`; + case "refunded": + return "Transaction refunded"; + default: + return ""; + } + } function refund(transaction: HistoricalTransaction) { if (transaction.contractId === "") return; @@ -71,7 +71,7 @@ export const HistoryTable = () => { return (
-

History

+

History

{transactions.length > 0 && ( <> @@ -87,12 +87,14 @@ export const HistoryTable = () => { toggleRow(index)} - className={`cursor-pointer ${ + className={`cursor-pointer ${ transaction.status === "failed" ? "bg-red-400" : "" } hover:bg-white hover:bg-opacity-10`} > - + {expandedRow === index && ( diff --git a/packages/nextjs/components/PaymentInvoice.tsx b/packages/nextjs/components/PaymentInvoice.tsx index bc38a02..2f3c09f 100644 --- a/packages/nextjs/components/PaymentInvoice.tsx +++ b/packages/nextjs/components/PaymentInvoice.tsx @@ -65,7 +65,7 @@ export const PaymentInvoice = ({ invoice, submitPayment, cancelPayment, step }:
{stepInfo.title}   - {step === index && } + {step === index && }
))} @@ -75,14 +75,18 @@ export const PaymentInvoice = ({ invoice, submitPayment, cancelPayment, step }: {step < 2 ? (
{transaction.status}{transaction.date} + {transaction.date} + {transaction.amount} sats