From 0aeeab47758094185e8add705d29b37ca7ef2f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bego=C3=B1a=20Alvarez?= Date: Tue, 30 Jan 2024 17:53:37 +0100 Subject: [PATCH] chore: cleanup debris --- .../stardust/block/payload/TransactionPayload.tsx | 2 +- .../stardust/block/payload/TransactionPayloadProps.tsx | 5 ----- .../stardust/block/section/BlockPayloadSection.tsx | 3 --- client/src/app/routes/stardust/Block.tsx | 1 - client/src/app/routes/stardust/TransactionPage.tsx | 2 +- client/src/helpers/dateHelper.ts | 10 ---------- 6 files changed, 2 insertions(+), 21 deletions(-) diff --git a/client/src/app/components/stardust/block/payload/TransactionPayload.tsx b/client/src/app/components/stardust/block/payload/TransactionPayload.tsx index d39ef1e2c..45ac7fdb2 100644 --- a/client/src/app/components/stardust/block/payload/TransactionPayload.tsx +++ b/client/src/app/components/stardust/block/payload/TransactionPayload.tsx @@ -14,7 +14,7 @@ import { TransactionPayloadProps } from "./TransactionPayloadProps"; /** * Component which will display a transaction payload. */ -const TransactionPayload: React.FC = ({ network, inputs, unlocks, outputs, header, isLinksDisabled, milestoneIndex }) => { +const TransactionPayload: React.FC = ({ network, inputs, unlocks, outputs, header, isLinksDisabled }) => { const [inputsPreExpandedConfig, setInputsPreExpandedConfig] = useState([]); const { bech32Hrp } = useContext(NetworkContext); diff --git a/client/src/app/components/stardust/block/payload/TransactionPayloadProps.tsx b/client/src/app/components/stardust/block/payload/TransactionPayloadProps.tsx index c916772b8..8cf808b58 100644 --- a/client/src/app/components/stardust/block/payload/TransactionPayloadProps.tsx +++ b/client/src/app/components/stardust/block/payload/TransactionPayloadProps.tsx @@ -32,9 +32,4 @@ export interface TransactionPayloadProps { * Disable links if block is conflicting. */ isLinksDisabled?: boolean; - - /** - * Milestone index. - */ - milestoneIndex?: number; } diff --git a/client/src/app/components/stardust/block/section/BlockPayloadSection.tsx b/client/src/app/components/stardust/block/section/BlockPayloadSection.tsx index 852d90db9..7460c5a36 100644 --- a/client/src/app/components/stardust/block/section/BlockPayloadSection.tsx +++ b/client/src/app/components/stardust/block/section/BlockPayloadSection.tsx @@ -25,7 +25,6 @@ interface BlockPayloadSectionProps { readonly transferTotal?: number; readonly history: H.History; readonly isLinksDisabled: boolean; - readonly milestoneIndex?: number; } const BlockPayloadSection: React.FC = ({ @@ -38,7 +37,6 @@ const BlockPayloadSection: React.FC = ({ transferTotal, history, isLinksDisabled, - milestoneIndex, }) => { if (block.payload?.type === PayloadType.Transaction && inputs && unlocks && outputs && transferTotal !== undefined) { const transactionPayload = block.payload as ITransactionPayload; @@ -53,7 +51,6 @@ const BlockPayloadSection: React.FC = ({ unlocks={unlocks} outputs={outputs} isLinksDisabled={isLinksDisabled} - milestoneIndex={milestoneIndex} /> {transactionEssence.payload?.type === PayloadType.TaggedData && ( diff --git a/client/src/app/routes/stardust/Block.tsx b/client/src/app/routes/stardust/Block.tsx index 71298a204..acdcbdef9 100644 --- a/client/src/app/routes/stardust/Block.tsx +++ b/client/src/app/routes/stardust/Block.tsx @@ -117,7 +117,6 @@ const Block: React.FC> = ({ transferTotal={transferTotal ?? undefined} history={history} isLinksDisabled={isLinksDisabled} - milestoneIndex={metadata?.referencedByMilestoneIndex} />, ); tabbedSections.push( diff --git a/client/src/app/routes/stardust/TransactionPage.tsx b/client/src/app/routes/stardust/TransactionPage.tsx index 5c732d243..b805a26c7 100644 --- a/client/src/app/routes/stardust/TransactionPage.tsx +++ b/client/src/app/routes/stardust/TransactionPage.tsx @@ -156,7 +156,7 @@ const TransactionPage: React.FC> = ({ > {inputs && unlocks && outputs ? (
- +
) : ( <> diff --git a/client/src/helpers/dateHelper.ts b/client/src/helpers/dateHelper.ts index a07db5957..06388ddef 100644 --- a/client/src/helpers/dateHelper.ts +++ b/client/src/helpers/dateHelper.ts @@ -39,16 +39,6 @@ export class DateHelper { return moment(valueInMs).format("YYYY-MM-DD HH:mm:ss"); } - /** - * Check if the date is expired. - * @param value The value to check in milliseconds. - * @param compareWith - * @returns Boolean if the date is expired. - */ - public static isExpired(value: number, compareWith: number = Date.now()): boolean { - return moment(moment(compareWith)).isAfter(value); - } - /** * Check the value is in ms if not scale accordingly. * @param valueInMs The value to format in milliseconds.