Skip to content

Commit

Permalink
hide attestation (#3690)
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc authored Oct 16, 2024
1 parent 828a7d0 commit 8cab127
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getTxBlockExplorerLink } from "common";
import { truncateAddress } from "../../utils/address";
import { MintingActionButton } from "../Buttons";
import { Contribution, MintingAttestationIdsData } from "data-layer";
import { useDebugMode } from "../../../api/utils";

interface AttestationData {
attestation?: MintingAttestationIdsData;
Expand All @@ -30,6 +31,7 @@ export function TransactionHeader({
transactionHash
);
const parcialTransactionHash = truncateAddress(transactionHash, 5);
const debugModeEnabled = useDebugMode();

return (
<div className="bg-grey-75 rounded-lg gap-2 p-4 flex flex-col sm:flex-row items-center justify-between">
Expand All @@ -43,11 +45,13 @@ export function TransactionHeader({
<ArrowTopRightOnSquareIcon className="size-4 text-black" />
</a>
</span>
{debugModeEnabled &&
<MintingActionButton
transaction={{ hash: transactionHash, chainId: transactionChainId }}
contributions={contributions}
attestationData={{ attestation, isFetchingAttestations, refetch }}
/>
}
</div>
);
}
4 changes: 4 additions & 0 deletions packages/grant-explorer/src/features/round/ThankYou.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { AttestationChainId } from "../attestations/utils/constants";
import { ethers } from "ethers";
import { useAttestationFee } from "../contributors/hooks/useMintingAttestations";
import { useAttestationStore } from "../../attestationStore";
import { useDebugMode } from "../api/utils";

export default function ThankYou() {
datadogLogs.logger.info(
Expand Down Expand Up @@ -215,6 +216,7 @@ export default function ThankYou() {
: project.round,
})),
};
const debugModeEnabled = useDebugMode();

return (
<>
Expand All @@ -237,6 +239,7 @@ export default function ThankYou() {
</div>

{/* Right Section */}
{debugModeEnabled &&
<div className="w-full my-[5%] lg:w-1/2 ">
<div className="flex flex-col items-center justify-center">
{/* Main content */}
Expand All @@ -261,6 +264,7 @@ export default function ThankYou() {
</div>
</div>
</div>
}
</div>
) : minted ? (
<div className="flex flex-col items-center justify-center max-w-screen-2xl text-center">
Expand Down

0 comments on commit 8cab127

Please sign in to comment.