Skip to content

Commit

Permalink
Clean up type
Browse files Browse the repository at this point in the history
  • Loading branch information
mattupham committed Aug 9, 2024
1 parent 3bd42ac commit c233189
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FunctionComponent } from "react";

import { FallbackImg, Icon } from "~/components/assets";
import { TransactionRowTransaction } from "~/components/transactions/transaction-row";
import { TransactionRow } from "~/components/transactions/transaction-row";
import { displayFiatPrice } from "~/components/transactions/transaction-utils";
import { useTranslation } from "~/hooks";

Expand All @@ -21,7 +21,7 @@ export const RecentActivityRow: FunctionComponent<{
);
};

export const SwapRow: FunctionComponent<TransactionRowTransaction> = ({
export const SwapRow: FunctionComponent<TransactionRow> = ({
status,
title,
tokenConversion,
Expand Down
8 changes: 4 additions & 4 deletions packages/web/components/transactions/transaction-row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type TransactionStatus = "pending" | "success" | "failed";

type Effect = "swap" | "deposit" | "withdraw";

export interface TransactionRowTransaction {
export interface TransactionRow {
isSelected?: boolean;
status: TransactionStatus;
/** At a high level- what this transaction does. */
Expand All @@ -41,7 +41,7 @@ export interface TransactionRowTransaction {
onClick?: () => void;
}

export const TransactionRow: FunctionComponent<TransactionRowTransaction> = ({
export const TransactionRow: FunctionComponent<TransactionRow> = ({
isSelected = false,
status,
effect,
Expand Down Expand Up @@ -127,7 +127,7 @@ export const TransactionRow: FunctionComponent<TransactionRowTransaction> = ({
/** UI for displaying one token being converted into another by this transaction. */
const TokenConversion: FunctionComponent<
{ status: TransactionStatus; effect: Effect } & NonNullable<
TransactionRowTransaction["tokenConversion"]
TransactionRow["tokenConversion"]
>
> = ({ status, tokenIn, tokenOut, effect }) => {
const { t } = useTranslation();
Expand Down Expand Up @@ -199,7 +199,7 @@ const TokenConversion: FunctionComponent<
export const TokenTransfer: FunctionComponent<
{
status: TransactionStatus;
} & NonNullable<TransactionRowTransaction["transfer"]>
} & NonNullable<TransactionRow["transfer"]>
> = ({ status, direction, amount, value }) => (
<div className="flex items-center gap-4">
<FallbackImg
Expand Down

0 comments on commit c233189

Please sign in to comment.