Skip to content

Commit

Permalink
review requests
Browse files Browse the repository at this point in the history
  • Loading branch information
dohaki committed Nov 8, 2023
1 parent 4287201 commit 2b3381f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/components/DepositsTable/DataRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
fallbackSuggestedRelayerFeePct,
suggestedFeesDeviationBufferMultiplier,
fixedPointAdjustment,
pendingStateTimeUntilSlow,
} from "utils";

import { HeaderCells, ColumnKey } from "./HeadRow";
Expand All @@ -33,8 +34,6 @@ type Props = {

const config = getConfig();

const MAX_PENDING_STATE_TIME_UNTIL_SLOW = 30 * 60; // 30 mins

function isColumnDisabled(disabledColumns: ColumnKey[], column: ColumnKey) {
return disabledColumns.includes(column);
}
Expand All @@ -61,7 +60,7 @@ export function DataRow({
deposit.status === "pending" &&
Math.abs(
DateTime.fromSeconds(deposit.depositTime).diffNow("seconds").as("seconds")
) > MAX_PENDING_STATE_TIME_UNTIL_SLOW;
) > pendingStateTimeUntilSlow;

// Hide unsupported or unknown token deposits
if (!token) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/DepositsTable/DepositsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { HeadRow, headerCells, ColumnKey } from "./HeadRow";
import { DataRow } from "./DataRow";
import { Deposit } from "hooks/useDeposits";

export type Props = {
export type DepositsTableProps = {
disabledColumns?: ColumnKey[];
onClickSpeedUp?: (deposit: Deposit) => void;
deposits: Deposit[];
Expand All @@ -14,7 +14,7 @@ export function DepositsTable({
disabledColumns = [],
deposits,
onClickSpeedUp,
}: Props) {
}: DepositsTableProps) {
return (
<Wrapper>
<StyledTable>
Expand Down
2 changes: 1 addition & 1 deletion src/components/DepositsTable/PaginatedDepositsTable.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from "@emotion/styled";

import Pagination, { paginate } from "components/Pagination";
import { DepositsTable, Props as DepositsTableProps } from "./DepositsTable";
import { DepositsTable, DepositsTableProps } from "./DepositsTable";

type Props = DepositsTableProps & {
currentPage: number;
Expand Down
1 change: 0 additions & 1 deletion src/components/Pagination/Pagination.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export const PageSizeSelectButton = styled(UnstyledButton)`
}
@media ${QUERIESV2.sm.andDown} {
margin-bottom: 1rem;
padding: 10px 20px;
}
`;
Expand Down
3 changes: 3 additions & 0 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -688,3 +688,6 @@ export const walletBlacklist = (process.env.REACT_APP_WALLET_BLACKLIST || "")

// Pre-computed gas expenditure for deposits used for estimations
export const gasExpenditureDeposit = BigNumber.from(90_000);

// Used to determine whether to show the "slow" warning in the deposits table
export const pendingStateTimeUntilSlow = 30 * 60; // 30 mins

0 comments on commit 2b3381f

Please sign in to comment.