Skip to content

Commit

Permalink
Merge pull request #1811 from blockscout/fe-1810
Browse files Browse the repository at this point in the history
custom claim funds link for optimistic rollups
  • Loading branch information
isstuev authored Apr 15, 2024
2 parents 4633636 + 362b87a commit 0b47e4f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ui/tx/details/TxDetailsWithdrawalStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React from 'react';
import type { OptimisticL2WithdrawalStatus } from 'types/api/optimisticL2';
import { WITHDRAWAL_STATUSES } from 'types/api/optimisticL2';

import config from 'configs/app';
import TxEntityL1 from 'ui/shared/entities/tx/TxEntityL1';
import VerificationSteps from 'ui/shared/verificationSteps/VerificationSteps';

Expand All @@ -12,8 +13,10 @@ interface Props {
l1TxHash: string | undefined;
}

const rollupFeature = config.features.rollup;

const TxDetailsWithdrawalStatus = ({ status, l1TxHash }: Props) => {
if (!status || !WITHDRAWAL_STATUSES.includes(status)) {
if (!status || !WITHDRAWAL_STATUSES.includes(status) || !rollupFeature.isEnabled || rollupFeature.type !== 'optimistic') {
return null;
}

Expand Down Expand Up @@ -46,7 +49,7 @@ const TxDetailsWithdrawalStatus = ({ status, l1TxHash }: Props) => {
variant="outline"
size="sm"
as="a"
href="https://app.optimism.io/bridge/withdraw"
href={ rollupFeature.L2WithdrawalUrl }
target="_blank"
>
Claim funds
Expand Down

0 comments on commit 0b47e4f

Please sign in to comment.