Skip to content

Commit

Permalink
Pimpup
Browse files Browse the repository at this point in the history
  • Loading branch information
Corantin committed Dec 13, 2023
1 parent 40cae0c commit 6334d82
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 798 deletions.
5 changes: 4 additions & 1 deletion packages/nextjs/components/TransactionHash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Link from "next/link";
import { ExternalLinkIcon } from "@dynamic-labs/sdk-react-core";
import { CopyToClipboard } from "react-copy-to-clipboard";
import { CheckCircleIcon, DocumentDuplicateIcon } from "@heroicons/react/24/outline";
import { getBlockExplorerTxLink } from "~~/utils/scaffold-eth";
import { getBlockExplorerTxLink, notification } from "~~/utils/scaffold-eth";

export const TransactionHash = ({ hash }: { hash: string }) => {
const [addressCopied, setAddressCopied] = useState(false);
Expand All @@ -25,6 +25,9 @@ export const TransactionHash = ({ hash }: { hash: string }) => {
<CopyToClipboard
text={hash as string}
onCopy={() => {
notification.info("Copied to clipboard", {
position: "bottom-right",
});
setAddressCopied(true);
setTimeout(() => {
setAddressCopied(false);
Expand Down
5 changes: 4 additions & 1 deletion packages/nextjs/components/scaffold-eth/Address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { hardhat } from "viem/chains";
import { useEnsAvatar, useEnsName } from "wagmi";
import { CheckCircleIcon, DocumentDuplicateIcon } from "@heroicons/react/24/outline";
import { BlockieAvatar } from "~~/components/scaffold-eth";
import { getBlockExplorerAddressLink, getTargetNetwork } from "~~/utils/scaffold-eth";
import { getBlockExplorerAddressLink, getTargetNetwork, notification } from "~~/utils/scaffold-eth";

interface TAddressProps {
address?: string;
Expand Down Expand Up @@ -113,6 +113,9 @@ export const Address = ({ address, disableAddressLink, format, size = "base" }:
<CopyToClipboard
text={address}
onCopy={() => {
notification.info("Copied to clipboard", {
position: "bottom-right",
});
setAddressCopied(true);
setTimeout(() => {
setAddressCopied(false);
Expand Down
Loading

0 comments on commit 6334d82

Please sign in to comment.