Skip to content

Commit

Permalink
chore: cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanjoshi914 committed Nov 1, 2023
1 parent cb9755e commit 6c784cc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
10 changes: 1 addition & 9 deletions src/app/components/TransactionsTable/TransactionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ export default function TransactionModal({
}, [transaction]);

function getTransactionType(tx: Transaction): "incoming" | "outgoing" {
return [tx.type && "sent", "sending"].includes(tx.type)
? "outgoing"
: "incoming";
return [tx.type && "sent"].includes(tx.type) ? "outgoing" : "incoming";
}

return (
Expand Down Expand Up @@ -132,12 +130,6 @@ export default function TransactionModal({
content={transaction.boostagram.episode}
/>
)}
{transaction.description && (
<TransactionDetailRow
title={tCommon("description")}
content={transaction.description}
/>
)}
{(transaction.preimage || transaction.paymentHash) && (
<>
<div className="flex justify-center mt-4">
Expand Down
4 changes: 1 addition & 3 deletions src/app/components/TransactionsTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ export default function TransactionsTable({
}

function getTransactionType(tx: Transaction): "incoming" | "outgoing" {
return [tx.type && "sent", "sending"].includes(tx.type)
? "outgoing"
: "incoming";
return [tx.type && "sent"].includes(tx.type) ? "outgoing" : "incoming";
}

return (
Expand Down
1 change: 0 additions & 1 deletion src/app/hooks/useTransactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const useTransactions = () => {
(transaction) => ({
...transaction,
title: transaction.memo,
description: transaction.memo,
date: dayjs(transaction.settleDate).fromNow(),
timestamp: transaction.settleDate,
})
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ export type Transaction = {
totalAmount: Allowance["payments"][number]["totalAmount"];
totalAmountFiat?: string;
totalFees?: Allowance["payments"][number]["totalFees"];
type?: "sent" | "sending" | "received";
type?: "sent" | "received";
value?: string;
publisherLink?: string; // either the invoice URL if on PublisherSingleView, or the internal link to Publisher
};
Expand Down

0 comments on commit 6c784cc

Please sign in to comment.