Skip to content

Commit

Permalink
chore: cleanup debris
Browse files Browse the repository at this point in the history
  • Loading branch information
begonaalvarezd committed Jan 30, 2024
1 parent 33264da commit 0aeeab4
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { TransactionPayloadProps } from "./TransactionPayloadProps";
/**
* Component which will display a transaction payload.
*/
const TransactionPayload: React.FC<TransactionPayloadProps> = ({ network, inputs, unlocks, outputs, header, isLinksDisabled, milestoneIndex }) => {
const TransactionPayload: React.FC<TransactionPayloadProps> = ({ network, inputs, unlocks, outputs, header, isLinksDisabled }) => {

const [inputsPreExpandedConfig, setInputsPreExpandedConfig] = useState<IPreExpandedConfig[]>([]);
const { bech32Hrp } = useContext(NetworkContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,4 @@ export interface TransactionPayloadProps {
* Disable links if block is conflicting.
*/
isLinksDisabled?: boolean;

/**
* Milestone index.
*/
milestoneIndex?: number;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ interface BlockPayloadSectionProps {
readonly transferTotal?: number;
readonly history: H.History;
readonly isLinksDisabled: boolean;
readonly milestoneIndex?: number;
}

const BlockPayloadSection: React.FC<BlockPayloadSectionProps> = ({
Expand All @@ -38,7 +37,6 @@ const BlockPayloadSection: React.FC<BlockPayloadSectionProps> = ({
transferTotal,
history,
isLinksDisabled,
milestoneIndex,
}) => {
if (block.payload?.type === PayloadType.Transaction && inputs && unlocks && outputs && transferTotal !== undefined) {
const transactionPayload = block.payload as ITransactionPayload;
Expand All @@ -53,7 +51,6 @@ const BlockPayloadSection: React.FC<BlockPayloadSectionProps> = ({
unlocks={unlocks}
outputs={outputs}
isLinksDisabled={isLinksDisabled}
milestoneIndex={milestoneIndex}
/>
</div>
{transactionEssence.payload?.type === PayloadType.TaggedData && (
Expand Down
1 change: 0 additions & 1 deletion client/src/app/routes/stardust/Block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ const Block: React.FC<RouteComponentProps<BlockProps>> = ({
transferTotal={transferTotal ?? undefined}
history={history}
isLinksDisabled={isLinksDisabled}
milestoneIndex={metadata?.referencedByMilestoneIndex}
/>,
);
tabbedSections.push(
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/routes/stardust/TransactionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const TransactionPage: React.FC<RouteComponentProps<TransactionPageProps>> = ({
>
{inputs && unlocks && outputs ? (
<div className="section">
<TransactionPayload network={network} inputs={inputs} unlocks={unlocks} outputs={outputs} milestoneIndex={metadata?.referencedByMilestoneIndex} />
<TransactionPayload network={network} inputs={inputs} unlocks={unlocks} outputs={outputs} />
</div>
) : (
<></>
Expand Down
10 changes: 0 additions & 10 deletions client/src/helpers/dateHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0aeeab4

Please sign in to comment.