Skip to content

Commit 40c3d28

Browse files
authored
Delete old components and hooks from v1 details page (#1487)
1 parent 2fafd22 commit 40c3d28

File tree

52 files changed

+2
-5781
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2
-5781
lines changed

apps/hyperdrive-trading/src/ui/hyperdrive/MaturesOnCell/MaturesOnCell.tsx

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,7 @@ import classNames from "classnames";
33
import { ReactElement } from "react";
44
import { convertMillisecondsToDays } from "src/base/convertMillisecondsToDays";
55
import { formatDate } from "src/ui/base/formatting/formatDate";
6-
import { getRemainingTimeLabel } from "src/ui/hyperdrive/getRemainingTimeLabel";
7-
import { useBlock } from "wagmi";
86

9-
/**
10-
* @deprecated Use MaturesOnCellTwo instead. Remove this component once all references to it have been replaced.
11-
* Returns the maturity date of a long in a human-readable format.
12-
*/
13-
export function MaturesOnCell({
14-
hyperdrive,
15-
maturity,
16-
}: {
17-
hyperdrive: HyperdriveConfig;
18-
maturity: bigint;
19-
}): ReactElement {
20-
const { data: currentBlock } = useBlock({ chainId: hyperdrive.chainId });
21-
const isTermComplete = maturity < (currentBlock?.timestamp || 0n);
22-
const maturityDateMS = maturity * 1000n;
23-
24-
const remainingTime = getRemainingTimeLabel({
25-
maturitySeconds: Number(maturity),
26-
});
27-
28-
return (
29-
<div className="daisy-stat flex flex-row p-0 xl:flex-col">
30-
<span className="daisy-stat-value text-xs font-normal lg:text-md">
31-
{formatDate(Number(maturityDateMS))}
32-
</span>
33-
<div
34-
className={classNames("daisy-stat-desc inline-flex text-xs lg:mt-1", {
35-
"text-success": isTermComplete,
36-
})}
37-
>
38-
{remainingTime}
39-
</div>
40-
</div>
41-
);
42-
}
437
export function MaturesOnCellTwo({
448
maturity,
459
hyperdrive,

apps/hyperdrive-trading/src/ui/hyperdrive/PositionActionsMenu.tsx

Lines changed: 0 additions & 33 deletions
This file was deleted.

apps/hyperdrive-trading/src/ui/hyperdrive/hooks/useIdleLiquidity.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)