Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide attestation #3690

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading